Page 1 of 2

VRPN functionality

Posted: Mon Nov 05, 2007 6:54 am
by hpcv
I'm currently trying to get the Rigid Body toolkit to act as a VRPN server. It nicely opens port 3883 (TCP as well as UDP) as indicated in the program. I assume it exports VRPN tracker devices on that port, but there is no way to find out the name of these devices from the Rigid Body program. The VRPN library itself does also not provide a way to enumerate available devices on a server, as far as I can see.

I use the vrpn_print_devices.exe from the VRPN distribution, with the device address _DeviceName_@localhost. I tried several _DeviceName_s, like "GroundPlane" (the name of my rigid body), "OptiTrack" and "Tracker0" (used in many VRPN examples). All of them result in the following:

Code: Select all

> vrpn_print_devices.exe GroundPlane@localhost
Opened GroundPlane@localhost as: Tracker Button Analog Dial Warning/Error.
Press ^C to exit.
VRPN Warning
 (3) from GroundPlane: No response from server for >= 3 seconds
... more of this ...
 (9) from GroundPlane: No response from server for >= 3 seconds
VRPN Error
 (10) from GroundPlane: No response from server for >= 10 seconds
VRPN Error
... more of this, until I hit Ctrl+C.
When I launch the vrpn_server.exe application, configured with a null tracker, all is fine, so this is not a firewall issue. (And as you can see, everything is running on localhost anyway.) However, when using an incorrect device name, the response is the same as the one pasted above.

So, what is happening here? How do I find out the names of the devices? Is VRPN even fully implemented yet?

Thanks!

Re: VRPN functionality

Posted: Mon Nov 05, 2007 12:20 pm
by Jim
Hello:

Yes, VRPN is done. The name of the device is just the name of the Rigid Body you define.

Re: VRPN functionality

Posted: Fri Nov 16, 2007 2:23 pm
by beckdo
Email support and ask them for our sample VRPN application with source, and you can give it a try. You should be able to reproduce the VRPN behavior shown in the rigid body tutorial videos.

Re: VRPN functionality

Posted: Thu Dec 06, 2007 3:04 am
by hpcv
Got it to work already, thanks. The device name is indeed the same as the name of the rigid body -- I thought I had tried this, but apparently I made a typo or something. Good thing you have example code up now, it should make life easier for other VRPN users out there! :)

Re: VRPN functionality

Posted: Sun Dec 09, 2007 9:26 pm
by amir
Can anyone please tell more specific how to use the VRPN and the rigit body??? can i track a rigit bodys and get thier locations live?

Thanks

Re: VRPN functionality

Posted: Sun Dec 09, 2007 9:27 pm
by amir
Can anyone please tell more specific how to use the VRPN and the rigit body??? can i track a rigit bodys and get thier locations live?

Thanks

Re: VRPN functionality

Posted: Mon Dec 10, 2007 4:21 pm
by Birch
Yes, real-time streaming of Rigid Bodies is supported over VRPN. Streaming can be started by running the Rigid Body UI application and enabling it there, or by writing your own application and enabling streaming via the Rigid Body API.

You can find more specific details in the documentation here.

Re: VRPN functionality

Posted: Tue Dec 11, 2007 1:57 pm
by amir
Thank u for u response,,,

Can i stream from Regit Body to any program at C#, using the VRPN or at any other way?

Re: VRPN functionality

Posted: Tue Dec 11, 2007 2:14 pm
by beckdo
The way you're going to want to do this is by using [DllImport()] to import the functions you need directly from the DLL. We don't have an example of that yet, but I will make one soon. Please feel free to post questions here if you attempt this yourself.

Re: VRPN functionality

Posted: Tue Dec 11, 2007 9:23 pm
by amir
Ok i understand,thanks,

This is the way DllImport is made at c#, where do i find the DLL of VRPN? (vladi.solov@gmail.com if u have it)


using System.Runtime.InteropServices; // DllImport
public class MYNAME{
[DllImport("THE DLL FILE.Dll")]
public static extern void SetWindowText(int h, String s);
}