0

I am currently attempting to use the Virtual Reality Peripheral Network (VRPN) to connect a NDI Polaris Spectra optical tracking device to the Vizard VR software. The ultimate goal is to use the device for head and tool tracking.
The software that comes with the Polaris works correctly, tracking the rigid bodies packaged with the device with sub-milimeter accuracy. VRPN claims to support the Polaris tracking device and Vizard includes a VRPN plugin. However, when I use VRPN to interface with the Polaris, the tracking data reported by VRPN seems to vary significantly, even when both the rigid body and the Polaris are connected to tripods.

To use VRPN with the Polaris, I edited the vrpn.cfg file, adding the following, uncommented lines:

vrpn_Tracker_NDI_Polaris polaris COM2 1 
../NdiToolDefinitions/8700449.rom

(I have confirmed that the Polaris device is connected to COM2. There is only one rigid body to be tracked, which is described by the 8700449.rom file. I also confirmed with the NDI sofware that comes with the Polaris that this is the correct file for the rigid body that I am attempting to track.)

I then run the vrpn_server.exe program, which reports the following:

DEBUG Tracker_NDI_Polaris: num of rigidbodies 1
DEBUG Tracker_NDI_Polaris: filename >../NdiToolDefinitions/8700449.rom<
connected to NDI Polaris at default 9600 baud on device:COM2.
done
VRPN_Tracker_NDI_Polaris: Switching NDI to higher baud rate, and then
reopening
com port at higher rate...done

In accordance with the VRPN wiki, I test that the tracking is working correctly by running vrpn_print_devices.exe in another cmd window:

> vrpn_print_devices.exe polaris@localhost

Opened polaris@localhost as: Tracker Button Analog Dial Text.
Press ^C to exit.

Tracker polaris@localhost, sensor 0:
        pos ( 0.07, 0.91, 0.00); quat (0.00, 0.01, 0.01, 0.00)
Tracker polaris@localhost, sensor 0:
        pos ( 0.07, 0.91, 0.01); quat (0.00, 0.01, 0.01, 0.00)
Tracker polaris@localhost, sensor 0:
        pos ( 0.08, 0.90, 0.00); quat (0.00, 0.01, 0.01, 0.00)
Tracker polaris@localhost, sensor 0:
        pos ( 0.11, 0.92, 0.99); quat (0.00, 0.01, 0.01, 0.00)
Tracker polaris@localhost, sensor 0:
        pos ( 0.05, 0.92, 0.01); quat (0.00, 0.01, 0.01, 0.00)

These jumps in position are very large, if I understand correctly that the scale here is in meters. (I should also note that the data printed by vrpn_print_devices.exe is truncated.)
Since the NDI software that came with the Polaris tracks the same rigid body very accurately, I am assuming that the jumps in position are not due to enviornmental factors (like IR light sources in the room, etc.). The rigid body is using the passive, retroreflective tracking dots NDI provides. I am currently running VRPN on Windows 7.
While I suspect that the problem is VRPN-relatred, it is also possible that Vizard’s VRPN pluing is not correctly reading data from VRPN. This is the Vizard (python) code I used for linking the tracked object to the main viewpoint. 

import viz
viz.go()

# add enviornment
viz.addChild('gallery.osgb')

# add tracker
vrpn = viz.add('vrpn7.dle')
tracker = vrpn.addTracker('polaris@localhost')
tracker.waitForConnection()

# link tracker to view
view = viz.MainView
viz.link(tracker,view)

However, it seems like this is a problem originating from VRPN. Is there any configuration I missed or reason for such inaccurate tracking?
Thanks!

Edit: Is it possible that VRPN is assuming the wrong little/big endian encoding?

Evan
  • 1
  • 4
  • you should ask this question on the vizard forum, you'll get help from people who are very familiar with the topic. Are you 100% sure the units are meters and not millimeters? – willpower2727 Jun 29 '16 at 18:17
  • http://forum.worldviz.com/forumdisplay.php?f=17 – willpower2727 Jun 29 '16 at 18:17
  • I did also pose the question on the WorldViz forum and the VRPN GitHub. I am fairly sure that the units are meters, as the VRPN wiki reports, " Positions from all trackers in VRPN are reported in meters." – Evan Jun 29 '16 at 18:26
  • Have you tried moving the object around while printing the pos and quat data to verify the units are meters? – willpower2727 Jun 29 '16 at 18:33
  • I have tried moving it around, but it's difficult to confirm the scale, since the numbers in Vizard don't seem to quite match up with the real displacements. For example, I just measured the rigid body's location at two positions, where [x,y,z] are given relative to the position of the Polaris tracking unit. Position 1 was (in mm) [19.6,18.9,-1923.5] from the tracker, and position 2 was [1.5, 15.4, -1321.5]. Those numbers are what the polaris gives as xyz displacements, but I confirmed them with a tape measure. – Evan Jun 29 '16 at 20:12
  • Calling tracker.getPosition() in Vizard, however, returns [0.59,0.59,0.94] and [0.41,0.51,0.46] for positions 1 and 2, respectively. – Evan Jun 29 '16 at 20:14

0 Answers0