WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 05-31-2005, 10:16 AM
jfreeman jfreeman is offline
Member
 
Join Date: May 2005
Posts: 5
tracking using quaternarion data

We are trying to do head tracking with Vizard 2.51 and a Hiball tracker, and we're having trouble getting the code to work. We tried using the automatic tracking (the viz.tracker() command), but it doesn't update position data at all and the orientation is way off, with at least one of the axes reversed.

As a potential solution, we tried doing manual tracking. We were able to track the head position fine, but we are still having trouble with the head orientation. The problem seems to be that our Hiball tracker only outputs quaternion orientation data instead of Euler, and we don't know how to use quaternion data to update the head orientation. The viz.rotate command appears to only work with Euler data.

We would appreciate help getting either: code that would enable us to use the quaternion data directly to update the head orientation, or code that would covert the quaternion data to Euler (we found the function EulerToQuat, but we can't find a function to convert Quat to Euler). Or, if you have any other ideas, please let us know. Thanks!
Reply With Quote
  #2  
Old 05-31-2005, 11:06 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Hi,

Which sensor are you using to connect to the Hiball tracker? To rotate a viewpoint manually you first need to get a handle to the main viewpoint.
Code:
view = viz.get(viz.MAIN_VIEWPOINT)
view.rotatequat(quat)
Reply With Quote
  #3  
Old 06-01-2005, 08:48 AM
jfreeman jfreeman is offline
Member
 
Join Date: May 2005
Posts: 5
We are using the vrpn.dls sensor. The code you gave us ended up working, but we had to switch around some of the data input, and make some of it negative, to get the view.rotatequat() command to work. We'll still not sure why, but it did end up working. Thanks for your help.
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 10:47 PM.


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