WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   Position and Orientation tracking problem (https://forum.worldviz.com/showthread.php?t=2070)

Vic 06-03-2009 09:04 AM

Position and Orientation tracking problem
 
When I ran my Vizard program and tried to move around with the headset, it wasn't picking up the movement (both position and orientation). I went back and checked the PPT program to see whether the cameras were picking up the movement. They were able to pick up the movement. I'm suspecting it has something to do with my code. I was wondering what could be the cause of this and how it could be fixed.

Thanks,
Vic

GiudiceLab 06-09-2009 05:13 PM

Vic,
We use position and orientation tracking in our code. We use a function like this:

import viztracker

isense = viz.add('intersense.dls')
vrpn = viz.add('vrpn7.dle')

marker = vrpn.addTracker('PPT0@' + PPT_HOSTNAME,sensor=0)

view = viz.MainView

def checkHead():
ori = isense.get()
pos = marker.getPosition()
view.setEuler(ori[3],ori[4],ori[5])
view.setPosition(pos[0],pos[1],pos[2])
vizact.onupdate(0, checkHead)


But I'm sure there are other ways to accomplish the same thing, like using a timer callback.

We had trouble at first because we hadn't set PPT_HOSTNAME correctly. This should be the name of your PPT computer, which in Win XP you can find under the Properties if you right-click on My Computer.

Hope that it useful to you.


All times are GMT -7. The time now is 06:26 AM.

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