Quaternions & Rotation in 3D Space Chapter 7-A1 CE 59700: Digital Photogrammetric Systems 1 Ayman F. Habib Overview • Quaternions: definition • Quaternion properties • Quaternions and rotation matrices • Quaternion-rotation matrices relationship • Spherical linear interpolation • Concluding remarks CE 59700: Digital Photogrammetric Systems 2 Ayman F. Habib Quaternions Real Part Imaginary Part i i2 j 2 k 2 ijk 1 i jk kj j j ki ik k k ij ji • The real part for a “Pure Quaternion” is zero. CE 59700: Digital Photogrammetric Systems 3 Ayman F. Habib Quaternion Multiplication ; ; • Using the rules in the previous slide, we can get the following definition for quaternion multiplication: .; CE 59700: Digital Photogrammetric Systems 4 Ayman F. Habib Quaternion Multiplication ; ; & simplify the quaternion multiplication to matrix multiplication – ortho-normal matrices. CE 59700: Digital Photogrammetric Systems 5 Ayman F. Habib Quaternion Multiplication • Unit quaternions: 1 • For unit quaternions: CE 59700: Digital Photogrammetric Systems 6 Ayman F. Habib Quaternion Properties • Quaternion conjugate: ; ∗ ; ∗ ∗ .; • For unit quaternions: ∗ ; CE 59700: Digital Photogrammetric Systems 7 Ayman F. Habib Quaternion Properties • Quaternion conjugate: ∗ ∗ ∗ ∗ ∗ ... . CE 59700: Digital Photogrammetric Systems 8 Ayman F. Habib Quaternions & Rotation Matrices • Given the following quaternions: ∗ • q is a unit quaternion. is a pure quaternion (real part is zero). 0; ∗ ∗ ; 0; .; ; CE 59700: Digital Photogrammetric Systems 9 Ayman F. Habib Quaternions & Rotation Matrices ∗ ; ; ∗ .; ∗ ; ∗ 1 • The product ∗ produces the same vector . CE 59700: Digital Photogrammetric Systems 10 Ayman F. Habib Quaternions & Rotation Matrices 0; is perpendicular to . ; 0; .; ; 0; 0; CE 59700: Digital Photogrammetric Systems 11 Ayman F. Habib Quaternions & Rotation Matrices ∗ 0; ; ∗ . .; ∗ 0; ∗ 0; 2 CE 59700: Digital Photogrammetric Systems 12 Ayman F. Habib Quaternions & Rotation Matrices ∗ 0; 2 ∗ ; 2 • From 1 & 2, one can conclude that: ∗ ∗ ; http://www.euclideanspace.com CE 59700: Digital Photogrammetric Systems 13 Ayman F. Habib Quaternions & Rotation Matrices Plane to the axis 2 ∗ &∗ are pure quaternions & ∗ are the imaginary components of & ∗. CE 59700: Digital Photogrammetric Systems 14 Ayman F. Habib Quaternions & Rotation Matrices ; ∗ ; Plane to the axis 2 ∗ &∗ are pure quaternions & ∗ are the imaginary components of & ∗. CE 59700: Digital Photogrammetric Systems 15 Ayman F. Habib Quaternions & Rotation Matrices • Any 3D rotation matrix can be represented by a rotation ( ) around a unit vector ( ). • This rotation can be defined by the following unit quaternion: cos sin sin sin 2 2 2 2 http://www.euclideanspace.com CE 59700: Digital Photogrammetric Systems 16 Ayman F. Habib Quaternions & Rotation Matrices • Rotation maintains the magnitude of a vector: ∗ . ∗ ̅∗ . ̅∗ ∗ ∗ ̅ ̅ . ∗∗ CE 59700: Digital Photogrammetric Systems 17 Ayman F. Habib Quaternions & Rotation Matrices • Rotation maintains the angular deviation between two vectors: ∗ ∗ . ̅∗ . ̅ ∗ ∗ ∗ ̅ ̅ . ∗∗ CE 59700: Digital Photogrammetric Systems 18 Ayman F. Habib Quaternions & Rotation Matrices • Rotation maintains the magnitude of a triple product: ,, . • Since: – Quaternion rotation maintains vector magnitude. – Quaternion rotation maintains angular deviation between two vectors. • Then: – Quaternion rotation maintains the magnitude of the triple product. ∗ ∗ ∗ ,, , , CE 59700: Digital Photogrammetric Systems 19 Ayman F. Habib Quaternions & Rotation Matrices • Quaternion/rotation matrix relationship: ∗ ∗ ̅∗ ̅∗ CE 59700: Digital Photogrammetric Systems 20 Ayman F. Habib Quaternions & Rotation Matrices • Quaternion/rotation matrix relationship: ̅∗ 10 00 0 ̅ ∗ 0 0 CE 59700: Digital Photogrammetric Systems 21 Ayman F. Habib Quaternions & Rotation Matrices • Quaternion to Rotation Transformation 2 2 2 2 2 2 2 2 2 2 2 2 & define the same rotation matrix CE 59700: Digital Photogrammetric Systems 22 Ayman F. Habib Quaternions & Rotation Matrices • Rotation to Quaternion Transformation (Option # 1) 3 4 1 / 4 / 4 / 4 / Assumption: 10 CE 59700: Digital Photogrammetric Systems 23 Ayman F. Habib Quaternions & Rotation Matrices • Rotation to Quaternion Transformation (Option # 2) 3 4 1 / 4 / 4 / 4 / Assumption: 10 CE 59700: Digital Photogrammetric Systems 24 Ayman F. Habib Quaternions & Rotation Matrices • Rotation to Quaternion Transformation (Option # 3) 3 4 1 1/4 / 4 / 4 / 4 Assumption: 10 / CE 59700: Digital Photogrammetric Systems 25 Ayman F. Habib Quaternions & Rotation Matrices • Rotation to Quaternion Transformation (Option # 4) 3 4 1 4 1 / 4 / 4 / 4 / Assumption: 10 CE 59700: Digital Photogrammetric Systems 26 Ayman F. Habib Quaternions & Rotation Matrices • Rotation to Quaternion Transformation • Among the options, choose the one that ensures the highest numerical stability. • Option # 1: is the largest among ( ). • Option # 2: is the largest among ( ). • Option # 3: is the largest among ( ). • Option # 4: is the largest among ( ). CE 59700: Digital Photogrammetric Systems 27 Ayman F. Habib Quaternions & Rotation Matrices • The product of two quaternions: ; ; .; ; cos ; • This product is equivalent to rotation angle ( ) around the axis . CE 59700: Digital Photogrammetric Systems 28 Ayman F. Habib Spherical Linear Interpolation • Problem Statement: Given the rotations represented by and , whose angular deviation is , we need to evaluate the interpolated quaternion rotation , whose angular deviations to and are and , respectively. • As per the figure above: CE 59700: Digital Photogrammetric Systems 29 Ayman F. Habib Spherical Linear Interpolation CE 59700: Digital Photogrammetric Systems 30 Ayman F. Habib Spherical Linear Interpolation CE 59700: Digital Photogrammetric Systems 31 Ayman F. Habib Spherical Linear Interpolation . 1 1 CE 59700: Digital Photogrammetric Systems 32 Ayman F. Habib Spherical Linear Interpolation • Spherical Linear Interpolation is useful for: – Interpolation of derived rotation matrices from integrated GNSS/INS attitude – This is the case when deriving the rotation matrices at much higher rate than that derived from GNSS/INS unit (LiDAR & Line Camera systems) – Modeling variation of the rotation matrices as time dependent values for Line Camera Systems CE 59700: Digital Photogrammetric Systems 33 Ayman F. Habib Quaternions & Rotation Matrices • Quaternions characteristics compared to rotation matrices: – It avoids the gimbal lock problem. • Happens whenever the secondary rotation is 90° • Two rotations take place around the same axis in space. – Quaternion multiplication requires fewer operations compared to multiplication of two rotation matrices. – Quaternion-based rotation requires more operations when compared to traditional rotation of vectors. – Quaternions has one constraint while rotation matrices has 6 orthogonality constraints. – Interpolation of quaternion rotations is much more straight forward than 3D rotation matrices. CE 59700: Digital Photogrammetric Systems 34 Ayman F. Habib Gimbal Lock http://en.wikipedia.org/wiki/Gimbal_lock • A set of three gimbals mounted together to allow three degrees of freedom: roll, pitch and yaw. • When two gimbals rotate around the same axis, the system loses one degree of freedom. CE 59700: Digital Photogrammetric Systems 35 Ayman F. Habib Gimbal Lock Z Y X 90° CE 59700: Digital Photogrammetric Systems 36 Ayman F. Habib Gimbal Lock Y X Z 90° CE 59700: Digital Photogrammetric Systems 37 Ayman F. Habib Gimbal Lock Y X Z 90° & . CE 59700: Digital Photogrammetric Systems 38 Ayman F. Habib Gimbal Lock Z X Y X Z Y 90°, 90°, 90° CE 59700: Digital Photogrammetric Systems 39 Ayman F. Habib Gimbal Lock Z Y X 180° CE 59700: Digital Photogrammetric Systems 40 Ayman F. Habib Gimbal Lock X Y Z 90° CE 59700: Digital Photogrammetric Systems 41 Ayman F. Habib Gimbal Lock X Z Y 0° CE 59700: Digital Photogrammetric Systems 42 Ayman F. Habib Gimbal Lock Z X Y X Z Y 90°, 90°, 90° & 180°, 90°, 0° ‼! Singularity in the derivation of the rotation angles CE 59700: Digital Photogrammetric Systems 43 Ayman F. Habib.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages43 Page
-
File Size-