WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Thread Tools Rate Thread Display Modes
Old 06-13-2016, 07:51 AM
dcnieho dcnieho is offline
Join Date: Feb 2011
Posts: 59
apply transformations on vizconnect link

Dear All,

As part of our experiment setup, we use a few link operations to, e.g., rotate the virtual world with respect to the physical world. This worked fine before when i imported my own trackers and manually linked them to the MainView. With vizconnect, I can't get this to work, I am probably abusing something or missing a priority setting.

This is the example code
headTrack = vizconnect.getTracker('head_tracker')
headLink  = headTrack.getLink()
posRotationOperator = headLink.postEuler([0,0,0], target=viz.LINK_POS_OP)

# if i now try to see if the view differs from the raw tracker output, i see it doesn't:
print tuple(headTrack.getPosition(viz.ABS_GLOBAL)) + tuple(headTrack.getPosition(viz.ABS_GLOBAL)))
print tuple(headLink.getPosition(viz.ABS_GLOBAL)) + tuple(headLink.getEuler(viz.ABS_GLOBAL)))
print tuple(viz.MainView.getPosition(viz.ABS_GLOBAL)) + tuple(viz.MainView.getEuler(viz.ABS_GLOBAL)))
All three lines above print exactly the same position and orientation, irrespective of what operations i have active on the link. Could you tell me how i can make this work again (the exact same code, but with my manually created link between the tracker and the mainview works fine). this is an up to date Vizard 5.

Reply With Quote
Old 06-14-2016, 04:29 AM
Jeff Jeff is offline
WorldViz Team Member
Join Date: Aug 2008
Posts: 2,466
The following line of code is a handle to the vizconnect wrapped tracker. This object wraps up the raw tracker object along with node3D and link objects. It also wraps up meta data associated with the tracker such as make, model, and DOF. The wrapped tracker data shows results after the link operations.

headTrack = vizconnect.getTracker('head_tracker')
You are getting the link correctly using the vizconnect API:

headLink  = headTrack.getLink()
headLink.postEuler([10,0,0], target=viz.LINK_POS_OP)
Use the following code to get a handle to the raw tracker:

rawTracker = headTrack.getRaw()
Does this help?
Reply With Quote
Old 06-14-2016, 06:11 AM
dcnieho dcnieho is offline
Join Date: Feb 2011
Posts: 59
Hi Jeff,

Yes, that was exactly the thing. thanks!
Reply With Quote

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
Switching between input devices setup in vizconnect and not using vizconnect JB_HP_Viz Vizard 1 01-20-2015 05:19 AM
Vizconnect Save As Dialog Jeff Vizard 0 05-01-2014 09:45 AM
Introducing a rotation offset into a link EnvisMJ Vizard 1 11-13-2013 05:51 AM
Link only one Axis Andy Vizard 7 06-18-2013 02:30 AM
Pre/Post transformations pattie Vizard 5 10-02-2006 04:20 PM

All times are GMT -7. The time now is 04:19 AM.

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