Robotics Tutorial 1
Lecturer: B. Haghighat (bahar.haghighat@rug.nl)
Prepared by: Dora Abma (d.a.abma@rug.nl))
Topic: Spatial Transformations & Properties
1
Spatial Transformations & Properties
• Transformations from frame A to frame B are made up of translations and rotations:
A
P∗ ∈ R3×1
The vector from origin frame A to *
A
3×3
BR ∈ R
A
4×4
BT ∈ R
The rotation B relative to A
The mapping from frame B to frame A
• Moving from one frame to another is done as (rotation + translation):
⎡ ⎤
⎡ ⎤
[︄ ]︄
[︄ ]︄ [︄
]︄ Px
Px
⎢P ⎥
AP
BP
A R AP
⎢ ⎥ A
BORG ⎢ y ⎥
A
A
A
B
=B T
=
⎢ ⎥ =⇒ P =B R ⎣Py ⎦ + PBORG
⎣ Pz ⎦
1
1
000
1
Pz
1
(1)
• Properties of the rotation matrix are:
SO(3) = {R ∈ R3×3 |RT R = RRT = I, det(R) = 1}
(2)
This implies RT = R−1
Orthonomality is given by R⊤ R = RR⊤ = I
Orthonomality implies det(R) = ±1, however SO(3) only includes matrices with det(R) = 1
• Formal definition of the determinant (can expand along any row or column).
det(B) =
n
∑︂
(−1)i+j Bij Mij
(3)
j=1
where Bij is the entry of B at row i, column j. Mij is det of submatrix with removed row i
and column j. Determinant [ab ;cd] = ad - bc
• Properties of the rotation and transformation matrices are the following
B T
B −1
=A
AR = AR
BR
(4)
A B
B A
B RA R = A RB R = I
(5)
For transformation matrices the property inverse = transpose does not hold (T T ̸= T −1 ),
rather the inverse is given by
[︄
]︄
RT −RT P
−1
T =
(6)
000
1
You can check this by:
TT
−1
[︄
]︄ [︄
]︄
R⊤ R P − P
I 0
=
=
000
1
000 1
(7)
Robotics Tutorial 1
2
Questions
1. Given the following transformation matrices:
√
⎡
⎤
⎡ 1
− 12 0 − 23 1
−2
⎢ 0
⎥
⎢
1
0
−2 ⎥
⎢
⎢ 0
T1 = ⎢ √3
⎥ , T2 = ⎢ √3
1
⎣ − 2 0 − 2 −1 ⎦
⎣ 2
0
0
0
1
0
√
0 − 23
1
0
0 − 12
0
0
⎤
⎡ 1
0
−2
⎥
⎢
1 ⎥
⎢ 0
⎥ , T3 = ⎢ √3
⎣ 2
0 ⎦
1
0
√
0 − 23
1
0
0 − 12
0
0
⎤
1
0 ⎥
⎥
⎥
−1 ⎦
1
(a) Are T1 , T2 and T3 valid transformation matrices?
(b) Find the euler angles that represent the rotations for the correct matrix (or matrices).
(c) Also find the unit vector that defines the axis of rotation, and the angle of rotation for
the correct matrix (or matrices). Use formulas 2.89-2.92 of Book 1:
θ
θ
θ
θ
ϵ1 = kx sin , ϵ2 = ky sin , ϵ3 = kz sin , ϵ4 = cos ,
2
2
2
2
ϵ21 + ϵ22 + ϵ23 + ϵ24 = 1
⎡
⎤
1 − 2ϵ22 − 2ϵ23 2(ϵ1 ϵ2 − ϵ3 ϵ4 ) 2(ϵ1 ϵ3 − ϵ2 ϵ4 )
⎢
⎥
R = ⎣ 2(ϵ1 ϵ2 − ϵ3 ϵ4 ) 1 − 2ϵ21 − 2ϵ23 2(ϵ2 ϵ3 − ϵ1 ϵ4 ) ⎦
2(ϵ1 ϵ3 − ϵ2 ϵ4 ) 2(ϵ2 ϵ3 − ϵ1 ϵ4 ) 1 − 2ϵ21 − 2ϵ22
r32 − r23
4ϵ4
r13 − r31
ϵ2 =
4ϵ4
r21 − r12
ϵ3 =
4ϵ4
1√
1 + r11 + r22 + r33
ϵ4 =
2
θ = 2 arccos ϵ4
ϵ1 =
The axis of rotation is
K=
[︂
ϵ1
sin θ/2
ϵ2
sin θ/2
ϵ3
sin θ/2
]︂⊤
.
(d) Consider the following sequence of rotations:
i. Rotate by φ about the world x-axis.
ii. Rotate by θ about the current z-axis.
iii. Rotate by ψ about the current x-axis.
iv. Rotate by α about the world z-axis.
Provide the resulting rotation matrix
(e) Consider T2 as the transformation from frame {B} to frame {A}, i.e. A
B T = T2 . A point
P is described in frame {B} as
⎡ ⎤
0
⎢ ⎥
B
P = ⎣0⎦ .
2
2
Robotics Tutorial 1
i. Determine the coordinates of point P expressed in frame {A}.
A
−1
ii. Determine the inverse transformation B
A T = (B T ) .
iii. Use B
A T to transform the result from (i) back to frame {B} and verify that the
original coordinates of P are recovered.
3