PDA

View Full Version : get tracker position and euler


chris_user
06-19-2011, 11:58 PM
hello,

hope somebody knows a more simple solution to get the coordinates of the tracker and the orientation from the intersense.

my actual solution is to load the vizsetupcfg.py and use getPosition and getEuler form headpos and headori; to get that working I needed to modyfy the vizsetupcfg.py and set the first five lines of the createCustomComposite as a global. actually it is working but i'm quiet shure there must be a more elegant solution to this task. tips and hints are welcome.

thanks,

chris

Jeff
06-24-2011, 10:29 AM
Does the following work for you?
import viz
import viztracker
import vizact

viztracker.go()

tracker = viztracker.get('input0')

def printTrackerData():
print tracker.getEuler()
print tracker.getPosition()

vizact.ontimer(0,printTrackerData)

chris_user
07-01-2011, 01:31 AM
Thanks Jeff!

That's exactly what I needed.