View Single Post
  #1  
Old 05-23-2007, 10:23 AM
TunTun TunTun is offline
Member
 
Join Date: May 2007
Posts: 16
question about yaw, pitch, roll

Hello

I have a question about the command <viewpoint>.rotate(x,y,z,angle). It's said x specifies yaw, y specifies pitch, and z specifies roll. Also viz.get(viz.HEAD_EULER) returns the same order.

my code is:
view = viz.get(viz.MAIN_VIEWPOINT)
view.rotate(1,0,0, 90)
pe = viz.get(viz.HEAD_EULER)
print 'orientation of viewpoint is at: ', pe[0], ', ', pe[1], ', ', pe[2]

It's supposed to change orientation in yaw (vertical axis), and get result (90.0, 0.0, 0.0). But my result is (0.0, 90.0, 0.0).

Then I tried other two directions:

If: view.rotate(0,1,0, 90)
then result is: (90.0, 0.0, 0.0)

If: view.rotate(0,0,1 90)
then result is: (0.0, 0.0, 90.0)

It seems the yaw and pitch values somehow switch each other. Only roll value is what I expected. Can anybody tell me what happened?

Thanks a lot.
Reply With Quote