#1
|
|||
|
|||
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 <viz>.preMultLinkable and <viz>.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. |
#2
|
|||
|
|||
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) |
#3
|
|||
|
|||
Jeff, you rock. Thanks.
|
|
|