WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   Link PhaseSpace and InertialLabs (https://forum.worldviz.com/showthread.php?t=4591)

teklab 05-17-2013 07:38 AM

Link PhaseSpace and InertialLabs
 
Hello all,

I am running Vizard with a Sony HMZ-T1 with an attached Inertial Labs OS3D sensor and a Phase Space motion capture setup. I have the MainView orientation linked to the Inertial Labs sensor with the following method:

#InertialLabs Sensor Setup
InertialLabs = viz.add('InertialLabs.dle')
sensors =InertialLabs.addSensorBus(workset=0,port=6)

# Get handle to first sensor
sensor1 = sensors[0]

def updateView():
euler = sensor1.getEuler()


viz.MainView.setEuler(euler[0], euler[2], euler[1]*(-1))

vizact.ontimer(0,updateView)


I have PhaseSpace functioning as well.

I would like to link the MainView position to a Phase Space marker, and have seen forum references to both .preMultLinkable and .mergeLinkable as possible routes. Unfortunately, I'm having a bit of a hard time understanding exactly how to implement the commands.



Any help or advice would be much appreciated.

Jeff 05-17-2013 03:15 PM

You can use the viz.mergeLinkable command for this:
Code:

#InertialLabs Sensor Setup
InertialLabs = viz.add('InertialLabs.dle')
sensors =InertialLabs.addSensorBus(workset=0,port=6)
# Get handle to first sensor
oriTracker = sensors[0]

#Connect to phasespace server at specified IP address
phasespace = viz.add('phasespace.dle',0,'192.168.0.114')
#Add first marker
posTracker = phasespace.addMarker()

#create 6DOF tracker from two trackers
headTracker = viz.mergeLinkable(posTracker,oriTracker)
#link the viewpoint to the headtracker
viz.link(headTracker,viz.MainView)


teklab 05-20-2013 11:12 AM

Jeff, you rock. Thanks.


All times are GMT -7. The time now is 03:39 AM.

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