OptiTrack - VRPN and Virtools

Post Reply
s.chaplain
Posts: 10
Joined: Fri Sep 12, 2008 1:22 am

OptiTrack - VRPN and Virtools

Post by s.chaplain »

Hello,

I'm exploring the tracking capabilities of OptiTrack. I saw that it can be used by the Virtools's VRpack.

I had a few questions about this :
- Are there any documents (tutorials) somewhere describing the way to use the tracker ?
- We only found a sample c++ file about the vrpn use. Do we have to code our tracking system ?
- The tracker seems to use the Rigid Body Toolkit. Do we have to purchase this toolkit to use tracking with Virtools ?

Thank you for the answers.
Regards.
S.CHAPLAIN
Birch
Posts: 1139
Joined: Thu Jan 30, 2003 5:00 am
Location: Corvallis, Oregon

Re: OptiTrack - VRPN and Virtools

Post by Birch »

I'm not entirely sure what you mean by "the tracker", I think you mean the Rigid Body toolkit?

The toolkit provides 3D tracking of rigid bodies using multiple OptiTrack cameras. It supports exporting the tracked rigid body data through VRPN (and NatNet and trackd).

Here is a link to a discussion about configuring VRPN in Virtools, for use with the Rigid Body toolkit.

http://lists.unc.edu/read/messages?id=4648465
uni_barbara
Posts: 3
Joined: Thu Oct 21, 2010 1:47 pm

Re: OptiTrack - VRPN and Virtools

Post by uni_barbara »

[quote=NaturalPoint - Birch]
The toolkit provides 3D tracking of rigid bodies using multiple OptiTrack cameras. It supports exporting the tracked rigid body data through VRPN (and NatNet and trackd).

Here is a link to a discussion about configuring VRPN in Virtools, for use with the Rigid Body toolkit.

http://lists.unc.edu/read/messages?id=4648465 [/quote]

I resume this topic because I have the same problem to solve. I'm using Virtools 5.0 and I've configured config files needed to implement the comunication between Optitrack and Virtools. Optitrack acts as a server, and I verified it works fine. A test file in Virtools (vrpn_print_devices.exe)shows data correctly transmitted. But when I try to use the vrpn_server.exe (that really is used in VR environment to connect virtools, the client, to Optitrack, the server), an error message appears ("vrpn server: Unknown Device: vrpnTracker
Could not start generic server, exiting
All devices closed...
Deleted server and connection, Exiting").

@ link posted by NaturalPoint - Birch the config file is not reported, so I can not compare my own cfg file with the correct one.
Have you some suggestions?
Thanks in advance.
VincentG
Posts: 7728
Joined: Mon Jul 17, 2006 5:00 am
Location: Corvallis, Oregon

Re: OptiTrack - VRPN and Virtools

Post by VincentG »

So are you running both the TT software, and a seperate VRPN server exe?
uni_barbara
Posts: 3
Joined: Thu Oct 21, 2010 1:47 pm

Re: OptiTrack - VRPN and Virtools

Post by uni_barbara »

[quote=NaturalPoint - Vincent]So are you running both the TT software, and a seperate VRPN server exe? [/quote]

Optitrack Tracking Tools and Virtools 5.0 are running. The VRPN_server.exe is a Virtools file used to read data (via vrpn) from a server (configurated in a separated file with extension cfg) - Optitrack in this case-and to communicate it to client side (virtools).
beckdo
Posts: 520
Joined: Tue Jan 02, 2007 2:02 pm

Re: OptiTrack - VRPN and Virtools

Post by beckdo »

When you create a rigid body in the Tracking Tools, the name of the tracked object is based on it's Trackable Properties. So in theory, you should be able to go into the properties of the Rigid Body, set the name to what you want it to be exposed as in VRPN, then enable VRPN streaming in the Tracking Tools and connect to the VRPN server that the Tracking Tools has spawned and look for the trackable by it's name.

Not being an expert on the vrpn_server.exe, I can't tell you how to use it, but what I did provide was an explanation of what is occurring on the Tracking Tools side.
uni_barbara
Posts: 3
Joined: Thu Oct 21, 2010 1:47 pm

Re: OptiTrack - VRPN and Virtools

Post by uni_barbara »

Problem solved. I try to explain it, if someone else needs to integrate Virtools 5.0 and Optitrack (with TT 2.0).
In Virtools VR Library User Guide is explained how to set some files used by Virtools to connect himself to a server (running on a host, that can be also the same pc running Virtools client).
First we start VRPN streaming in TT, and we give Tackable1 (without spacing) name to tracked rigid body,then we have to
configure some files in Device Server folder (under Program files (x86)\3DVIA\Virtools 5.0\VRPack). More precisely vrpn_Optitrack.cfg as follows:
vrpnTracker Trackable1@dtmUser-PC
neutralPosition 0.030 -1.5 -0.3
neutralQuaternion 0.5 0.5 -0.5 0.5
axisPermute 0 1 2
axisSign 1 1 1
trackerScale 1
and startVrpnOptitrack.bat as follows:
vrpn_server.exe -f vrpn_Optitrack.cfg -v -millisleep 0 3883
Running the second one, we see that connection with the server (optitrack) is not possible because vrpnTracker in vrpn_Optitrack.cfg is an unknown device command.
In VR Library User Guide is claimed that "If all peripherals seems fine in the server text log window (no error message), go to the next section. If not review your connections and settings." Besides if you try to run C:\Program Files (x86)\3DVIA\Virtools 5.0\VRPack\DeviceServer\Utils\vrpn_print_devices.exe (a test application of Virtools testing if server can be recognized from Virtools side) in cmd.exe of windows using the sintax following:
vrpn_print_devices.exe -nobutton -noanalog -nodial vrpnTracker Trackable1@dtmUser-PC
we can see data streaming going from Optitrack correctly recognized as tracker device!!!!
So we obtained two opposite test results.
Hence we decided to try configuring client BBs in Virtools anyway(as in VRPack\Calibration\vrpnCalib.cmo): we edit VRPack\SystemConfig\VRDevice.cfg needed from Virtools client using the same lines written in vrpn_Optitrack.cfg, then we play vrpnCalib.cmo: the communication is working fine!!
So the problem is in vrpn_server.exe (used to test communication as specified in virtools documentation), retrieving a wrong error message: this test gives an unreliable result.
Remember to use calibration procedure explained in VRdoc to set properly neutralPosition,neutralQuaternion,axisPermute,axisSign token in VRDevice.cfgcopy and to copy VRPack.cfg file in the same folder of your client composition before running it.
Good luck!
Post Reply