#1




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




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




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 matrixbased 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) 
#4




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; 08312003 at 05:02 PM. 
#5




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 "righthand" whereas Vizard core commands are "lefthand". We intend to make all rotation commands clearly documented and selfconsistent by release 2.11 (next week).
We appreciate your patience. 
#6




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




Is the Vizard rotate still yaw, pitch, roll or was this fixed?

#8




Yes, Vizard uses yaw,pitch,roll order for euler angles.

Thread Tools  
Display Modes  Rate This Thread 

