WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   IS-900 Wand linking Problems (https://forum.worldviz.com/showthread.php?t=3747)

Kaminski 05-16-2011 01:33 PM

IS-900 Wand linking Problems
 
Hi All,
I am having trouble trying to link my IS-900 wand to a 3d node. When I print the orientation data from the wand it seems normal, but when I have a shape linked to the tracker the pitch, yaw, and roll seem to be reversed and not centered properly. Here is some example code:

Code:

cylinder = vizshape.addCylinder()
cylinder.color( viz.RED)

isense = viz.add('intersense.dle')
tr1 = isense.addTracker( port=4, station=1 )
tr2 = isense.addTracker( port=4, station=2 )

main = viz.link(tr1,viz.MainView)
cyl = viz.link(tr2,cylinder)

def printPos():
    print "cylPos ",cyl.getPosition()
    print "cylEul ",cyl.getEuler()
vizact.onkeydown( 'p' , printPos)

I have tried putting 'cylinder.center(tr2.getPosition()) before I link them. I have tried 'cyl.swapEuler' a few different ways but nothing seems right. I don't understand how the output euler can seem correct but the node could be way off. Any ideas?

Jeff 05-16-2011 03:56 PM

Does it look fine when you link the viewpoint to the tracker?

Kaminski 05-17-2011 08:05 AM

Yes, linking the wand to the viewpoint results in normal viewpoint control.

Kaminski 05-17-2011 09:39 AM

I fixed it in the process of simplifying my code. I wish I could say how -- thanks anyway.


All times are GMT -7. The time now is 10:34 AM.

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