PDA

View Full Version : simple VRPN question


mjabon
07-23-2009, 12:57 PM
Hello. We have a problem doing the most simple thing with VRPN, which is tracking just one light on the head to move you through the world. In our old code we simply wrote:

viz.go(viz.PROMPT | (viz.HMD + viz.STEREO + viz.TRACKER))
if viz.get(viz.TRACKER):
PORT_PPT = 1
viz.cursor(viz.OFF)
viz.mouse(viz.OFF)
ppt = viz.add('vizppt.dls')
#Average over 5 samples
ppt.command(5,'',5)
isense = viz.add('intersense.dls')
viz.tracker()
#Set eyeheight to zero since we are getting it from the tracker
viz.eyeheight(1.9)

That is all we had to do.

I tried replacing it with this:

vrpn = viz.add('vrpn7.dle')
ppt = vrpn.addTracker('PPT0@HOSTNAME', 0)

Where hostname is the ip of our PPT machine. However, nothing tracks - ie the person does not move through the world. We don't get errors, the person just does not move.

Any ideas?
Maria

Jeff
07-23-2009, 04:06 PM
Could you show the code you use to link the VRPN tracker to the viewpoint?

What happens when you just try to print out the data in a timer function?
def showData():
data = tracker.getData() # Access the raw data
print data # Print the array of data

vizact.ontimer(0, showData)

mjabon
08-25-2009, 10:12 PM
We get data, it just does not move the person in the world. Does anyone have a simple script they could share that uses VRPN with 1 light on an HMD?