WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 08-26-2003, 08:45 AM
david david is offline
Member
 
Join Date: Mar 2003
Posts: 23
rotations in vizard



Hi, after trying some simple 90 deg rotations, I am a little puzzled. The help says that the order of rotations is pitch yaw and roll for euler angles. But when I use the .rotate command, the order that seems to happen is (according to the help file displaying the reference frame):
-for an geometry object, roll, yaw, pitch
-for viz.BODY_ORI, yaw, pitch, roll

seems to be happening in versions 1 and 2
Any thoughts?
Reply With Quote
  #2  
Old 08-26-2003, 04:58 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Hi,

All euler rotations in Vizard are yaw, pitch, roll. There seems to be a mistake in the documentation, sorry for the inconvenience. However, after reading your post I found that the roll for the BODY_ORI goes in the opposite direction. This will be fixed in the next release. Again, sorry for the confusion.
Reply With Quote
  #3  
Old 08-27-2003, 09:00 AM
tobin tobin is offline
WorldViz Team Member
 
Join Date: Feb 2003
Posts: 251
other Euler combinations

While Vizard uses the yaw, pitch, roll convention for its Euler angles, it's relatively easy to construct your own rotations based on any Euler order. To do so, one can use the "vizmat" matrices library that provides lots of matrix-based operations at the Python programming level.

Here's an example showing how to rotate an object in XYZ Euler order instead of YXZ (yaw, pitch, roll). This example rotates the object 10 deg along each axis:

import vizmat

b = viz.add('myobject.wrl')

X = vizmat.Transform()
X.makeIdent()
X.postRot(X, 1,0,0, 10.0/180*math.pi)
X.postRot(X, 0,1,0, 10.0/180*math.pi)
X.postRot(X, 0,0,1, 10.0/180*math.pi)

b.update(X)
Reply With Quote
  #4  
Old 08-31-2003, 03:04 PM
david david is offline
Member
 
Join Date: Mar 2003
Posts: 23
Thanks for your answers

this was helpfull, but I still have some interrogations:

When I use the following code:

import vizmat

my_view = viz.get(viz.MAIN_VIEWPOINT)
X = vizmat.Transform()
X.makeEuler(0,-90,0)
my_view.update(X)

I get what looks like a 90 degree pitch down (should not it be up?)

and if I use
X.makeEuler(90,0,0)
I get what looks like a roll, not a yaw

And finally when I use
X.makeEuler(0,0,90)
I get the yaw

Again, this is assuming the reference frame given in the help file:
user looking down Z axis, Y axis is up, X is on the side, but it is not consistent with what Farshizzo wrote (yaw,pitch,roll order, that I don't even get for an object, as I said before)




Last edited by david; 08-31-2003 at 05:02 PM.
Reply With Quote
  #5  
Old 09-02-2003, 09:14 AM
tobin tobin is offline
WorldViz Team Member
 
Join Date: Feb 2003
Posts: 251
Thanks again for pointing out this inconsistency. Since your earlier post, we have recognized that Vizard has a few inconsistencies with respect to Euler angle orders and that the vizmat libraries are "right-hand" whereas Vizard core commands are "left-hand". We intend to make all rotation commands clearly documented and self-consistent by release 2.11 (next week).

We appreciate your patience.
Reply With Quote
  #6  
Old 09-09-2003, 06:55 PM
david david is offline
Member
 
Join Date: Mar 2003
Posts: 23
that all makes sense

This could be why I was stuck on what I thought was a geometric problem. I feel a lot better, thanks.
Reply With Quote
  #7  
Old 02-23-2005, 11:05 PM
pkhoosh pkhoosh is offline
Member
 
Join Date: Feb 2005
Posts: 21
Send a message via AIM to pkhoosh Send a message via Yahoo to pkhoosh
Is the Vizard rotate still yaw, pitch, roll or was this fixed?
Reply With Quote
  #8  
Old 02-24-2005, 09:57 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Yes, Vizard uses yaw,pitch,roll order for euler angles.
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 11:23 AM.


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