WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rating: Thread Rating: 5 votes, 5.00 average. Display Modes
  #1  
Old 06-11-2014, 09:35 AM
shivanangel shivanangel is offline
Member
 
Join Date: Feb 2006
Location: New Jersey
Posts: 182
Question 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')
While the extension loads, I am unable to get a response from the device.

************************************************** ****************************
** 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
Reply With Quote
  #2  
Old 06-11-2014, 10:37 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
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
  #3  
Old 06-13-2014, 05:43 PM
shivanangel shivanangel is offline
Member
 
Join Date: Feb 2006
Location: New Jersey
Posts: 182
Jeff, will give it a shot tonight. Thanks!
Reply With Quote
  #4  
Old 06-13-2014, 08:22 PM
shivanangel shivanangel is offline
Member
 
Join Date: Feb 2006
Location: New Jersey
Posts: 182
Question

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
Attached Thumbnails
Click image for larger version

Name:	test1.png
Views:	2139
Size:	321.6 KB
ID:	648   Click image for larger version

Name:	test2.png
Views:	2113
Size:	100.7 KB
ID:	649  
Reply With Quote
  #5  
Old 06-14-2014, 04:10 PM
shivanangel shivanangel is offline
Member
 
Join Date: Feb 2006
Location: New Jersey
Posts: 182
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])
Reply With Quote
  #6  
Old 06-15-2014, 07:42 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
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.
Reply With Quote
  #7  
Old 06-16-2014, 07:43 AM
shivanangel shivanangel is offline
Member
 
Join Date: Feb 2006
Location: New Jersey
Posts: 182
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 )
7) Your VRPN server should have spit out some command line notification about Vizard connecting and eventually disconnecting.

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
Reply With Quote
  #8  
Old 06-18-2016, 05:37 AM
rajnishv rajnishv is offline
Member
 
Join Date: Jan 2016
Location: Kalina,Sanatcruz(East),Mumbai,Maharashtra,India
Posts: 94
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
Attached Files
File Type: zip vizconnect_config.zip (3.4 KB, 2015 views)
Reply With Quote
  #9  
Old 06-20-2016, 12:50 AM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
Please contact support@worldviz.com for assistance. This type of system setup is beyond the scope of the forum.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 08:18 AM.


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