WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Precision Position Tracker (PPT) (https://forum.worldviz.com/forumdisplay.php?f=9)
-   -   simple VRPN question (https://forum.worldviz.com/showthread.php?t=2182)

mjabon 07-23-2009 12:57 PM

simple VRPN question
 
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:

Code:

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:

Code:

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?
Code:

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?


All times are GMT -7. The time now is 12:38 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC