WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 05-17-2013, 07:38 AM
teklab teklab is offline
Member
 
Join Date: May 2013
Posts: 6
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.
Reply With Quote
  #2  
Old 05-17-2013, 03:15 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,457
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)
Reply With Quote
  #3  
Old 05-20-2013, 11:12 AM
teklab teklab is offline
Member
 
Join Date: May 2013
Posts: 6
Jeff, you rock. Thanks.
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


All times are GMT -7. The time now is 05:29 PM.


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