View Single Post
Old 12-07-2009, 12:32 PM
nitao nitao is offline
Join Date: Nov 2009
Posts: 3
question about IS-900 wand


I am new to Vizard, and our lab is starting using Vizard for a project. I have trouble with getting the IS-900 wand work. I followed the tutorial and wrote a small program. The tracker works, but I cannot retrieve the data from the joystick or buttons on the wand. The script is as follows:

import viz


#Add environment

#Add the intersense plugin
tracker1 = viz.add('intersense.dls')
tracker2 = viz.add('intersense.dls')

# This function will grab the tracker data and update the viewpoint
def UpdateView():

#Get tracker euler rotation
yaw,pitch,roll = tracker2.getEuler()

#Only rotate the yaw of the body orientation

#Call UpdateView function every frame

#The current value of the analog joystick of the IS-900 is located at index 8,9.
#Index 8 represents the X-axis of the joystick and ranges between -1 to 1.
#Index 9 represents the Y-axis of the joystick and ranges between -1 to 1.

data = tracker2.getData()
print data[8], data[9]

state = int(tracker2.getData() [7])
if state & 1:
print 'Button 1 is down'

#Rest tracker when 'r' key is pressed

tracker1 is the head tracker connected to the station 1, and the wand station 2.

Can anyone tell me what's wrong, either with the code or the hardware setup?

Reply With Quote