WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   Updating viewpoint via external computer (https://forum.worldviz.com/showthread.php?t=1327)

Rachel 02-01-2008 12:53 PM

Updating viewpoint via external computer
 
Hello. Brand new to Vizard (and networks) here.

I would like to update the viewpoint in a Vizard scene based on position data I’m sending from a Matlab script running on another computer on the network (UDP). I’m posting to ask if this a case where the “viz.NETWORK_EVENT” callback would work. I’ve been looking at the help files, and it would seem that I could send the Matlab position data over the network and receive it as “e.data” in Vizard. Then there could be a callback in the Vizard code that updates the viewpoint according to the Matlab data received. Is this correct?

If so, is there a particular place in the Vizard code where this callback should go?

I see that Vizard sends and receives via port 4950 by default. Not having the appropriate background for this forum, I’m afraid I don’t know what to do with that information. How would I make sure the position data I’m sending from Matlab goes to port 4950? I don’t understand the difference between specifying the port and specifying the IP address of the computer you want to talk/listen to. If users on the forum have the patience to explain, I would appreciate the help.

Finally, the help menu mentions a “Primer on Networking”, but the link to that primer isn’t active. Any suggestions about how to go forward with this set-up or other on-line resources I might tap into for this application?

Sincere thanks,
Rachel Brady

farshizzo 02-04-2008 06:23 PM

Vizards built-in network features will only work with other Python programs. If you want to communicate with non-Python programs, like Matlab, then you will need to use the Python socket library to send/receive data. The following link contains sample code showing how to do this in Vizard:

http://www.worldviz.com/forum/showthread.php?t=1126


All times are GMT -7. The time now is 05:47 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC