WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   get tracker position and euler (https://forum.worldviz.com/showthread.php?t=3803)

chris_user 06-19-2011 11:58 PM

get tracker position and euler
 
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?
Code:

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.


All times are GMT -7. The time now is 10:41 PM.

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