WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 01-23-2013, 08:49 AM
piyush piyush is offline
Member
 
Join Date: Jan 2013
Posts: 7
position tracking

i wrote following code for tracking position of ppt wand thru vrpn7 in vizard4
it is unable to track position but runs without any errors
import viz
viz.go()

piazza = viz.addChild('maze.osgb')
viz.MainView.move([3,2,8])

vrpn = viz.add('vrpn7.dle')
posTracker = vrpn.addTracker('PPT0@WORLDVIZ-PC',0)

#Connect to Intersense on local machine running Vizard
isense = viz.add('intersense.dle')
oriTracker = isense.addTracker()

#Create a 6DOF tracker by merging position data from PPT with
#Orientation data from Intersense
headTracker = viz.mergeLinkable(posTracker,oriTracker)

#Link viz.MainView with headTracker
headlink = viz.link(headTracker, viz.MainView)

#Once the user is facing PPT north pressing the 'r' key will align
#Intersense's coordinate system with PPT's coordinate system
vizact.onkeydown ('r', oriTracker.reset)
data=headlink.getData()
print data
Reply With Quote
  #2  
Old 01-23-2013, 11:35 AM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
How many markers are being streamed from PPT? What is the marker number for the wand?
Reply With Quote
  #3  
Old 01-23-2013, 10:25 PM
piyush piyush is offline
Member
 
Join Date: Jan 2013
Posts: 7
two markers... numbered 0 and 1
Reply With Quote
  #4  
Old 01-24-2013, 05:27 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
It looks like your code is just getting a handle to VRPN sensor 0, which corresponds to marker 1 in PPT Studio.

If you add the following code to your script do you see the axis model move with the wand:
Code:
import vizshape
axis =vizshape.addAxes(length=0.1)
wandTracker = vrpn.addTracker('PPT0@WORLDVIZ-PC',1)
viz.link(wandTracker,axis)
Reply With Quote
  #5  
Old 01-24-2013, 09:19 PM
piyush piyush is offline
Member
 
Join Date: Jan 2013
Posts: 7
No..it still doesnt work.
Why dont we first try for only one tracker.
Assist the required changes for only one tracker as a start, rest can b added in similar way
Reply With Quote
  #6  
Old 01-25-2013, 12:13 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
Are you getting data from PPT?
Code:
import viz
import vizact

viz.go()

vrpn = viz.add('vrpn7.dle')
posTracker = vrpn.addTracker('PPT0@WORLDVIZ-PC',0)

def showData():
	print posTracker.getPosition()
	
vizact.ontimer(1,showData)
Reply With Quote
  #7  
Old 01-27-2013, 09:44 PM
piyush piyush is offline
Member
 
Join Date: Jan 2013
Posts: 7
Response after working previous code
(46) from PPTO : no response from server for 10 sec
[0.0,0.0,0.0]
Vrpn error
Vrpn_endpoint :send error reports() no TCP connection
Reply With Quote
  #8  
Old 01-28-2013, 10:28 AM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
Make sure the machines can ping each other. If that is successful, disable any firewall or virus scanner. That could block the communication.
Reply With Quote
  #9  
Old 01-28-2013, 11:46 AM
piyush piyush is offline
Member
 
Join Date: Jan 2013
Posts: 7
Ping test already done...n all firewall and virus scanners are disabled
Reply With Quote
  #10  
Old 01-29-2013, 11:01 AM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
Make sure the VRPN7 output plugin is loaded and Talk is enabled in PPT Studio. If that's set up correctly please contact support@worldviz.com and we'll help troubleshoot further.
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
MotionStar Position Tracking starlingstm Precision Position Tracker (PPT) 2 06-14-2011 01:39 PM
tracking position of cursor sl0bz Vizard 3 06-15-2009 01:52 PM
Position and Orientation tracking problem Vic Vizard 1 06-09-2009 05:13 PM
position tracking with patriot pgagolf Vizard 4 04-19-2007 04:42 AM
PPT vs. VPRN - Position Tracking not Working tmcw Precision Position Tracker (PPT) 21 02-27-2007 03:19 PM


All times are GMT -7. The time now is 12:14 PM.


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