![]() |
|
|
|
#1
|
|||
|
|||
|
The vicon plug-in works with a protocol used by earlier versions of Tracker. You should be able to use vrpn to read body data from tracker in Vizard once you specify the correct VRPN source.
Code:
import viz
import vizact
import vizshape
viz.go()
VRPN_SOURCE = 'Tracker0@localhost'
viz.move([0,-1,-5])
axes = vizshape.addAxes(length=0.5)
vrpn = viz.add('vrpn7.dle')
headtracker = vrpn.addTracker(VRPN_SOURCE)
headtracker.swapPos([-1,3,-2])
viz.link(headtracker,axes)
def showData():
print headtracker.getPosition()
print headtracker.getEuler()
vizact.ontimer(1,showData)
|
|
#2
|
|||
|
|||
|
Hello Jeff,
thank your for your reply. First I used your code with 'Tracker0@192.168.10.1'. I thought Tracer0 referes to Vicon Tracker. Finally I tried to Import one Object I'm tracking with Tracker called Flasche (=bottle) instead of Tracker0. Now it works well. So I have to Import every object I want to use, separately? Code: import viz import vizact import vizshape viz.go() VRPN_SOURCE = 'Flasche@192.168.10.1' scene = viz.addChild('dojo.osgb') viz.move([0,-1,-5]) axes = vizshape.addAxes(length=0.5) vrpn = viz.add('vrpn7.dle') flasche = vrpn.addTracker(VRPN_SOURCE) flasche.swapPos([-1,3,-2]) viz.link(flasche,axes) def showData(): print flasche.getPosition() print flasche.getEuler() vizact.ontimer(1,showData) Thank you very much! ChrisMa |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Getting positional data from tracker | AySz88 | Vizard | 1 | 08-03-2011 04:22 PM |
| About using Vicon Tracker with world viz | llqqff | Vizard | 1 | 06-28-2010 10:28 AM |
| vicon pluglin - cluster problems | Andy | Vizard | 2 | 11-10-2009 02:04 AM |
| The problem of tracker using via VRPN | _kj_ | Vizard | 2 | 08-13-2009 01:03 AM |
| Integrating InertiaCube and Vicon data | roman_suvorov | Vizard | 10 | 05-20-2008 05:30 PM |