roll, pitch and yaw: 3-d rotation matrices

19
Roll, Pitch and Yaw: 3-D rotation matrices • Right handed coordinate systems • Follow development in Wolovich chpt 2 • Start with common origin for 2 frames • Rotate w.r.t. each axis • Three 3x3 rotation matrices • Limitation of single origin • Matlab: Modelling Rhino waist, shoulder • 3D 4x4 Homogeneous matrices for translation • First Rhino Lab specs & protocols

Upload: alden

Post on 11-Jan-2016

253 views

Category:

Documents


1 download

DESCRIPTION

Roll, Pitch and Yaw: 3-D rotation matrices. Right handed coordinate systems Follow development in Wolovich chpt 2 Start with common origin for 2 frames Rotate w.r.t. each axis Three 3x3 rotation matrices Limitation of single origin Matlab: Modelling Rhino waist, shoulder - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Roll, Pitch and Yaw: 3-D rotation matrices

Roll, Pitch and Yaw: 3-D rotation matrices

• Right handed coordinate systems• Follow development in Wolovich chpt 2• Start with common origin for 2 frames • Rotate w.r.t. each axis• Three 3x3 rotation matrices• Limitation of single origin• Matlab: Modelling Rhino waist, shoulder• 3D 4x4 Homogeneous matrices for translation • First Rhino Lab specs & protocols

Page 2: Roll, Pitch and Yaw: 3-D rotation matrices

Remember remember the dot of the vectors

Page 3: Roll, Pitch and Yaw: 3-D rotation matrices

Right-handed coordinate system

Page 4: Roll, Pitch and Yaw: 3-D rotation matrices

Two coordinates systems rotated at the origin

http://personal.uncc.edu/jamiller/coordinates/rotate.gif

Page 5: Roll, Pitch and Yaw: 3-D rotation matrices

Expressing one coordinate system Point in terms of another coordinate system Point

Page 6: Roll, Pitch and Yaw: 3-D rotation matrices

i0

i1

j0

j1

θ

θ

Looking down at rotation ofθ around the z axis, in termsof unit vectors.

Page 7: Roll, Pitch and Yaw: 3-D rotation matrices

Rotate θ around the z-axis

• We’ve already done that, for the 2-D x-y rotation matrix

Page 8: Roll, Pitch and Yaw: 3-D rotation matrices

Rotate φ around the y-axis

Page 9: Roll, Pitch and Yaw: 3-D rotation matrices

Rotate ζ around the x-axis

Page 10: Roll, Pitch and Yaw: 3-D rotation matrices

3-D rotation matrix multiplication not commutative

Rx*Ry*Rz*Po ≠ Rz*Ry*Rx*Po

http://www.lightandmatter.com/html_books/0sn/ch04/figs/book.png

Page 11: Roll, Pitch and Yaw: 3-D rotation matrices

Roll, Pitch and Yaw•Roll around the x-axis•Pitch around the y-axis•Yaw around the z-axis

http://ultimatepointer.com/images/YawPitchRoll.jpg

Page 12: Roll, Pitch and Yaw: 3-D rotation matrices

An eensy weensy problem for Rhino

• Basic concatenating of 3D rotation matrices to find where a point ends up assumes the rolling, pitching and yawing all take place around a single origin of one cartesian coordinate system.

• Example of 3D rotation: human shoulder socket

• But Rhino shoulder and elbow can have their coordinates systems moved w.r.t. waist

http://www.hopkinsortho.org/orthopedicsurgery/images/instfig1.gif

Page 13: Roll, Pitch and Yaw: 3-D rotation matrices

Matlab demo of rotation matrix sequence order

• exerRot3.m• lines 11, 16, 15• P_orig = [0 1 0]’• After rotZ of 45º then rotX of 45º correct P_dest = [ .5 .5 .707]’

rot_ang_seq = [ [3*ones(4,1) (pi/16)*ones(4,1)]; [1*ones(4,1) (pi/16)*ones(4,1)] ];% shoulder "extend" rotation around x, then waist to "left" 4 clicks. % start at y = 1; 4 steps around x ; 4 steps around z % looking rot_ang_seq = [3*ones(4,1) (pi/16)*ones(4,1)] ;% rot_ang_seq = [ [1*ones(4,1) (pi/16)*ones(4,1)]; [3*ones(4,1) (pi/16)*ones(4,1)] ];% wrong: z rot first, losing arm coordinate system P_orig = [ 0; 1; 0] % [ .707; .707; 0] ; %[ 0 1 0 ]' % [ 0.70711; 0.70711; 1 ] ; % [P_dest, seq_stp] = Th3D_Rot_Seq(P_orig, rot_ang_seq); disp(P_dest) row_sze = size(seq_stp, 2);plot3(seq_stp(1, :), seq_stp(2, :), seq_stp(3, :), 'r*-')

Page 14: Roll, Pitch and Yaw: 3-D rotation matrices

Homogeneous matrix to represent translation by multiplication

                                                                                                                                                                                                                  

                                                        

                                                                                                                                                                                                                                                             

scaling rotation translation

example, from http://www.riemers.net/eng/ExtraReading/homogenous_matrices.php

Page 15: Roll, Pitch and Yaw: 3-D rotation matrices

4x4 matrix idea:

• translate elbow joint location to [0 0 0]’

• rotate elbow points (and distal) as required

• translate rotated elbow element back to correct joint location.

• run exerRot4.m for demo of X-axis rotation mimicking Rhino forearm rotation

Page 16: Roll, Pitch and Yaw: 3-D rotation matrices

Grading: Princeton: NYT 1/31/10“Type-A-Plus Students Chafe at Grade Deflation”

by LISA W. FODERARO

• When Princeton University set out six years ago to corral galloping grade inflation by putting a lid on A’s, many in academia lauded it for taking a stand on a national problem and predicted that others would follow.

• But the idea never took hold beyond Princeton’s walls, and so its bold vision is now running into fierce resistance from the school’s Type-A-plus student body.

• With the job market not what it once was, even for Ivy Leaguers, Princetonians are complaining that the campaign against bulked-up G.P.A.’s may be coming at their expense.

Page 17: Roll, Pitch and Yaw: 3-D rotation matrices

• First Rhino Lab, “Limits”

• on engin1930z.pbworks.com

Page 18: Roll, Pitch and Yaw: 3-D rotation matrices

Rhino Lab 1: Limits of rotation• Waist, Shoulder, Elbow and Wrist Flex all

have limits of movement.

• Waist can rotate about 340º independent of other joints.

• Shoulder, Elbow and Wrist have inter-related angles at the limits of rotation: too far back, too far down.

• Your challenge: keep track of clicks for each joint and stop movement near limits.

Page 19: Roll, Pitch and Yaw: 3-D rotation matrices