#1
|
|||
|
|||
ART SmartTrack and Vizard
Hello,
I'm using an ART SmartTrack system for position information on a controller. I'm attempting to get information on the button states and position/orientation of a FlyStick 2 controller using your vrpn7.dle extension. As far as I can tell, I have everything working on the ART side. I've setup output to the localcomputer using a UDP port of 5000 transmitting the flystick information with an id of 6df2. In Vizard, I'm trying your simple example code: Code:
import viz viz.go() vrpn = viz.add( 'vrpn7.dle' ) tracker = vrpn.addTracker('Tracker0@localhost') ************************************************** **************************** ** Loading ConnectionTest.py ************************************************** **************************** vrpn7.dle VRPN7 Extension ** NOTIFY: Connecting to VRPN tracker at '6df2@localhost' ** Load Time: 1.91 seconds VRPN Warning (3) from 6df2: No response from server for >= 3 seconds VRPN Warning (4) from 6df2: No response from server for >= 3 seconds VRPN Warning (5) from 6df2: No response from server for >= 3 seconds VRPN Warning (6) from 6df2: No response from server for >= 3 seconds What does the text in front of the ip address mean? Is this the ID in VRPN? I could hardly find any documentation in the Vizard manual about ART or how to go about connecting through VRPN. Any suggestions would be very helpful! ~George |
#2
|
|||
|
|||
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]) |
#3
|
|||
|
|||
Jeff, will give it a shot tonight. Thanks!
|
#4
|
|||
|
|||
Well, at this point I'm probably doing something incredibly basic and wrong.
Removed all firewalls. I have the software running and I ran a utility that allows me to receive the output (first image attached). I've tried searching online and reading though the documentation, lots of mentions about DTrack and ART and VRPN but no direct explanation of having the two interact... and unfortunately much like Lady Gaga, I don't speak German. Is there some form of middlewear I am missing to have this application output the data to VRPN format? I am running everything off a different computer this time (switched to Windows 7 from 8.1) I have a statically locked IP on the connection to the system, I know this isn't your system, so it is unfair to ask more but you tend to be more 'in the know' than most when it comes to these issues. Thank, ~George |
#5
|
|||
|
|||
Jeff,
Why are your coordinate system changes different from the WorldViz docs? You said: myFlystickTracker.swapPos([1,3,2]) myFlystickTracker.swapQuat([1,2,3,4]) While the docs says: #Negate Z value of position headTrkr.swapPos([1,2,-3]) #Negate X,Y value of quaternion headTrkr.swapQuat([-1,-2,3,4]) |
#6
|
|||
|
|||
I would suggest using the swapPos and swapQuat values from the docs. Most likely the values I posted there are incorrect. If you're still having issues with establishing the connection in Vizard please follow up in the support ticket we have going for this now.
|
#7
|
|||
|
|||
Solution to the problem for future interested parties:
1) Setup output in DTrack2 for the flystick or any other device you plan on using. 2) Setup the VRPN server. You can either download the windows binaries online or by registering your SmartTrack with A.R.T. they will provide a download location. 3) Edit the VRPN config file by searching for DTrack. You'll want to uncomment the following line: vrpn_Tracker_DTrack DTrack 5000 4) Start your DTrack2 and press the start button to begin tracking and trasmitting. 5) Start your VRPN Server 6) Connect to the VRPN Server using WorldViz Vizard at the following: Code:
device_label = "DTrack@" vrpn_source = device_label + ip_address vrpn = viz.add('vrpn7.dle') tracker = vrpn.addTracker( vrpn_source ) buttons = vrpn.addButton( vrpn_source ) joystick = vrpn.addAnalog( vrpn_source ) Still working on the proper orientations and making the device work the way I expect in Vizard. Code:
class FlyStick2: device_label = "DTrack@" #Button Layout #1 - Trigger #2 - Far Right #3 - Middle Right #4 - Middle Left #5 - Far Left #6 - Analog Push in def __init__(self, ip_address = 'localhost'): vrpn_source = self.device_label + ip_address vrpn = viz.add('vrpn7.dle') self.tracker = vrpn.addTracker( vrpn_source ) self.buttons = vrpn.addButton( vrpn_source ) self.joystick = vrpn.addAnalog( vrpn_source ) #Swap position and orientation to match Vizard's coordinate system self.tracker.swapPos([1,3,2]) self.tracker.swapQuat([1,2,3,4]) #The states of the controller button (are they down) self.button_states = [ False, False, False, False, False, False] self.analog_x = 0.0 self.analog_y = 0.0 viz.callback( viz.SENSOR_DOWN_EVENT, self.onButtonDown ) viz.callback( viz.SENSOR_UP_EVENT, self.onButtonUp ) viz.callback( viz.TIMER_EVENT, self.onTimer ) viz.starttimer( 0, 0.01, viz.PERPETUAL ) def onTimer(self, timer_id ): ''' Polls the analog and position information ''' self.analog_x, self.analog_y = self.joystick.getData()[0:2] #print self.analog_x, self.analog_y def onButtonDown(self, event): if event.object is self.buttons: #print 'onButtonDown', event.button self.button_states[event.button] = True def onButtonUp(self, event): if event.object is self.buttons: #print 'onButtonUp', event.button self.button_states[event.button] = False |
#8
|
|||
|
|||
Regarding ART Smart Track Camera+Vizard Integration
Hi Shivanangel,
I need your help on ART's Smart Track Camera+Vizard:- I have few questions which i have came across Pls help: 1)What is the actual setup of the ART SmartTrack+Vizard+DTrack2+ART Controller.? 2)Where will be all the softwares(Vizard and DTrack2) will be installed(System wise).? 3)I have installed DTRack2 v2.12.0,is there is any need for licensing and all functionalities like settings,calliberation,etc are not activated on Dtrack2? 4)What is ART Controller? and where it need to be installed? 5)Whats the connection topology(LAN) or system connections with different PC's? 6)I m confused with DTrack2 and ARTController,Whats the difference? 7)Where should vizard ,where shoul be Dtrack,where shoul be ARTController(if needed),Where and how should be the SMART Track camera be connected(Locally on vizard or on different system via LAN)? 8)How to add and integrate a (3d glass as head Tracker of ART )& (a Joystick of Logitech as a HandTrcker(not achieved) and as a input (i have achieved) of ART)? I have vrpn running on my vizard machine. What i need and what i want to achieve? -I need a demo working with ART integrated camera for Head Tracker(of ART) & Hand Tracker(Of ART). I know we have to use index in the DTrack,but how to add and where to add in Dtrack2? Request you to pls assist me for the above problems. Pls reply back with your answers and waiting for your reply. I have also attached the vizconnect for ur reference. Regards : Mr.Rajnish Vishwakarma VR Developer at Xenium Digital Pvt. Ltd,Mumbai,India If u fell do pls mail me on the my mail id -rajnish@xenium.in |
#9
|
|||
|
|||
Please contact support@worldviz.com for assistance. This type of system setup is beyond the scope of the forum.
|
|
|