Panda VRPN & Kinect

I’m trying to connect a Kinect to Panda3D via VRPN using Panda’s VrpnClient.

I was wondering if anyone knows what I should expect to enter in the TrackerNode constructor for name of the device. I have tried a number of permutations between the VrpnClient and TrackerNode without successfully getting any transformation data from the TrackerNode.

I’m using the FAAST system which provides a VRPN server for the Kinect. The hostname is said to be “Tracker0@localhost” going by whats stated on their website.

So far I have tried the following combinations:

Server:“Tracker0@localhost”
Device Name:""

Server:“localhost”
Device Name:“Tracker0”

Server:“localhost”
Device Name:“sensor 0”

Server:“localhost”
Device Name:“0”

etc.

When I run vrpn_print_devices I do see the Kinect Tracker0 sending non-zero transformation data…so its there…I’m just not sure how to get Panda to see it.

My code currently is:

SERVERNAME="Tracker0@localhost"

client = VrpnClient(SERVERNAME)
tracker = TrackerNode(client, 'Tracker0')
print tracker.getPos()

Thanks.

Try adding your tracker node to the data graph:

base.dataRoot.node().addChild(tracker)

I believe (though I’m not 100% sure) that when you add the tracker to the data graph, the Vrpn client will then get polled every frame.

You can also try explicitly telling the client to poll:

client.poll()

Though, I’ve found that’s not necessary when you put the TrackerNode(s) into the data graph.

I’m also trying to use VRPN and Kinect as a tracker. Were you able to find the solution?