Translations, rotations and homogeneous coordinates Basilio Bona DAUIN – Politecnico di Torino Semester 1, 2016-17 B. Bona (DAUIN) Roto-translations Semester 1, 2016-17 1 / 12
Translations Translations are rigid displacements that move the origin at another point in space, keeping the axes of the new reference frame parallel to the old ones. R a ( O , i , j , k ) ⇒ R b ( O ′ , i , j , k ) Transl ab : where − − → OO ′ = t a b is the translation vector represented in R a . Composition of rotations is simply a vector sum t a c = t a b + t b c Inverse of rotations is simply its negate Transl − 1 ab = − t a written as t b b a B. Bona (DAUIN) Roto-translations Semester 1, 2016-17 2 / 12
Example Figure: Translation. B. Bona (DAUIN) Roto-translations Semester 1, 2016-17 3 / 12
Roto-translations Rotations are represented by matrices, translations by vectors. it is possible to use a unique representation for roto-translations using the homogeneous representation of vectors p 1 p 1 p 2 v def v = p 2 � = ⇔ p 3 p 3 1 Roto-translations are then represented by a 4 × 4 matrix, called the homogeneous transformation matrix that contains both the rotation matrix R a b and the translation vector t a b � � R a t a b def b T a = b 0 T 1 where � 0 0 � 0 T def = 0 B. Bona (DAUIN) Roto-translations Semester 1, 2016-17 4 / 12
Roto-translations Pure translation � I � t Transl( t ) def = 0 T 1 Pure rotation � R � 0 Rot( R ) def = 0 T 1 Inverse � � R T − R T t T − 1 = 0 T 1 According to the ”pre-fix, post-mobile” rule, a roto-translation can be factored as the product of a translation followed by a rotation around the mobile axes, or a rotation followed by a translation along the fixed axes � I �� R � � R � t 0 t Transl( t ) · Rot( R ) = = 0 T 0 T 0 T 1 1 1 B. Bona (DAUIN) Roto-translations Semester 1, 2016-17 5 / 12
Roto-translations Using the homogeneous transformation T one can transform both geometrical vectors (points) and physical vectors Geometrical vectors as p b p a = T a p b → � p b → � b � p b → p a or � �� � � � � � R a t a R a b p b + t a p a p b b b b = = 1 1 1 0 T 1 hence p a = R a b p b + t a b Physical vectors as v b = − → QP b = ( p b − q b ) p a = R a b p b + t a b − R a b q b − t a b = R a b ( p b − q b ) = R a b v b Physical vectors are only rotated by the homogeneous transformation. B. Bona (DAUIN) Roto-translations Semester 1, 2016-17 6 / 12
Rigid Body Representation A rigid body B can be represented by a reference frame R B associated to it, called ” body frame ”. We call pose of a rigid body the set of parameters that uniquely define its position and orientation (attitude) in R 3 . The pose can be obtained from the homogeneous transformation T 0 B B. Bona (DAUIN) Roto-translations Semester 1, 2016-17 7 / 12
Body Pose � � R 0 t 0 B B There are sixteen elements in T 0 B = , but only six are 0 T 1 independent: three elements of the translation vector and three elements out of nine of the rotation matrix. The body pose is formally defined as p 1 ( t ) x 1 ( t ) p 2 ( t ) x 2 ( t ) � � p 3 ( t ) x 3 ( t ) x ( t ) p ( t ) def = = = α ( t ) p 4 ( t ) α 1 ( t ) p 5 ( t ) α 2 ( t ) p 6 ( t ) α 3 ( t ) x is a geometrical vector while α cannot be considered a vector since vector operations are meaningless. B. Bona (DAUIN) Roto-translations Semester 1, 2016-17 8 / 12
From pose to homogeneous matrix Given the pose one can compute the homogeneous matrix as follows: g E ( α ) is the function that computes the matrix R from the Euler angles, the RPY angles, the quaternions, etc., according to the user choice. B. Bona (DAUIN) Roto-translations Semester 1, 2016-17 9 / 12
From homogeneous matrix to pose Given the homogeneous matrix we compute the pose as extracting the elements from T : g E ( α ) − 1 is the function that computes the Euler angles, the RPY angles, the quaternions, etc., (according to the user choice) from the matrix R . B. Bona (DAUIN) Roto-translations Semester 1, 2016-17 10 / 12
Example 1 Given the pose � � 1 45 x p = where x = − 2 α = 90 α 3 45 the associated homogeneous transformation matrix is r 11 r 12 r 13 1 r 21 r 22 r 23 − 2 T = r 31 r 32 r 33 3 0 0 0 1 where the elements r ij of the rotation matrix depend on the chosen representation √ 2 0 . 5 − 0 . 5 0 0 1 2 √ 2 R Eul = R RPY = 0 1 0 0 . 5 − 0 . 5 − 2 √ √ − 1 0 0 2 2 0 2 2 B. Bona (DAUIN) Roto-translations Semester 1, 2016-17 11 / 12
Example 2 Given the roto-translation √ √ 2 2 0 2 2 2 0 1 0 4 R = t = √ √ 6 2 2 0 − 2 2 the associated homogeneous transformation matrix is √ √ 2 2 0 2 2 2 0 1 0 4 T = √ √ 2 2 0 6 − 2 2 0 0 0 1 and the pose is 0 . 9239 0 2 90 0 0 1 α Eul = α RPY = α quat = x = 4 45 45 α u , θ = 0 . 3827 0 6 − 90 0 0 45 B. Bona (DAUIN) Roto-translations Semester 1, 2016-17 12 / 12
Recommend
More recommend