VRPN functionality

hpcv
Posts: 58
Joined: Tue Oct 23, 2007 2:09 pm

VRPN functionality

Post by hpcv » Mon Nov 05, 2007 6:54 am

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!

Jim
NaturalPoint Employee
NaturalPoint Employee
Posts: 1395
Joined: Mon Oct 14, 2002 5:00 am
Location: Corvallis, Oregon
Contact:

Re: VRPN functionality

Post by Jim » Mon Nov 05, 2007 12:20 pm

Hello:

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

beckdo
NaturalPoint Employee
NaturalPoint Employee
Posts: 519
Joined: Tue Jan 02, 2007 2:02 pm

Re: VRPN functionality

Post by beckdo » Fri Nov 16, 2007 2:23 pm

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.

hpcv
Posts: 58
Joined: Tue Oct 23, 2007 2:09 pm

Re: VRPN functionality

Post by hpcv » Thu Dec 06, 2007 3:04 am

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! :)

amir
Posts: 11
Joined: Wed Oct 31, 2007 11:12 am

Re: VRPN functionality

Post by amir » Sun Dec 09, 2007 9:26 pm

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

amir
Posts: 11
Joined: Wed Oct 31, 2007 11:12 am

Re: VRPN functionality

Post by amir » Sun Dec 09, 2007 9:27 pm

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

Birch
Posts: 1139
Joined: Thu Jan 30, 2003 5:00 am
Location: Corvallis, Oregon

Re: VRPN functionality

Post by Birch » Mon Dec 10, 2007 4:21 pm

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.

amir
Posts: 11
Joined: Wed Oct 31, 2007 11:12 am

Re: VRPN functionality

Post by amir » Tue Dec 11, 2007 1:57 pm

Thank u for u response,,,

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

beckdo
NaturalPoint Employee
NaturalPoint Employee
Posts: 519
Joined: Tue Jan 02, 2007 2:02 pm

Re: VRPN functionality

Post by beckdo » Tue Dec 11, 2007 2:14 pm

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.

amir
Posts: 11
Joined: Wed Oct 31, 2007 11:12 am

Re: VRPN functionality

Post by amir » Tue Dec 11, 2007 9:23 pm

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);
}

Post Reply