WorldViz User Forum rotations in vizard
 Register FAQ Search Today's Posts Mark Forums Read

#1
08-26-2003, 08:45 AM
 david 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?
#2
08-26-2003, 04:58 PM
 farshizzo 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.
#3
08-27-2003, 09:00 AM
 tobin 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

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)
#4
08-31-2003, 03:04 PM
 david Member Join Date: Mar 2003 Posts: 23

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.
#5
09-02-2003, 09:14 AM
 tobin 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).

#6
09-09-2003, 06:55 PM
 david 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.
#7
02-23-2005, 11:05 PM
 pkhoosh Member Join Date: Feb 2005 Posts: 21
Is the Vizard rotate still yaw, pitch, roll or was this fixed?
#8
02-24-2005, 09:57 AM
 farshizzo WorldViz Team Member Join Date: Mar 2003 Posts: 2,849
Yes, Vizard uses yaw,pitch,roll order for euler angles.

 Thread Tools Display Modes Rate This Thread Linear Mode Rate This Thread: 5 : Excellent 4 : Good 3 : Average 2 : Bad 1 : Terrible

 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 Rules
 Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home Announcements Vizard Precision Position Tracker (PPT) Plug-in development

All times are GMT -7. The time now is 01:26 PM.