WorldViz User Forum question about yaw, pitch, roll
 User Name Remember Me? Password
 Register FAQ Search Today's Posts Mark Forums Read

#1
05-23-2007, 10:23 AM
 TunTun 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)
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.
#2
05-23-2007, 10:30 AM
 farshizzo WorldViz Team Member Join Date: Mar 2003 Posts: 2,849
Those values are correct. The command view.rotate(1,0,0, 90) will rotate the view 90 degrees along the x-axis, which represents the pitch in euler angles.
#3
05-23-2007, 12:46 PM
 Jerry Member Join Date: Jun 2004 Posts: 105
That's always bothered me too. Yaw is rotation about the y axis.

If you do it this way:

view.rotate(1,0,0,90)

the Eulers come back 0,90,0

but if you do it this way:

view.rotate(90,0,0)

the Eulers are 90,0,0

 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 12:10 PM.

 Contact Us - WorldViz Home - Archive - Top