Euler Angles, Unit Quaternions, and Rotation Vectors
Total Page:16
File Type:pdf, Size:1020Kb
Representing Attitude: Euler Angles, Unit Quaternions, and Rotation Vectors James Diebel Stanford University Stanford, California 94301{9010 Email: [email protected] 20 October 2006 Abstract We present the three main mathematical constructs used to represent the attitude of a rigid body in three- dimensional space. These are (1) the rotation matrix, (2) a triple of Euler angles, and (3) the unit quaternion. To these we add a fourth, the rotation vector, which has many of the bene¯ts of both Euler angles and quaternions, but neither the singularities of the former, nor the quadratic constraint of the latter. There are several other subsidiary representations, such as Cayley-Klein parameters and the axis-angle representation, whose relations to the three main representations are also described. Our exposition is catered to those who seek a thorough and uni¯ed reference on the whole subject; detailed derivations of some results are not presented. Keywords{Euler angles, quaternion, Euler-Rodrigues parameters, Cayley-Klein parameters, rotation matrix, di- rection cosine matrix, transformation matrix, Cardan angles, Tait-Bryan angles, nautical angles, rotation vector, orientation, attitude, roll, pitch, yaw, bank, heading, spin, nutation, precession, Slerp 1 Contents 1 Introduction 4 1.1 Overview of Contents . 4 1.2 Sources . 4 1.3 Coordinate Systems . 4 2 Rotation Matrix 4 2.1 Coordinate Transformations . 5 2.2 Transformation Matrix . 5 2.3 Pose of a Rigid Body . 5 2.4 Coordinate Rotations . 5 2.5 Direction Cosine Matrix . 5 2.6 Basis Vectors . 6 2.7 Rotation Matrix Multiplication . 6 3 Kinematics 6 3.1 Notation . 6 3.2 Motion of a Fixed Point on a Rigid Body . 7 3.3 Motion of a Particle in a Moving Frame . 7 4 Finite Di®erence Approximations 7 5 Euler Angles 7 5.1 Rotation Sequence . 7 5.2 Euler Angle Rates and Angular Velocity . 9 5.3 Linearization . 9 5.4 Valid Rotation Sequences . 9 5.5 Euler Angle Sequence (3,1,3) . 10 5.5.1 Usage . 10 5.5.2 Euler Angles ) Rotation Matrix . 10 5.5.3 Euler Angles ( Rotation Matrix . 10 5.5.4 Euler Angles ) Euler Angle Rates Matrices . 10 5.5.5 Euler Angles ) Unit Quaternion . 11 5.5.6 Singularities . 11 5.6 Euler Angle Sequence (1,2,3) . 11 5.6.1 Usage . 11 5.6.2 Euler Angles ) Rotation Matrix . 11 5.6.3 Euler Angles ( Rotation Matrix . 12 5.6.4 Euler Angles ) Euler Angle Rates Matrices . 12 5.6.5 Euler Angles ) Unit Quaternion . 12 5.6.6 Singularities . 13 5.7 Derivatives of Selected Trigonometric Functions . 13 5.8 Singularities . 13 5.9 Intra-Euler-Angle Conversion . 13 5.9.1 Sequence (3,1,3) ( Sequence (1,2,3) . 13 5.9.2 Sequence (1,2,3) ( Sequence (3,1,3) . 13 6 Quaternions 14 6.1 General Quaternions . 14 6.2 Quaternion Multiplication . 14 6.3 Quaternion ) Quaternion Matrices . 14 6.4 Unit Quaternion ) Rotation Matrix . 15 6.5 Unit Quaternion ( Rotation Matrix . 15 6.6 Quaternion Rates ) Angular Velocity . 16 6.7 Quaternion Rates ( Angular Velocity . 16 6.8 Quaternion Rates ) Angular Acceleration . 16 6.9 Quaternion Rates ( Angular Acceleration . 16 6.10 Unit Quaternion ( Cayley-Klein Parameters . 16 2 6.11 Unit Quaternion ) Cayley-Klein Parameters . 17 6.12 Unit Quaternion ( Axis-Angle . 17 6.13 Unit Quaternion ) Axis-Angle . 18 6.14 Unit Quaternion ( Euler Angles . 18 6.15 Unit Quaternion ) Euler Angles . 18 6.16 Optimization with Quaternions . 18 7 Rotation Vector Representation 18 7.1 Rotation Vector ( Axis-Angle . 18 7.2 Rotation Vector ) Axis-Angle . 18 7.3 Rotation Vector ) Unit Quaternion . 19 7.4 Rotation Vector ( Unit Quaternion . 19 7.5 Rotation Vector ) Quaternion Matrices . 19 7.6 Rotation Vector ) Quaternion Rates Matrices . 20 7.7 Rotation Vector ) Rotation Matrix . 20 7.8 Rotation Vector Multiplication . 21 7.9 Rotation Vector Rates ) Quaternion Rates . 21 7.10 Rotation Vector Rates ) Angular Velocity . 21 7.11 Rotation Vector Rates ( Angular Velocity . 21 7.12 Integration of Angular Velocity . 21 8 A Catalog of Euler Angle Parameterizations 22 8.1 Euler Angle Sequence (1,2,1) . 23 8.2 Euler Angle Sequence (1,2,3) . 24 8.3 Euler Angle Sequence (1,3,1) . 25 8.4 Euler Angle Sequence (1,3,2) . 26 8.5 Euler Angle Sequence (2,1,2) . 27 8.6 Euler Angle Sequence (2,1,3) . 28 8.7 Euler Angle Sequence (2,3,1) . 29 8.8 Euler Angle Sequence (2,3,2) . 30 8.9 Euler Angle Sequence (3,1,2) . ..