WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 09-02-2003, 01:21 PM
duda duda is offline
Member
 
Join Date: Sep 2003
Location: Cambridge, MA
Posts: 8
vizard rotations

Is there a command in Vizard that allows you rotate with respect to an inertial frame? e.g. if viz.rotate(0, 10, 0) is performed, and then viz.rotate(0, 15, 0) is performed, the end result is a 25-degree pitch. However, I'd like the end result to be a 15-degree pitch.

I'd like to take head-tracker sensor data, perform some operations on it, and then use the viz.rotate command to update the view. Currently, there is an instability because rotations are performed on top of rotations.

Thanks for your help!
Reply With Quote
  #2  
Old 09-02-2003, 01:32 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Hi,

The viz.rotate command rotates the BODY_ORI by the given amount, relative to its current rotation. If you want to rotate the BODY_ORI with an absolute rotation there are two ways of doing it.

Method 1
Reset the body ori to zero and perform the rotation
Code:
viz.reset(viz.BODY_ORI)
viz.rotate(0,15,0)
Method 2
Get access to the main viewpoint object and call its rotate function which performs the rotation in absolute space.
Code:
view = viz.get(viz.MAIN_VIEWPOINT)
view.rotate(0,15,0,'',viz.BODY_ORI)
Hope this helps
Reply With Quote
  #3  
Old 09-03-2003, 08:12 AM
duda duda is offline
Member
 
Join Date: Sep 2003
Location: Cambridge, MA
Posts: 8
When I use the view.rotate() command as you listed in Method 2, I get the following error:

TypeError: rotate() takes at most 5 arguments (6 given)


Reply With Quote
  #4  
Old 09-03-2003, 09:43 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Hi,

I believe you have an older version of Vizard, the latest version is 2.10. Go to the Help menu and click "About Vizard", the version number should be in the upper left corner. The latest version is available for download from the website. Sorry about the inconvenience.
Reply With Quote
  #5  
Old 09-03-2003, 02:16 PM
duda duda is offline
Member
 
Join Date: Sep 2003
Location: Cambridge, MA
Posts: 8
Yes, I was using v1.097 when I got that previous error. The commands do work in v2.10, however, to get a pitch I need to use viz.rotate(0, 0, x, ' ', viz.BODY_ORI). It appears that the order is Yaw, Roll, Pitch, not the Y-P-R that is defined in the Vizard Euler rotations.
Reply With Quote
  #6  
Old 09-03-2003, 02:31 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
That's strange...

Over here it's working fine. I know we've fixed a few problems with rotations recently, but that should have always been working. We will be releasing 2.11 soon, so if you're still having this problem then downloading that will most likely fix it.
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 06:55 AM.


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