PDA

View Full Version : IS-900 Wand linking Problems


Kaminski
05-16-2011, 01:33 PM
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:

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.