View Single Post
  #2  
Old 06-09-2009, 05:13 PM
GiudiceLab GiudiceLab is offline
Member
 
Join Date: May 2009
Location: Orono, ME
Posts: 49
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.
Reply With Quote