View Single Post
  #2  
Old 06-11-2014, 09:37 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,466
Try using 'DTrack' for the server name. Let us know if this helps.

Code:
TRACKER_MACHINE = "localhost"
VRPN_SOURCE	= "DTrack@" + TRACKER_MACHINE

# VRPN Tracker connection (to ART Dtrack)
vrpn = viz.add('vrpn7.dle')
myHeadTracker = vrpn.addTracker(VRPN_SOURCE)	    #Default sensor is 0. Head tracker is on DTrack sensor 0
myFlystickTracker = vrpn.addTracker(VRPN_SOURCE,2)	#Flystick tracker is on DTrack sensor 2
myFlystickButtons = vrpn.addButton(VRPN_SOURCE)	    #Flystick buttons
myFlystickJoystick = vrpn.addAnalog(VRPN_SOURCE)	#Flystick analog thumb joystick

#Swap position and orientation to match Vizard's coordinate system
myHeadTracker.swapPos([1,3,2])
myHeadTracker.swapQuat([1,2,3,4])
# Also for the flystick tracker
myFlystickTracker.swapPos([1,3,2])
myFlystickTracker.swapQuat([1,2,3,4])
Reply With Quote