You are on page 1of 77

Robotics 3.

01 Lecture 3

03. Spatial Descriptions


and Transformations

HCM City Univ. of Technology, Faculty of Mechanical Engineering Phung Tri Cong
Robotics 3.02 Lecture 3

CONTENTS
1. Rotation about Global Cartesian Axes

2. Rotation about Local Cartesian Axes

3. Roll-Pitch-Yaw Angles

4. Euler Angles

5. Axis-Angle Rotation

6. Rigid Body Motion

7. Homogeneous Transformation

HCM City Univ. of Technology, Faculty of Mechanical Engineering Phung Tri Cong
Robotics 3.03 Lecture 3

1. ROTATION ABOUT GLOBAL CARTESIAN AXES


• Consider a rigid body 𝑩 with a fixed point 𝑶 ⟹ Rotation about the fixed
point 𝑶 is the only possible motion of the body 𝑩

• Consider
- local coordinate frame 𝑂𝑥𝑦𝑧
attaches to the rigid body 𝑩
- global coordinate frame 𝑂𝑍𝑌𝑍
• Determine
𝑶 - Transformation matrices for
point 𝑷 between two coordinates

• Point 𝑶 of the body 𝑩 is fixed to the ground 𝑮 and is the origin of both
coordinate frames
HCM City Univ. of Technology, Faculty of Mechanical Engineering Phung Tri Cong
Robotics 3.04 Lecture 3

1. ROTATION ABOUT GLOBAL CARTESIAN AXES


• Rigid body 𝑩 rotates 𝜶 degrees about the 𝒁-axis of the global coordinate
𝑥𝑃 𝑋𝑃
• 𝑷 has local coordinate: 𝐵𝒓𝑃 = 𝑦𝑃 and global coordinate: 𝐺 𝒓𝑃 = 𝑌𝑃
𝑧𝑃 𝑍𝑃
⟹ Relation between the two coordinates:
𝑋𝑃 𝑐𝑜𝑠𝛼 −𝑠𝑖𝑛𝛼 0 𝑥𝑃
𝑌𝑃 = 𝑠𝑖𝑛𝛼 𝑐𝑜𝑠𝛼 0 𝑦𝑃
𝑍𝑃 0 0 1 𝑧𝑃
𝐺
or 𝒓𝑃 = 𝑸𝑍,𝛼 𝐵𝒓𝑃 (2.1)
where 𝑸𝑍,𝛼 is the 𝒁-rotation matrix
𝑐𝑜𝑠𝛼 −𝑠𝑖𝑛𝛼 0
𝑸𝑍,𝛼 = 𝑠𝑖𝑛𝛼 𝑐𝑜𝑠𝛼 0 (2.3)
0 0 1

HCM City Univ. of Technology, Faculty of Mechanical Engineering Phung Tri Cong
Robotics 3.05 Lecture 3

1. ROTATION ABOUT GLOBAL CARTESIAN AXES


Before rotation: After rotation:
𝑋1 𝑥1 𝑋2 𝑐𝑜𝑠𝛼 −𝑠𝑖𝑛𝛼 0 𝑥2
𝑌1 = 𝑦1 𝑌2 = 𝑠𝑖𝑛𝛼 𝑐𝑜𝑠𝛼 0 𝑦2
𝑍1 𝑧1 𝑍2 0 0 1 𝑧2

HCM City Univ. of Technology, Faculty of Mechanical Engineering Phung Tri Cong
Robotics 3.06 Lecture 3

1. ROTATION ABOUT GLOBAL CARTESIAN AXES


• Similarly, rotation 𝛽 degrees about the 𝑌-axis, and γ degrees about the
𝑋-axis of the global frame relate the local and global coordinates of point
𝑷 by the following equations
𝐺
𝒓 = 𝑸𝑌,𝛽 𝐵𝒓 (2.4)
𝐺
𝒓 = 𝑸𝑋,𝛾 𝐵𝒓 (2.5)
Where 𝑸𝑌,𝛽 is the 𝒀-rotation matrix
𝑐𝑜𝑠𝛽 0 𝑠𝑖𝑛𝛽
𝑸𝑌,𝛽 = 0 1 0 (2.6)
−𝑠𝑖𝑛𝛽 0 𝑐𝑜𝑠𝛽
and 𝑸𝑋,𝛾 is the 𝑿-rotation matrix
1 0 0
𝑸𝑋,𝛾 = 0 𝑐𝑜𝑠𝛾 −𝑠𝑖𝑛𝛾 (2.7)
0 𝑠𝑖𝑛𝛾 𝑐𝑜𝑠𝛾
HCM City Univ. of Technology, Faculty of Mechanical Engineering Phung Tri Cong
Robotics 3.07 Lecture 3

1. ROTATION ABOUT GLOBAL CARTESIAN AXES


• Example 3 (Successive rotation about global axes)
The corner 𝑷(5,30,10) of the slab rotates 300 about
the 𝑍-axis, then 300 about the 𝑋-axis, and 900
about the 𝑌-axis ⟹ Find the final position of 𝑷 ?

The new global position of 𝑷 after first rotation

After the second rotation

And after the last rotation

HCM City Univ. of Technology, Faculty of Mechanical Engineering Phung Tri Cong
Robotics 3.08 Lecture 3

1. ROTATION ABOUT GLOBAL CARTESIAN AXES

The slab and the point 𝑷 in first, second, third, and fourth positions

HCM City Univ. of Technology, Faculty of Mechanical Engineering Phung Tri Cong
Robotics 3.09 Lecture 3

1. ROTATION ABOUT GLOBAL CARTESIAN AXES


• Example 4 (Time dependent global rotation)
A rigid body 𝑩 continuously turns about 𝑌-axis of 𝑮 at a rate of 0.3𝑟𝑎𝑑/𝑠
⟹ Find the global position and global velocity of the body point 𝑷?
The rotation transformation matrix of the body is
𝑐𝑜𝑠0.3𝑡 0 𝑠𝑖𝑛0.3𝑡
𝐺
𝑸𝐵 = 0 1 0
−𝑠𝑖𝑛0.3𝑡 0 𝑐𝑜𝑠0.3𝑡
Any point of 𝑩 will move on a circle with radius 𝑅 = 𝑋 2 + 𝑍 2 parallel
to (𝑋, 𝑍)-plane
𝑋 𝑐𝑜𝑠0.3𝑡 0 𝑠𝑖𝑛0.3𝑡 𝑥 𝑥𝑐𝑜𝑠0.3𝑡 + 𝑧𝑠𝑖𝑛0.3𝑡
𝑌 = 0 1 0 𝑦 = 𝑦
𝑍 −𝑠𝑖𝑛0.3𝑡 0 𝑐𝑜𝑠0.3𝑡 𝑧 𝑧𝑐𝑜𝑠0.3𝑡 − 𝑥𝑠𝑖𝑛0.3𝑡
𝑋 2 + 𝑍 2 = (𝑥𝑐𝑜𝑠0.3𝑡 + 𝑧𝑠𝑖𝑛0.3𝑡)2 +(𝑧𝑐𝑜𝑠0.3𝑡 − 𝑥𝑠𝑖𝑛0.3𝑡)2
= 𝑥 2 + 𝑧 2 = 𝑅2
HCM City Univ. of Technology, Faculty of Mechanical Engineering Phung Tri Cong
Robotics 3.10 Lecture 3

1. ROTATION ABOUT GLOBAL CARTESIAN AXES


After 𝑡 = 1𝑠, the point 𝐵𝒓 = 1 0 0 𝑇 will be seen at
𝑋 cos 0.3 0 sin 0.3 1 0.955
𝑌 = 0 1 0 0 = 0
𝑍 − sin 0.3 0 cos 0.3 0 −0.295
After 𝑡 = 2𝑠, the point 𝐵𝒓 = 1 0 0 𝑇 will be seen at
𝑋 𝑐𝑜𝑠0.6 0 sin 0.6 1 0.825
𝑌 = 0 1 0 0 = 0
𝑍 − sin 0.6 0 cos 0.6 0 −0.564
Taking a time derivative of 𝐺 𝒓𝑃 = 𝑸𝑌,𝛽 𝐵𝒓𝑃 to get the global velocity
vector of any point 𝑷
𝐺
𝒗𝑃 = 𝑸𝑌,𝛽 𝐵𝒓𝑃
𝑧𝑐𝑜𝑠0.3𝑡 − 𝑥𝑠𝑖𝑛0.3𝑡
= 0.3 0
−𝑥𝑐𝑜𝑠0.3𝑡 − 𝑧𝑠𝑖𝑛0.3𝑡

HCM City Univ. of Technology, Faculty of Mechanical Engineering Phung Tri Cong
Robotics 3.11 Lecture 3

1. ROTATION ABOUT GLOBAL CARTESIAN AXES


• Example 5 (Global rotation, local position)
A point 𝑷 moved to 𝐺 𝒓2 = [4,3,2]𝑇 after rotating 600 about 𝑍-axis
⟹ Find local position of 𝑷 in the local coordinate?

𝐵 −1 𝐺
𝒓2 = 𝑸𝑍,60 𝒓2
𝑥2 −1
𝑐𝑜𝑠60 −𝑠𝑖𝑛60 0 4 4.5981
⟹ 𝑦2 = 𝑠𝑖𝑛60 𝑐𝑜𝑠60 0 3 = −1.9641
𝑧2 0 0 1 2 2.0
HCM City Univ. of Technology, Faculty of Mechanical Engineering Phung Tri Cong
Robotics 3.12 Lecture 3

1. ROTATION ABOUT GLOBAL CARTESIAN AXES

• The final global position of a point 𝑷 ( 𝐺 𝒓) in a rigid body 𝑩 with position


vector 𝐵𝒓, after a sequence of rotations 𝑸1 , 𝑸2 , 𝑸3 , … , 𝑸𝑛 about the
global axes can be found by
𝐺
𝒓 = 𝐺 𝑸𝐵 𝐵𝒓 (2.35)
Where the global rotation matrix
𝐺
𝑸𝐵 = 𝑸𝑛 … 𝑸3 𝑸2 𝑸1 (2.36)

A rotation matrix is orthogonal


𝑸𝑇 = 𝑸−1 (2.37)

HCM City Univ. of Technology, Faculty of Mechanical Engineering Phung Tri Cong
Robotics 3.13 Lecture 3

1. ROTATION ABOUT GLOBAL CARTESIAN AXES


• Example 6 (Successive global rotation matrix)
The global rotation matrix after a rotation 𝑸𝑍,𝛼 followed by 𝑸𝑌,𝛽 and
then 𝑸𝑋,𝛾 is

𝐺
𝑸𝐵 = 𝑸𝑋,𝛾 𝑸𝑌,𝛽 𝑸𝑍,𝛼 (2.38)
1 0 0 𝑐𝑜𝑠𝛽 0 𝑠𝑖𝑛𝛽 𝑐𝑜𝑠𝛼 −𝑠𝑖𝑛𝛼 0
= 0 𝑐𝑜𝑠𝛾 −𝑠𝑖𝑛𝛾 0 1 0 𝑠𝑖𝑛𝛼 𝑐𝑜𝑠𝛼 0
0 𝑠𝑖𝑛𝛾 𝑐𝑜𝑠𝛾 −𝑠𝑖𝑛𝛽 0 𝑐𝑜𝑠𝛽 0 0 1
𝑐𝛼𝑐𝛽 −𝑐𝛽𝑠𝛼 𝑠𝛽
= 𝑐𝛾𝑠𝛼 + 𝑐𝛼𝑠𝛽𝑠𝛾 𝑐𝛼𝑐𝛾 − 𝑠𝛼𝑠𝛽𝑠𝛾 −𝑐𝛽𝑠𝛾
𝑠𝛼𝑠𝛾 − 𝑐𝛼𝑐𝛾𝑠𝛽 𝑐𝛼𝑠𝛾 + 𝑐𝛾𝑠𝛼𝑠𝛽 𝑐𝛽𝑐𝛾

HCM City Univ. of Technology, Faculty of Mechanical Engineering Phung Tri Cong
Robotics 3.14 Lecture 3

1. ROTATION ABOUT GLOBAL CARTESIAN AXES


• Example 7 (Successive global rotations, global position)
The end point 𝑷 of the arm is located at
𝑋1 0 0 0.00
𝑌1 = 𝑙𝑐𝑜𝑠𝜃 = 1𝑐𝑜𝑠750 = 0.26 (2.39)
𝑍1 𝑙𝑠𝑖𝑛𝜃 1𝑠𝑖𝑛750 0.97
The rotation matrix to find the new position of
the end point 𝑷: rotate −290 about 𝑋-axis, then
300 about 𝑍-axis, and 1320 about 𝑋-axis is
0.87 −0.44 −0.24
𝐺
𝑸𝐵 = 𝑸𝑋,132 𝑸𝑍,30 𝑸𝑋,−29 = −0.33 −0.15 −0.93 (2.40)
0.37 0.89 −0.27
𝑋2 0.87 −0.44 −0.24 0.00 −0.3472
and 𝑌2 = −0.33 −0.15 −0.93 0.26 = −0.9411 (2.41)
𝑍2 0.37 0.89 −0.27 0.97 −0.0305

HCM City Univ. of Technology, Faculty of Mechanical Engineering Phung Tri Cong
Robotics 3.15 Lecture 3

1. ROTATION ABOUT GLOBAL CARTESIAN AXES


• Example 8 (Twelve independent triple global rotations)
There are 12 different independent combinations of triple rotations about
the global axes which transform a rigid body coordinate frame 𝑩 from the
coincident position with a global frame 𝑮 to any final orientation by only
three rotations about the global axes provided that no two
consequence rotations are about the same axis:

𝑸𝑋,𝛾 𝑸𝑌,𝛽 𝑸𝑍,𝛼 𝑸𝑍,𝛾 𝑸𝑌,𝛽 𝑸𝑋,𝛼 𝑸𝑋,𝛾 𝑸𝑌,𝛽 𝑸𝑋,𝛼 𝑸𝑋,𝛾 𝑸𝑍,𝛽 𝑸𝑋,𝛼
𝑸𝑌,𝛾 𝑸𝑍,𝛽 𝑸𝑋,𝛼 𝑸𝑌,𝛾 𝑸𝑋,𝛽 𝑸𝑍,𝛼 𝑸𝑌,𝛾 𝑸𝑍,𝛽 𝑸𝑌,𝛼 𝑸𝑌,𝛾 𝑸𝑋,𝛽 𝑸𝑌,𝛼
𝑸𝑍,𝛾 𝑸𝑋,𝛽 𝑸𝑌,𝛼 𝑸𝑋,𝛾 𝑸𝑍,𝛽 𝑸𝑌,𝛼 𝑸𝑍,𝛾 𝑸𝑋,𝛽 𝑸𝑍,𝛼 𝑸𝑍,𝛾 𝑸𝑌,𝛽 𝑸𝑍,𝛼

HCM City Univ. of Technology, Faculty of Mechanical Engineering Phung Tri Cong
Robotics 3.16 Lecture 3

1. ROTATION ABOUT GLOBAL CARTESIAN AXES


• Example 9 (Order of rotation, and order of matrix multiplication)
Changing the order of global rotation matrices is equivalent to
changing the order of rotations. The position of a point 𝑷 of a rigid body
𝑩 is located at 𝐵𝒓𝑃 = 1 2 3 𝑇
Its global position after rotation 300 about 𝑋-axis and then 450 about 𝑌-
axis is at
0.53 −0.84 0.13 1 −0.76
𝐺
𝒓𝑃 1 = 𝑸𝑌,45 𝑸𝑋,30 𝐵𝒓𝑃 = 0.0 0.15 0.99 2 = 3.27
−0.85 −0.52 0.081 3 −1.64
And if we change the order of rotation then its position would be at:
0.53 0.0 0.85 1 3.08
𝐺
𝒓𝑃 2 = 𝑸𝑋,30 𝑸𝑌,45 𝐵𝒓𝑃 = −0.84 0.15 0.52 2 = 1.02
−0.13 −0.99 0.081 3 −1.86
𝐺 𝐺
These two final positions of 𝑷 are 𝑑 = 𝒓𝑃 1
− 𝒓𝑃 2
= 4.456 apart
Robotics 3.17 Lecture 3

2. ROTATION ABOUT LOCAL CARTESIAN AXES


• The rigid body 𝑩 undergoes a rotation 𝜑 about the 𝑧-axis of its local
coordinate frame
• Coordinates of any point 𝑷 of the rigid body in local and global
coordinates frame are related by the following equation
𝐵
𝒓2 = 𝑨𝑧,𝜑 𝐺 𝒓2
The vector 𝐺 𝒓2 = 𝑋2 𝑌2 𝑍2 𝑇
𝐵
and 𝒓2 = 𝑥2 𝑦2 𝑧2 𝑇 are the
position vectors of the point in local
and global frames respectively
𝑨𝑧,𝜑 is 𝒛-rotation matrix
𝑐𝑜𝑠𝜑 𝑠𝑖𝑛𝜑 0
0 𝑨𝑧,𝜑 = −𝑠𝑖𝑛𝜑 𝑐𝑜𝑠𝜑 0
0 0 1
HCM City Univ. of Technology, Faculty of Mechanical Engineering Phung Tri Cong
Robotics 3.18 Lecture 3

2. ROTATION ABOUT LOCAL CARTESIAN AXES


• Similarly, rotation 𝜃 about the 𝑦-axis and rotation 𝜓 about the 𝑥-axis are
described by the 𝒚-rotation matrix 𝑨𝑦,𝜃 and the 𝒙-rotation matrix 𝑨𝑥,𝜓
respectively

𝑐𝑜𝑠𝜃 0 −𝑠𝑖𝑛𝜃
𝑨𝑦,𝜃 = 0 1 0
𝑠𝑖𝑛𝜃 0 𝑐𝑜𝑠𝜃

1 0 0
𝑨𝑥,𝜓 = 0 𝑐𝑜𝑠𝜓 𝑠𝑖𝑛𝜓
0 −𝑠𝑖𝑛𝜓 𝑐𝑜𝑠𝜓

HCM City Univ. of Technology, Faculty of Mechanical Engineering Phung Tri Cong
Robotics 3.19 Lecture 3

2. ROTATION ABOUT LOCAL CARTESIAN AXES


• Example 12 (Local rotation, local position)
If a local coordinate frame 𝑂𝑥𝑦𝑧 has been rotated 600 about the 𝑧-axis
and a point 𝑷 in the global coordinate frame 𝑂𝑋𝑌𝑍 is at 4 3 2
Its coordinates in the local coordinate frame 𝑂𝑥𝑦𝑧 are

𝑥 𝑐𝑜𝑠60 𝑠𝑖𝑛60 0 4 4.60


𝑦 = −𝑠𝑖𝑛60 𝑐𝑜𝑠60 0 3 = −1.97
𝑧 0 0 1 2 2.0

HCM City Univ. of Technology, Faculty of Mechanical Engineering Phung Tri Cong
Robotics 3.20 Lecture 3

2. ROTATION ABOUT LOCAL CARTESIAN AXES


• Example 13 (Local rotation, global position)
If a local coordinate frame 𝑂𝑥𝑦𝑧 has been rotated 600 about the 𝑧-axis
and a point 𝑷 in the local coordinate frame 𝑂𝑥𝑦𝑧 is at 4 3 2
Its position in the global coordinate frame 𝑂𝑋𝑌𝑍 is at

𝑇
𝑋 𝑐𝑜𝑠60 𝑠𝑖𝑛60 0 4 −0.60
𝑌 = −𝑠𝑖𝑛60 𝑐𝑜𝑠60 0 3 = 4.96
𝑍 0 0 1 2 2.0

HCM City Univ. of Technology, Faculty of Mechanical Engineering Phung Tri Cong
Robotics 3.21 Lecture 3

2. ROTATION ABOUT LOCAL CARTESIAN AXES


• Example 14 (Successive local rotation, global position)
The arm shown in Fig 2.11 has two actuators. The first actuator rotates
the arm −900 about 𝑦-axis and then the second actuator rotates the arm
900 about 𝑥-axis. If the end point 𝑷 is at
𝐵 𝑇
𝒓𝑃 = 9.5 −10.1 10.1
Then its position in the global coordinate frame is at
𝐺 −1 𝐵 −1 𝐵
𝒓2 = 𝑨𝑥,90 𝑨𝑦,−90 𝒓𝑃 = 𝑨−1
𝑦,−90 𝑥,90 𝒓𝑃
𝑨
10.1
= 𝑨𝑇𝑦,−90 𝑨𝑇𝑥,90 𝐵𝒓𝑃 = −10.1
9.5

HCM City Univ. of Technology, Faculty of Mechanical Engineering Phung Tri Cong
Robotics 3.22 Lecture 3

2. ROTATION ABOUT LOCAL CARTESIAN AXES


• The final global position of a point 𝑷 in a rigid body 𝑩 with position
vector 𝒓, after some rotation 𝑨1 , 𝑨2 , 𝑨3 , ⋯ , 𝑨𝑛 about the local axes, can
be found by
𝐵
𝒓 = 𝐵𝑨𝐺 𝐺 𝒓
where
𝐵
𝑨𝐺 = 𝑨𝑛 ⋯ 𝑨3 𝑨2 𝑨1
𝐵
• 𝑨𝐺 is called the local rotation matrix and it maps the global
coordinates to their corresponding local coordinates
• Rotation about the local coordinate axis is conceptually interesting
because in a sequence of rotations, each rotation is about one of the axes
of the local coordinate frame, which has been moved to its new global
position during the last rotation

HCM City Univ. of Technology, Faculty of Mechanical Engineering Phung Tri Cong
Robotics 3.23 Lecture 3

2. ROTATION ABOUT LOCAL CARTESIAN AXES


• Example 15 (Successive local rotation, local position)
A local coordinate frame 𝑩(𝑂𝑥𝑦𝑧) that initially is coincident with a
global coordinate frame 𝑮(𝑂𝑋𝑌𝑍) undergoes a rotation 𝜑 = 300 about
the 𝑧-axis, then 𝜃 = 300 about the 𝑥-axis, and then 𝜓 = 300 about the
𝑦-axis.
The local rotation matrix is
0.63 0.65 −0.43
𝐵
𝑨𝐺 = 𝑨𝑦,30 𝑨𝑥,30 𝑨𝑧,30 = −0.43 0.75 0.50
0.65 −0.125 0.75
The global coordinate of 𝑷 is 𝑋 = 5, 𝑌 = 30, 𝑍 = 10, so the coordinate
of 𝑷 in the local frame is
𝑥 0.63 0.65 −0.43 5 18.35
𝑦 = −0.43 0.75 0.50 30 = 25.35
𝑧 0.65 −0.125 0.75 10 7.0
HCM City Univ. of Technology, Faculty of Mechanical Engineering Phung Tri Cong
Robotics 3.24 Lecture 3

2. ROTATION ABOUT LOCAL CARTESIAN AXES


• Example 16 (Successive local rotation)
The rotation matrix for a body point 𝑷(𝑥, 𝑦, 𝑧) after rotation 𝑨𝑧,𝜑
followed by 𝑨𝑥,𝜃 and 𝑨𝑦,𝜓 is

𝐵
𝑨𝐺 = 𝑨𝑦,𝜓 𝑨𝑥,𝜃 𝑨𝑧,𝜑

𝑐𝜑𝑐𝜓 − 𝑠𝜃𝑠𝜑𝑠𝜓 𝑐𝜓𝑠𝜑 + 𝑐𝜑𝑠𝜃𝑠𝜓 −𝑐𝜃𝑠𝜓


(2.97)
= −𝑐𝜃𝑠𝜑 𝑐𝜃𝑐𝜑 𝑠𝜃
𝑐𝜑𝑠𝜓 + 𝑠𝜃𝑐𝜓𝑠𝜑 𝑠𝜑𝑠𝜓 − 𝑐𝜑𝑠𝜃𝑐𝜓 𝑐𝜃𝑐𝜓

HCM City Univ. of Technology, Faculty of Mechanical Engineering Phung Tri Cong
Robotics 3.25 Lecture 3

2. ROTATION ABOUT LOCAL CARTESIAN AXES


• Example 17 (Twelve independent triple local rotations)
Any 2 independent orthogonal coordinate frames with a common origin
can be related by a sequence of three rotations about the local coordinate
axes, where no two successive rotations may be about the same axis. In
general, there are 12 different independent combinations of triple
rotation about local axes

1 − 𝑨𝑥,𝜓 𝑨𝑦,𝜃 𝑨𝑧,𝜑 5 − 𝑨𝑦,𝜓 𝑨𝑥,𝜃 𝑨𝑧,𝜑 9 − 𝑨𝑧,𝜓 𝑨𝑥,𝜃 𝑨𝑧,𝜑


2 − 𝑨𝑦,𝜓 𝑨𝑧,𝜃 𝑨𝑥,𝜑 6 − 𝑨𝑥,𝜓 𝑨𝑧,𝜃 𝑨𝑦,𝜑 10 − 𝑨𝑥,𝜓 𝑨𝑧,𝜃 𝑨𝑥,𝜑
3 − 𝑨𝑧,𝜓 𝑨𝑥,𝜃 𝑨𝑦,𝜑 7 − 𝑨𝑥,𝜓 𝑨𝑦,𝜃 𝑨𝑥,𝜑 11 − 𝑨𝑦,𝜓 𝑨𝑥,𝜃 𝑨𝑦,𝜑
4 − 𝑨𝑧,𝜓 𝑨𝑦,𝜃 𝑨𝑥,𝜑 8 − 𝑨𝑦,𝜓 𝑨𝑧,𝜃 𝑨𝑦,𝜑 12 − 𝑨𝑧,𝜓 𝑨𝑦,𝜃 𝑨𝑧,𝜑

HCM City Univ. of Technology, Faculty of Mechanical Engineering Phung Tri Cong
Robotics 3.26 Lecture 3

3. ROLL-PITCH-YAW ANGLES
• The rotation about the 𝑋-axis of the global coordinate frame is called a
roll, the rotation about the 𝑌-axis of the global coordinate frame is called
a pitch, and the rotation about the 𝑍-axis of the global coordinate frame is
called a yaw
• This figure illustrates 450 roll, pitch, and yaw rotation about the axes of
a global coordinate frame

HCM City Univ. of Technology, Faculty of Mechanical Engineering Phung Tri Cong
Robotics 3.27 Lecture 3

3. ROLL-PITCH-YAW ANGLES
• Given the roll, pitch, and yaw angles, we can compute the overall
rotation matrix

• The global roll-pitch-yaw rotation matrix is


𝐺
𝑸𝐵 = 𝑸𝑍,𝛾 𝑸𝑌,𝛽 𝑸𝑋,𝛼
𝑐𝛽𝑐𝛾 −𝑐𝛼𝑠𝛾 + 𝑐𝛾𝑠𝛼𝑠𝛽 𝑠𝛼𝑠𝛾 + 𝑐𝛼𝑐𝛾𝑠𝛽
= 𝑐𝛽𝑠𝛾 𝑐𝛼𝑐𝛾 + 𝑠𝛼𝑠𝛽𝑠𝛾 −𝑐𝛾𝑠𝛼 + 𝑐𝛼𝑠𝛽𝑠𝛾 (2.55)
−𝑠𝛽 𝑐𝛽𝑠𝛼 𝑐𝛼𝑐𝛽

HCM City Univ. of Technology, Faculty of Mechanical Engineering Phung Tri Cong
Robotics 3.28 Lecture 3

3. ROLL-PITCH-YAW ANGLES
• Also we are able to compute the equivalent roll, pitch, and yaw angles
when a rotation matrix is given. Suppose that 𝑟𝑖𝑗 indicates the element of
row 𝑖 and column 𝑗 of the roll-pitch-yaw rotation matrix (2.55)
• Then the roll angle is
𝑟32
𝛼 = 𝑡𝑎𝑛−1
𝑟33

and the pitch angle is


𝛽 = −𝑠𝑖𝑛−1 𝑟31
and the yaw angle is
−1
𝑟21
𝛾 = 𝑡𝑎𝑛
𝑟11

HCM City Univ. of Technology, Faculty of Mechanical Engineering Phung Tri Cong
Robotics 3.29 Lecture 3

3. ROLL-PITCH-YAW ANGLES
• Example 11 (Determination of roll-pitch-yaw angles)
Determine the required roll-pitch-yaw angles to make the 𝑥-axis of the
body coordinate 𝑩 parallel to 𝒖 = 𝑰 + 2𝑱 + 3𝑲, while 𝑦-axis remains in
(𝑋, 𝑌)-plane?
We have
𝐺 𝒖 1 2 3
𝒊= = 𝑰+ 𝑱+ 𝑲
𝒖 14 14 14
𝐺
𝒋 = 𝑰 ∙ 𝒋 𝑰 + 𝑱 ∙ 𝒋 𝑱 = 𝑐𝑜𝑠𝜃 𝑰 + 𝑠𝑖𝑛𝜃𝑱
The axes 𝐺 𝒊 and 𝐺 𝒋 must be orthogonal, therefore
1/ 14 𝑐𝑜𝑠𝜃
2/ 14 ∙ 𝑠𝑖𝑛𝜃 = 0 ⇒ 𝜃 = −26.560
3/ 14 0
HCM City Univ. of Technology, Faculty of Mechanical Engineering Phung Tri Cong
Robotics 3.30 Lecture 3

3. ROLL-PITCH-YAW ANGLES
1/ 14 0.894 0.358
Find 𝐺 𝒌 by a cross product: 𝐺 𝐺 𝐺
𝒌 = 𝒊 × 𝒋 = 2/ 14 × −0.447 = 0.717
3/ 14 0 −0.597

Hence, the transformation matrix 𝐺 𝑸𝐵 is


𝑰∙𝒊 𝑰∙𝒋 𝑰∙𝒌 1/ 14 0.894 0.358
𝐺
𝑸𝐵 = 𝑱 ∙ 𝒊 𝑱 ∙ 𝒋 𝑱 ∙ 𝒌 = 2/ 14 −0.447 0.717
𝑲∙𝒊 𝑲∙𝒋 𝑲∙𝒌 3/ 14 0 −0.597
Now it is possible to determine the required roll-pitch-yaw angles
𝑟32 0
𝛼 = 𝑡𝑎𝑛−1 = 𝑡𝑎𝑛−1 =0
𝑟33 −0.597
3
𝛽 = −𝑠𝑖𝑛−1 𝑟31 = −𝑠𝑖𝑛−1 ≈ −0.93 rad
14
𝑟21 2/ 14
𝛾= 𝑡𝑎𝑛−1 = 𝑡𝑎𝑛 −1 ≈ 1.1071 rad
𝑟11 1/ 14
HCM City Univ. of Technology, Faculty of Mechanical Engineering Phung Tri Cong
Robotics 3.31 Lecture 3

4. EULER ANGLES
• The rotation about the 𝑍 -axis of the global coordinate is called
precession, the rotation about the 𝑥-axis of the local coordinate is called
nutation, and the rotation about the 𝑧-axis of the local coordinate is
called spin
• The precession-nutation-spin rotation angles are also called Euler angles
• Euler angles rotation matrix has many application in rigid body
kinematics
• To find Euler angles rotation matrix to go from the global frame
𝐺(𝑂𝑋𝑌𝑍) to the final body frame 𝐵(𝑂𝑥𝑦𝑧), we employ a body frame
𝐵′(𝑂𝑥 ′ 𝑦 ′ 𝑧′) that shown in Fig 2.12 that before the first rotation coincides
with the global frame

HCM City Univ. of Technology, Faculty of Mechanical Engineering Phung Tri Cong
Robotics 3.32 Lecture 3

4. EULER ANGLES
• Let there be at first a rotation 𝜑 about the 𝑧′-axis. Because 𝑍-axis and
𝑧′-axis are coincident, we have

𝐵′ 𝐵′
𝒓 = 𝑨𝐺 𝐺 𝒓
𝑐𝑜𝑠𝜑 𝑠𝑖𝑛𝜑 0
𝐵′
𝑨𝐺 = 𝑨𝑧,𝜑 = −𝑠𝑖𝑛𝜑 𝑐𝑜𝑠𝜑 0
0 0 1

• Next we consider the 𝑩′(𝑂𝑥 ′ 𝑦 ′ 𝑧′) frame as a new fixed global frame and
introduce a new body frame 𝑩′′(𝑂𝑥 ′′ 𝑦 ′′ 𝑧′′). Before the second rotation,
the two frame coincide

HCM City Univ. of Technology, Faculty of Mechanical Engineering Phung Tri Cong
Robotics 3.33 Lecture 3

4. EULER ANGLES
• Then, we execute a 𝜃 rotation about 𝑥′′-axis as shown in Fig 2.13. The
transformation between 𝑩′(𝑂𝑥 ′ 𝑦 ′ 𝑧′) and 𝑩′′(𝑂𝑥 ′′ 𝑦 ′′ 𝑧′′) is

𝐵 ′′ 𝐵 ′′ 𝐵′
𝒓= 𝑨𝐵′ 𝒓
1 0 0
𝐵 ′′
𝑨𝐵′ = 𝑨𝑥,𝜃 = 0 𝑐𝑜𝑠𝜃 𝑠𝑖𝑛𝜃
0 −𝑠𝑖𝑛𝜃 𝑐𝑜𝑠𝜃

• Finally, we consider the 𝑩′′(𝑂𝑥 ′′ 𝑦 ′′ 𝑧′′) frame as a new fixed global


frame and consider the final body frame 𝑩(𝑂𝑥𝑦𝑧) to coincide with 𝑩′′
before the third rotation
HCM City Univ. of Technology, Faculty of Mechanical Engineering Phung Tri Cong
Robotics 3.34 Lecture 3

4. EULER ANGLES
• We now execute a 𝜓 rotation about the 𝑧′′-axis as shown in Fig 2.14. The
transformation between 𝑩′′(𝑂𝑥 ′′ 𝑦 ′′ 𝑧′′) and 𝑩(𝑂𝑥𝑦𝑧) is
𝐵 𝐵 𝐵 ′′
𝒓 = 𝑨𝐵′′ 𝒓
𝑐𝑜𝑠𝜓 𝑠𝑖𝑛𝜓 0
𝐵
𝑨𝐵′′ = 𝑨𝑧,𝜓 = −𝑠𝑖𝑛𝜓 𝑐𝑜𝑠𝜓 0
0 0 1
By the rule of composition of rotation, the
transformation from 𝑮(𝑂𝑋𝑌𝑍) to 𝑩(𝑂𝑥𝑦𝑧) is
𝐵
𝒓 = 𝐵𝑨𝐺 𝐺 𝒓
𝐵
𝑨𝐺 = 𝑨𝑧,𝜓 𝑨𝑥,𝜃 𝑨𝑧,𝜑
𝑐𝜑𝑐𝜓 − 𝑐𝜃𝑠𝜑𝑠𝜓 𝑐𝜓𝑠𝜑 + 𝑐𝜃𝑐𝜑𝑠𝜓 𝑠𝜃𝑠𝜓
= −𝑐𝜑𝑠𝜓 − 𝑐𝜃𝑐𝜓𝑠𝜑 −𝑠𝜑𝑠𝜓 + 𝑐𝜃𝑐𝜑𝑐𝜓 𝑠𝜃𝑐𝜓
𝑠𝜃𝑠𝜑 −𝑐𝜑𝑠𝜃 𝑐𝜃
HCM City Univ. of Technology, Faculty of Mechanical Engineering Phung Tri Cong
Robotics 3.35 Lecture 3

4. EULER ANGLES
• Example 18 (Euler angle rotation matrix)
The Euler or precession-nutation-spin rotation matrix for 𝜑 = 79.150 ,
𝜃 = 41.410 , and 𝜓 = −40.70 would be found by substituting 𝜑, 𝜃 and 𝜓
in equation (2.106)

𝐵
𝑨𝐺 = 𝑨𝑧,−40.7 𝑨𝑥,41.41 𝑨𝑧,79.15

0.63 0.65 −0.43


= −0.43 0.75 0.50
0.65 −0.125 0.75

HCM City Univ. of Technology, Faculty of Mechanical Engineering Phung Tri Cong
Robotics 3.36 Lecture 3

4. EULER ANGLES
• Example 19 (Euler angles of a local rotation matrix)
The local rotation matrix after rotation 300 about the 𝑧-axis, then rotation
300 about the 𝑥-axis, and then 300 about the 𝑦-axis is
𝐵
𝑨𝐺 = 𝑨𝑦,30 𝑨𝑥,30 𝑨𝑧,30
0.63 0.65 −0.43
= −0.43 0.75 0.50
0.65 −0.125 0.75
The Euler angles of the corresponding rotation matrix are
𝜃 = 𝑐𝑜𝑠 −1 𝑟33 = 𝑐𝑜𝑠 −1 0.75 = 41.410
−1
𝑟31 −1
0.65
𝜑 = −𝑡𝑎𝑛 = −𝑡𝑎𝑛 = 79.150
𝑟32 −0.125
−1
𝑟13 −1
−0.43
𝜓 = 𝑡𝑎𝑛 = 𝑡𝑎𝑛 = −40.70
𝑟23 0.50
HCM City Univ. of Technology, Faculty of Mechanical Engineering Phung Tri Cong
Robotics 3.37 Lecture 3

4. EULER ANGLES
• Example 20 (Relative rotation matrix of two bodies)
𝐵
Consider a rigid body 𝑩1 with an orientation matrix 1𝑨𝐺 made by Euler
angles 𝜑 = 300 , 𝜃 = −450 , 𝜓 = 600 , and another rigid body 𝑩2 having
𝜑 = 100 , 𝜃 = 250 , 𝜓 = −150 , the individual rotation matrices are
𝐵1 𝐵2
𝑨𝐺 = 𝑨𝑧,60 𝑨𝑥,−45 𝑨𝑧,30 𝑨𝐺 = 𝑨𝑧,−15 𝑨𝑥,25 𝑨𝑧,10
0.127 0.78 −0.612 0.992 −0.0633 −0.109
= −0.927 −0.127 −0.354 = 0.103 0.907 0.408
−0.354 0.612 0.707 0.0734 −0.416 0.906
The relative rotation matrix to map 𝑩2 to 𝑩1 may be found by
0.992 0.103 0.0734
𝐵1 𝐵1
𝑨𝐵2 = 𝑨𝐺 𝐺 𝑨𝐵2 = −0.0633 0.907 −0.416
−0.109 0.408 0.906

HCM City Univ. of Technology, Faculty of Mechanical Engineering Phung Tri Cong
Robotics 3.38 Lecture 3

5. AXIS-ANGLE ROTATION
• We can decompose any rotation 𝜙 of a rigid body with a fixed point 𝑶,
about a globally fixed axis 𝒖 into three rotations about three given non
coplanar axes
• The final orientation of a rigid body after a finite number of rotations is
equivalent to a unique rotation about a unique axis

𝜓 • Determination of the angle and axis is called


the orientation kinematics of rigid bodies

𝒖
𝜙

HCM City Univ. of Technology, Faculty of Mechanical Engineering Phung Tri Cong
Robotics 3.39 Lecture 3

5. AXIS-ANGLE ROTATION
• Two parameters are necessary to define the direction of a line through
𝑶 and one is necessary to define the amount of rotation of a rigid body
about this line
• Let the body frame 𝑩(𝑂𝑥𝑦𝑧) rotate 𝜙 about a line indicated by a unit
vector 𝒖 with direction cosines 𝑢1 , 𝑢2 , 𝑢3
𝒖 = 𝑢1 𝑰 + 𝑢2 𝑱 + 𝑢3 𝑲
𝜓
𝑢12 + 𝑢22 + 𝑢32 = 1

𝒖 This is called axis-angle


𝜙 representation of a rotation

HCM City Univ. of Technology, Faculty of Mechanical Engineering Phung Tri Cong
5. AXIS-ANGLE ROTATION
• A transformation matrix 𝐺 𝑹𝐵 that maps the coordinates in the local frame
𝑩(𝑂𝑥𝑦𝑧) to the corresponding coordinates in the global frame 𝑮(𝑂𝑋𝑌𝑍)
𝐺
𝒓 = 𝐺 𝑹𝐵 𝐵 𝒓
𝐺
𝑹𝐵 = 𝑹𝑢,𝜙 = 𝐈 cos 𝜙 + 𝒖𝒖𝑇 𝑣𝑒𝑟𝑠 𝜙 + 𝒖 sin 𝜙
𝐺
𝑹𝐵
𝑢12 𝑣𝑒𝑟𝑠𝜙 + 𝑐𝜙 𝑢1 𝑢2 𝑣𝑒𝑟𝑠𝜙 − 𝑢3 𝑠𝜙 𝑢1 𝑢3 𝑣𝑒𝑟𝑠𝜙 + 𝑢2 𝑠𝜙
= 𝑢1 𝑢2 𝑣𝑒𝑟𝑠𝜙 + 𝑢3 𝑠𝜙 𝑢22 𝑣𝑒𝑟𝑠𝜙 + 𝑐𝜙 𝑢2 𝑢3 𝑣𝑒𝑟𝑠𝜙 − 𝑢1 𝑠𝜙
𝑢1 𝑢3 𝑣𝑒𝑟𝑠𝜙 − 𝑢2 𝑠𝜙 𝑢2 𝑢3 𝑣𝑒𝑟𝑠𝜙 + 𝑢1 𝑠𝜙 𝑢32 𝑣𝑒𝑟𝑠𝜙 + 𝑐𝜙
where (3.5)
𝜙 2
𝑣𝑒𝑟𝑠 𝜙 = 𝑣𝑒𝑟𝑠𝑖𝑛𝑒 𝜙 = 1 − cos 𝜙 = 2𝑠𝑖𝑛
2
and 𝒖 is the skew-symmetric matrix corresponding to the vector 𝒖
0 −𝑢3 𝑢2
𝒖 = 𝑢3 0 −𝑢1
−𝑢2 𝑢1 0
Robotics 3.41 Lecture 3

5. AXIS-ANGLE ROTATION
• A matrix 𝒖 is skew-symmetric if
𝒖 𝑇 = −𝒖
• Given a transformation matrix 𝐺 𝑹𝐵 we can obtain the axis 𝒖 and angle 𝜙
of the rotation by
1
𝒖= ( 𝐺 𝑹𝐵 − 𝐺 𝑹𝑇𝐵 )
2 sin 𝜙
1
cos 𝜙 = 𝑡𝑟 𝐺 𝑹𝐵 − 1
2
Where
𝑡𝑟 𝐺 𝑹𝐵 = 𝑟11 + 𝑟22 + 𝑟33

HCM City Univ. of Technology, Faculty of Mechanical Engineering Phung Tri Cong
Robotics 3.42 Lecture 3

5. AXIS-ANGLE ROTATION
• Example 40 (Axis-angle rotation when 𝒖 = 𝑲)
If the local frame 𝑩(𝑂𝑥𝑦𝑧) rotates about the 𝑍-axis, then
𝒖=𝑲
And the transformation matrix (3.5) reduces to
0𝑣𝑒𝑟𝑠𝜙 + 𝑐𝜙 0𝑣𝑒𝑟𝑠𝜙 − 1𝑠𝜙 0𝑣𝑒𝑟𝑠𝜙 + 0𝑠𝜙
𝐺
𝑹𝐵 = 0𝑣𝑒𝑟𝑠𝜙 + 1𝑠𝜙 0𝑣𝑒𝑟𝑠𝜙 + 𝑐𝜙 0𝑣𝑒𝑟𝑠𝜙 − 0𝑠𝜙
0𝑣𝑒𝑟𝑠𝜙 − 0𝑠𝜙 0𝑣𝑒𝑟𝑠𝜙 + 0𝑠𝜙 1𝑣𝑒𝑟𝑠𝜙 + 𝑐𝜙
𝑐𝑜𝑠𝜙 −𝑠𝑖𝑛𝜙 0
= 𝑠𝑖𝑛𝜙 𝑐𝑜𝑠𝜙 0
0 0 1
Which is equivalent to the rotation matrix about the 𝑍-axis of global
frame in (2.20)

HCM City Univ. of Technology, Faculty of Mechanical Engineering Phung Tri Cong
Robotics 3.43 Lecture 3

5. AXIS-ANGLE ROTATION
• Example 41 (Rotation about a rotated local axis)
If the body coordinate frame 𝑂𝑥𝑦𝑧 rotate 𝜑 about the global 𝑍-axis, then
the 𝑥-axis would be along 𝒖𝑥
𝑐𝑜𝑠𝜑 −𝑠𝑖𝑛𝜑 0 1 𝑐𝑜𝑠𝜑
𝒖𝑥 = 𝐺 𝑹𝑍,𝜑 𝒊 = 𝑠𝑖𝑛𝜑 𝑐𝑜𝑠𝜑 0 0 = 𝑠𝑖𝑛𝜑
0 0 1 0 0
Rotation 𝜃 about 𝒖𝑥 = 𝑐𝑜𝑠𝜑 𝑰 + 𝑠𝑖𝑛𝜑 𝑱 is defined by Rodriguez’s
formula (3.5)
𝑐𝑜𝑠 2 𝜑 𝑣𝑒𝑟𝑠𝜃 + 𝑐𝜃 𝑐𝜑 𝑠𝜑 𝑣𝑒𝑟𝑠𝜃 𝑠𝜑𝑠𝜃
𝐺
𝑹𝑢𝑥 ,𝜃 = 𝑐𝜑 𝑠𝜑 𝑣𝑒𝑟𝑠𝜃 𝑠𝑖𝑛2 𝜑 𝑣𝑒𝑟𝑠𝜃 + 𝑐𝜃 −𝑐𝜑𝑠𝜃
−𝑠𝜑𝑠𝜃 𝑐𝜑𝑠𝜃 𝑐𝜃

HCM City Univ. of Technology, Faculty of Mechanical Engineering Phung Tri Cong
Robotics 3.44 Lecture 3

5. AXIS-ANGLE ROTATION
Now, rotation 𝜑 about the global 𝑍-axis followed by rotation 𝜃 about the
local 𝑥-axis is transformed by
𝐺
𝑹𝐵 = 𝐺 𝑹𝑢𝑥,𝜃 𝐺 𝑹𝑍,𝜑
𝑐𝑜𝑠𝜑 −𝑐𝑜𝑠𝜃𝑠𝑖𝑛𝜑 𝑠𝑖𝑛𝜃𝑠𝑖𝑛𝜑
= 𝑠𝑖𝑛𝜑 𝑐𝑜𝑠𝜃𝑐𝑜𝑠𝜑 −𝑐𝑜𝑠𝜑𝑠𝑖𝑛𝜃
0 𝑠𝑖𝑛𝜃 𝑐𝑜𝑠𝜃

That must be equal to


−1
𝑨𝑥,𝜃 𝑨𝑧,𝜑 = 𝑨𝑇𝑧,𝜑 𝑨𝑇𝑥,𝜃

HCM City Univ. of Technology, Faculty of Mechanical Engineering Phung Tri Cong
Robotics 3.45 Lecture 3

5. AXIS-ANGLE ROTATION
• Example 42 (Axis and angle of rotation)
Consider a cubic rigid body with a fixed point at A and a unit length of
edges as is shown in Fig 3.2. If we turn the cube 450 about 𝒖 =
1 1 1 𝑇 then we can find the global coordinates of its corner using
Rodriguez transformation matrix as follows
0.57735
𝜋 𝒖
𝜙=4 𝒖 = 3 = 0.57735
0.57735

𝑹𝑢,𝜙 = 𝑰𝑐𝑜𝑠𝜙 + 𝒖𝒖𝑇 𝑣𝑒𝑟𝑠 𝜙 + 𝒖 sin 𝜙


0.80474 −0.31062 0.50588
= 0.50588 0.80474 −0.31062
−0.31062 0.50588 0.80474

HCM City Univ. of Technology, Faculty of Mechanical Engineering Phung Tri Cong
Robotics 3.46 Lecture 3

5. AXIS-ANGLE ROTATION
The local coordinates of the corners are
𝑩 𝑩 𝑩 𝑩 𝑩 𝑩 𝑩
𝒓𝑩 𝒓𝑪 𝒓𝑫 𝒓𝑬 𝒓𝑭 𝒓𝑮 𝒓𝑯
𝑥 1 1 0 0 1 1 0
𝑦 0 1 1 0 0 1 1
𝑧 0 0 0 1 1 1 1

The global coordinates of the corners after the rotation are


𝑮 𝑮 𝑮 𝑮 𝑮 𝑮 𝑮
𝒓𝑩 𝒓𝑪 𝒓𝑫 𝒓𝑬 𝒓𝑭 𝒓𝑮 𝒓𝑯
𝑋 0.804 0.495 -0.31 0.505 1.310 1 0.196
𝑌 0.505 1.31 0.804 -0.31 0.196 1 0.495
𝑍 -0.31 0.196 0.505 0.804 0.495 1 1.31
The mid point of the cube by P
1 1 0.5
𝐺 𝐺
𝒓𝑃 = 𝒓𝐵 + 𝐺 𝒓𝐻 = 𝐺
𝒓𝐹 + 𝐺 𝒓𝐷 = 0.5
2 2
0.5
HCM City Univ. of Technology, Faculty of Mechanical Engineering Phung Tri Cong
Robotics 3.47 Lecture 3

5. AXIS-ANGLE ROTATION
• Example 43 (Axis and angle of a rotation matrix)
A body coordinate frame, 𝑩, undergoes three Euler rotation 𝜑, 𝜃, 𝜓 =
300 , 450 , 600 with respect to a global frame 𝑮. The rotation matrix to
transform coordinates of 𝑩 to 𝑮 is
𝐺 𝐵 𝑇 𝑇
𝑹𝐵 = = 𝑹𝑧,𝜓 𝑹𝑥,𝜃 𝑹𝑧,𝜑 = 𝑹𝑇𝑧,𝜑 𝑹𝑇𝑥,𝜃 𝑹𝑇𝑧,𝜓
𝑹𝐺
0.12683 −0.92678 0.35355
= 0.78033 −0.12683 −0.61237
0.61237 0.35355 0.70711
The unique angle-axis of rotation for this rotation matrix are
1 𝐺
𝜙 = 𝑐𝑜𝑠 −1 𝑡𝑟 𝑹𝐵 − 1
2
= 𝑐𝑜𝑠 −1 −0.14645 = 980

HCM City Univ. of Technology, Faculty of Mechanical Engineering Phung Tri Cong
Robotics 3.48 Lecture 3

5. AXIS-ANGLE ROTATION
1 0.0 −0.86285 −0.13082
𝐺
𝒖= 𝑹𝐵 − 𝐺 𝑹𝑇𝐵 = 0.86285 0.0 −0.48822
2𝑠𝑖𝑛𝜙
0.13082 0.48822 0.0
0.48822
𝒖 = −0.13082
0.86285
As a double check, we may verify the angle-axis rotation formula and
derive the same rotation matrix.

HCM City Univ. of Technology, Faculty of Mechanical Engineering Phung Tri Cong
Robotics 3.49 Lecture 3

6. RIGID BODY MOTION


• A rotation 𝜙 about an axis 𝒖 and a displacement 𝒅 is the general motion
of a rigid body 𝑩 in a global frame 𝑮
• The rigid body motion can be defined by a 𝟒 × 𝟒 matrix

HCM City Univ. of Technology, Faculty of Mechanical Engineering Phung Tri Cong
Robotics 3.50 Lecture 3

6. RIGID BODY MOTION


𝐺
𝒓𝑃 = 𝐺 𝑹𝐵 𝐵 𝒓𝑃 + 𝐺 𝒅 (4.1)
𝑋𝑃 𝑥𝑃 𝑋𝑜
𝐺 𝐵 𝐺
𝒓𝑃 = 𝑌𝑃 𝒓𝑃 = 𝑦𝑃 𝒅 = 𝑌𝑜
𝑍𝑃 𝑧𝑃 𝑍𝑜

𝐺
𝒅: displacement / translation of B with respect to G
𝐺
𝑹𝐵 : rotation matrix to map 𝐵𝒓 to 𝐺 𝒓 when 𝐺 𝒅 = 0
HCM City Univ. of Technology, Faculty of Mechanical Engineering Phung Tri Cong
Robotics 3.51 Lecture 3

6. RIGID BODY MOTION


• Example 71 (Translation and rotation of a body coordinate frame)
A body coordinate frame 𝑩(𝑜𝑥𝑦𝑧), that is originally coincident with
global coordinate frame 𝑮(𝑂𝑋𝑌𝑍), rotates 450 about the 𝑋-axis and
translates to [3 5 7]𝑇
⟹ Find the global position of a point at 𝐵𝒓 = [𝑥 𝑦 𝑧]𝑇 ?

HCM City Univ. of Technology, Faculty of Mechanical Engineering Phung Tri Cong
Robotics 3.52 Lecture 3

6. RIGID BODY MOTION


The global position of a point at 𝐵𝒓 = [𝑥 𝑦 𝑧]𝑇
𝐺
𝒓𝑃 = 𝐺 𝑹𝐵 𝐵 𝒓𝑃 + 𝐺 𝒅
1 0 0 𝑥 3
= 0 𝑐𝑜𝑠45 −𝑠𝑖𝑛45 𝑦 + 5
0 𝑠𝑖𝑛45 𝑐𝑜𝑠45 𝑧 7
= 𝑥 + 3 𝑰 + 0.707𝑦 − 0.707𝑧 + 5 𝑱 + (0.707𝑦 + 0.707𝑧 + 7)𝑲

HCM City Univ. of Technology, Faculty of Mechanical Engineering Phung Tri Cong
Robotics 3.53 Lecture 3

6. RIGID BODY MOTION


• Example 72 (Moving body coordinate frame)
Fig 4.2 show a point 𝑷 at 𝐵𝒓𝑃 = 0.1𝒊 + 0.3𝒋 + 0.3𝒌 in a body frame 𝑩,
which is rotated 500 about the 𝑍-axis, and translated -1 along 𝑋, 0.5
along 𝑌, and 0.2 along the 𝑍 axes
The position of 𝑷 in global coordinate frame is
𝐺
𝒓𝑃 = 𝐺 𝑹𝐵 𝐵 𝒓𝑃 + 𝐺 𝒅
𝑐𝑜𝑠50 −𝑠𝑖𝑛50 0 0.1 −1
= 𝑠𝑖𝑛50 𝑐𝑜𝑠50 0 0.3 + 0.5
0 0 1 0.3 0.2
−1.166
= 0.769
0.5

HCM City Univ. of Technology, Faculty of Mechanical Engineering Phung Tri Cong
Robotics 3.54 Lecture 3

6. RIGID BODY MOTION


• Example 73 (Rotation of a translated rigid body)
Point 𝑷 of a rigid body 𝑩 has an initial position vector
𝐵 𝑇
𝒓𝑃 = 1 2 3
If the body rotates 450 about the 𝑥 -axis, and then translates to
𝐺
𝒅 = 4 5 6 𝑇 , the final position of 𝑷 would be
𝐺
𝒓 = 𝐵𝑹𝑇𝑥,45 𝐵𝒓𝑃 + 𝐺 𝒅
1 0 0 1 4
= 0 𝑐𝑜𝑠45 −𝑠𝑖𝑛45 2 + 5
0 𝑠𝑖𝑛45 𝑐𝑜𝑠45 3 6
5.0
= 4.23
9.53
Note that rotation occurs with the assumption that 𝐺 𝒅 = 0
HCM City Univ. of Technology, Faculty of Mechanical Engineering Phung Tri Cong
Robotics 3.55 Lecture 3

6. RIGID BODY MOTION


• Example 74 (Arm rotation plus elongation)
Position vector of point 𝑷1 at the tip of an arm shown in Fig 4.3(a) is at
𝐺
𝒓𝑃1 = 𝐵𝒓𝑃1 = 1350 0 900 𝑇 mm. The arm rotates 600 about the
global 𝑍-axis, and elongates by 𝑑 = 720.2𝑖 mm. The final configuration
of the arm is shown in Fig 4.3(b)
The new position vector of 𝑷 is
𝐺
𝒓𝑃2 = 𝐺 𝑹𝐵 𝐵𝒓𝑃1 + 𝐺 𝒅
𝐺
𝑹𝐵 = 𝑹𝑍,60 is the rotation matrix to
transform 𝒓𝑃2 to 𝒓𝑃1 when 𝐺 𝒅 = 0
𝑐𝑜𝑠60 −𝑠𝑖𝑛60 0
𝐺
𝑹𝐵 = 𝑠𝑖𝑛60 𝑐𝑜𝑠60 0
0 0 1

HCM City Univ. of Technology, Faculty of Mechanical Engineering Phung Tri Cong
Robotics 3.56 Lecture 3

6. RIGID BODY MOTION


𝐵
The translation vector in the body coordinate frame is 𝒅=
720.2 0 0 𝑇 , so 𝐺 𝒅 would be found by a transformation
𝐺
𝒅 = 𝐺 𝑹𝐵 𝐵𝒅
𝑐𝑜𝑠60 −𝑠𝑖𝑛60 0 720.2 360.10
= 𝑠𝑖𝑛60 𝑐𝑜𝑠60 0 0 = 623.71
0 0 1 0 0.0
Therefore, the final global position of the tip of the arm is at
𝐺
𝒓𝑃2 = 𝐺 𝑹𝐵 𝐵𝒓𝑃1 + 𝐺 𝒅
𝑐𝑜𝑠60 −𝑠𝑖𝑛60 0 1350 360.1
= 𝑠𝑖𝑛60 𝑐𝑜𝑠60 0 0 + 623.7
0 0 1 900 0.0
1035.1
= 1792.8
900.0
HCM City Univ. of Technology, Faculty of Mechanical Engineering Phung Tri Cong
Robotics 3.57 Lecture 3

7. HOMOGENEOUS TRANSFORMATION
• An arbitrary point 𝑷 of a rigid body attached to the local frame 𝑩 is
denoted by 𝐵𝒓𝑃 and 𝐺 𝒓𝑃 in different frames. The vector 𝐺 𝒅 indicates the
position of origin 𝒐 of the body frame in the global frame. Therefore, a
general motion of a rigid body 𝑩(𝑜𝑥𝑦𝑧) in the global frame 𝑮(𝑂𝑋𝑌𝑍) is
a combination of rotation 𝐺 𝑹𝐵 and translation 𝐺 𝒅

𝐺
𝒓 = 𝐺 𝑹𝐵 𝐵 𝒓 + 𝐺 𝒅

• Using a rotation matrix plus a vector leads


us to the use of homogeneous coordinates
HCM City Univ. of Technology, Faculty of Mechanical Engineering Phung Tri Cong
Robotics 3.58 Lecture 3

7. HOMOGENEOUS TRANSFORMATION
𝐺
• Introducing a new 4x4 homogeneous transformation matrix 𝑻𝐵 , helps
us show a rigid motion by a single matrix transformation
𝐺
𝒓 = 𝐺 𝑻𝐵 𝐵𝒓
Where
𝑟11 𝑟12 𝑟13 𝑋0
𝑟23 𝑌0
𝑻𝐵 = 𝑟21
𝐺 𝑟22
𝑟31 𝑟32 𝑟33 𝑍0
0 0 0 1
𝐺 𝐺 𝐺 𝐺
≡ 𝑹𝐵 𝒅 ≡ 𝑹𝐵 𝒅
0 0 0 1 0 1
𝑋𝑃 𝑥𝑃 𝑋0
𝐺 𝑌𝑃 𝐵 𝑦𝑃 𝐺
And 𝒓= 𝒓= 𝑧 𝒅 = 𝑌0
𝑍𝑃 𝑃
1 𝑍0
1
HCM City Univ. of Technology, Faculty of Mechanical Engineering Phung Tri Cong
Robotics 3.59 Lecture 3

7. HOMOGENEOUS TRANSFORMATION

• The homogeneous transformation matrix 𝐺 𝑻𝐵 is a 4x4 matrix that


maps a homogeneous position vector from one frame to another
• Representation of an 𝑛 -component position vector by an (𝑛 + 1) -
component vector is called homogeneous coordinate representation
• The appended element is a scale factor, 𝜔 ; hence, in general,
homogeneous representation of a vector 𝒓 = 𝑥 𝑦 𝑧 𝑇 is
𝜔𝑥 𝑟1
𝜔𝑦 𝑟
𝒓 = 𝜔𝑧 = 𝑟2
3
𝜔 𝜔

HCM City Univ. of Technology, Faculty of Mechanical Engineering Phung Tri Cong
Robotics 3.60 Lecture 3

7. HOMOGENEOUS TRANSFORMATION
• Example 76 (Rotation and translation of a body coordinate frame)
A body coordinate frame 𝑩(𝑜𝑥𝑦𝑧), that is originally coincident with
global coordinate frame 𝑮(𝑂𝑋𝑌𝑍), rotates 450 about the 𝑋-axis and
translates to 3 5 7 1 𝑇
The matrix representation of the global position of a point is
𝐺
𝒓 = 𝐺 𝑻𝐵 𝐵𝒓
𝑋 1 0 0 3 𝑥
𝑐𝑜𝑠45 −𝑠𝑖𝑛45 5 𝑦
⇒ 𝑌 = 0
𝑍 0 𝑠𝑖𝑛45 𝑐𝑜𝑠45 7 𝑧
1 0 0 0 1 1

HCM City Univ. of Technology, Faculty of Mechanical Engineering Phung Tri Cong
Robotics 3.61 Lecture 3

7. HOMOGENEOUS TRANSFORMATION
• Example 77 (An axis-angle rotation and a translation)
Consider a cubic rigid body with a unit length of edges at the corner of
the first quadrant. If we turn the cube 450 about 𝐮 = 1 1 1 𝑇 then
𝜋
𝜙= 4
𝐮 0.57735
𝒖= = 0.57735
3 0.57735
And its Rodriguez transformation matrix is
𝑹𝑢,𝜙 = 𝑰 𝑐𝑜𝑠𝜙 + 𝒖𝒖𝑇 𝑣𝑒𝑟𝑠𝜙 + 𝒖 𝑠𝑖𝑛𝜙
0.80474 −0.31062 0.50588
= 0.50588 0.80474 −0.31062
−0.31062 0.50588 0.80474

HCM City Univ. of Technology, Faculty of Mechanical Engineering Phung Tri Cong
Robotics 3.62 Lecture 3

7. HOMOGENEOUS TRANSFORMATION

Translating the cube by 𝐺 𝒅 = 1 1 1 𝑇 generates the following


homogeneous transformation matrix
0.80474 −0.31062 0.50588 1
𝐺
𝑻𝐵 = 0.50588 0.80474 −0.31062 1
−0.31062 0.50588 0.80474 1
0 0 0 1
From the local coordinates of the corners of the upper face, the global
coordinates of the corners after the motion are
𝑮 𝑮 𝑮 𝑮
𝒓𝑬 𝒓𝑭 𝒓𝑮 𝒓𝑯
𝑋 1.505 2.310 2 1.196

𝑌 0.689 1.196 2 1.495

𝑍 1.804 1.495 2 2.31

HCM City Univ. of Technology, Faculty of Mechanical Engineering Phung Tri Cong
Robotics 3.63 Lecture 3

7. HOMOGENEOUS TRANSFORMATION

• Example 78 (Decomposition of 𝐺 𝑻𝐵 into translation and rotation)


Homogeneous transformation matrix 𝐺 𝑻𝐵 can be decomposed to a matrix
multiplication of a pure rotation matrix 𝐺 𝑹𝐵 , and a pure translation
matrix 𝐺 𝑫𝐵
𝐺 𝐺
𝑫𝐵 𝐺 𝑹𝐵𝑻𝐵 =
1 0 0 𝑋0 𝑟11 𝑟13 0 𝑟12𝑟11 𝑟12 𝑟13 𝑋0
0 1 0 𝑌0 𝑟21 𝑟23 0 𝑟22𝑟21 𝑟22 𝑟23 𝑌0
= =
0 0 1 𝑍0 𝑟31 𝑟33 0 𝑟32𝑟31 𝑟32 𝑟33 𝑍0
0 0 0 1 0 0 1 0 0 0 0 1
Note that decomposition of a transformation to translation and rotation is
not interchangeable
𝐺
𝑻𝐵 = 𝐺 𝑫𝐵 𝐺 𝑹𝐵 ≠ 𝐺 𝑹𝐵 𝐺 𝑫𝐵

HCM City Univ. of Technology, Faculty of Mechanical Engineering Phung Tri Cong
Robotics 3.64 Lecture 3

7. HOMOGENEOUS TRANSFORMATION
• The advantage of simplicity to work with homogeneous transformation
matrices come with the penalty of losing the orthogonality property. If we
show 𝐺 𝑻𝐵 by
𝐺 𝐺 𝐺 𝐺
𝐺
𝑻𝐵 = 𝑰 𝒅 𝑹𝐵 0 = 𝑹𝐵 𝒅
0 1 0 1 0 1
then
𝐺 𝐺 −1
𝐵
𝑻𝐺 = 𝐺 𝑻−1 𝑹𝐵 𝒅
𝐵 =
0 1
𝐺
= 𝑹𝑇𝐵 − 𝐺 𝑹𝑇𝐵 𝐺 𝒅
0 1
Showing that
𝐺 −1 𝐺
𝑻𝐵 𝑻𝐵 = 𝑰4

HCM City Univ. of Technology, Faculty of Mechanical Engineering Phung Tri Cong
Robotics 3.65 Lecture 3

7. HOMOGENEOUS TRANSFORMATION
• Example 88 (Inverse of a homogeneous transformation matrix)
Assume that
0.643 −0.766 0 −1
𝐺 𝐺
𝐺
𝑻𝐵 = 0.766 0.643 0 0.5 = 𝑹𝐵 𝒅
0 0 1 0.2 0 1
0 0 0 1
Then
0.643 −0.766 0 −1
𝐺 𝐺
𝑹𝐵 = 0.766 0.643 0 𝒅 = 0.5
0 0 1 0.2
0.643 0.766 0 0.26
𝐺
Therefore 𝐵
𝑻𝐺 = 𝑹𝑇𝐵 − 𝐺 𝑹𝑇𝐵 𝐺 𝒅 = −0.766 0.643 0 −1.087
0 1 0 0 1 −0.2
0 0 0 1
HCM City Univ. of Technology, Faculty of Mechanical Engineering Phung Tri Cong
Robotics 3.66 Lecture 3

7. HOMOGENEOUS TRANSFORMATION
• Example 89 (Transformation matrix and coordinate of points)
It is possible and sometimes convenient to describe a rigid body motion
in terms of know displacement of specified points fixed in the body
Assume 𝑨, 𝑩, 𝑪 and 𝑫 are 4 points at two different positions
𝑨1 2,4,1 𝑩1 2,6,1 𝑪1 1,5,2 𝑫1 3,5,2
𝑨2 5,1,1 𝑩2 7,1,1 𝑪2 6,2,1 𝑫2 6,2,3
There must be a transformation matrix 𝑻 to map the initial positions to the
final
2 2 1 3 5 7 6 6
𝑻 4 6 5 5 = 1 1 2 2
1 1 2 2 1 1 1 3
1 1 1 1 1 1 1 1

HCM City Univ. of Technology, Faculty of Mechanical Engineering Phung Tri Cong
Robotics 3.67 Lecture 3

7. HOMOGENEOUS TRANSFORMATION
And hence
−1
5 7 6 6 2
1 3 2
𝑻 = 1 1 2 2 4
5 5 6
1 1 1 3 1
2 2 1
1 1 1 1 1
1 1 1
5 7 6 6 0 −1/2 −1/2 7/2
0 1/2 −1/2 −3/2
= 1 1 2 2
1 1 1 3 −1/2 0 1/2 1/2
1 1 1 1 1/2 0 1/2 −3/2
0 1 0 1
= 0 0 1 0
1 0 1 −2
0 0 0 1

HCM City Univ. of Technology, Faculty of Mechanical Engineering Phung Tri Cong
Robotics 3.68 Lecture 3

7. HOMOGENEOUS TRANSFORMATION
• Example 90 (Quick inverse transformation)
For numerical calculation, it is more practical to decompose a
transformation matrix into translation times rotation, and take advantage
of the inverse of matrix multiplication
Consider a transformation matrix
𝑟11 𝑟12 𝑟13 𝑟14
𝑟21 𝑟22 𝑟23 𝑟24
𝑻 = = 𝑫 𝑹
𝑟31 𝑟32 𝑟33 𝑟34
0 0 0 1
1 0 0 𝑟14 𝑟11 𝑟12 𝑟13 0
0 1 0 𝑟24 𝑟21 𝑟22 𝑟23 0
=
0 0 1 𝑟34 𝑟31 𝑟32 𝑟33 0
0 0 0 1 0 0 0 1

HCM City Univ. of Technology, Faculty of Mechanical Engineering Phung Tri Cong
Robotics 3.69 Lecture 3

7. HOMOGENEOUS TRANSFORMATION
Therefore
𝑻−1 = 𝑫𝑹 −1 = 𝑹−1 𝑫−1 = 𝑹𝑇 𝑫−1
𝑟11 𝑟21 𝑟31 0 1 0 0 −𝑟14
𝑟12 𝑟22 𝑟32 0 0 1 0 −𝑟24
=
𝑟13 𝑟23 𝑟33 0 0 0 1 −𝑟34
0 0 0 1 0 0 0 1
𝑟11 𝑟21 𝑟31 −𝑟11 𝑟14 − 𝑟21 𝑟24 − 𝑟31 𝑟34
𝑟12 𝑟22 𝑟32 −𝑟12 𝑟14 − 𝑟22 𝑟24 − 𝑟32 𝑟34
=
𝑟13 𝑟23 𝑟33 −𝑟13 𝑟14 − 𝑟23 𝑟24 − 𝑟33 𝑟34
0 0 0 1

HCM City Univ. of Technology, Faculty of Mechanical Engineering Phung Tri Cong
Robotics 3.70 Lecture 3

7. HOMOGENEOUS TRANSFORMATION
The transformation matrices to transform coordinates from frame 𝑩 to 𝑨,
and from frame 𝑪 to 𝑩 are
𝐴 𝐴 𝐵 𝐵
𝑻𝐵 =𝐴 𝑹 𝐵 𝒅1 𝐵
𝑻𝐶 = 𝑹𝐶 𝒅2
0 1 0 1
Hence, the transformation matrix from 𝑪 to 𝑨 is
𝐴 𝐴 𝐵 𝐵
𝐴
𝑻𝐶 = 𝑻𝐵 𝐴 𝐵
𝑻𝐶 = 𝑹 𝐵 𝒅1 𝑹 𝐶 𝒅2
0 1 0 1
𝐴 𝐵 𝐴 𝐵 𝐴
= 𝑹 𝐵 𝑹 𝐶 𝑹 𝐵 𝒅 2 + 𝒅1
0 1
𝐴 𝐴
= 𝑹𝐶 𝒅2
0 1

HCM City Univ. of Technology, Faculty of Mechanical Engineering Phung Tri Cong
Robotics 3.71 Lecture 3

7. HOMOGENEOUS TRANSFORMATION
And therefore, the inverse transformation is
𝐴 𝑇𝐴 𝐴 𝑇
𝑻𝐴 = 𝐶 − 𝑹𝐶 𝒅2 𝑹𝐶
0 1
The value of homogeneous coordinates are better appreciated when several
displacements occur in succession which, for instance, can be written as
𝐺
𝑻4 = 𝐺 𝑻1 1𝑻2 2𝑻3 3𝑻4
Rather than
𝐺
𝑹4 4𝒓𝑃 + 𝐺 𝒅4
= 𝐺 𝑹1 1
𝑹2 2
𝑹3 3
𝑹4 4𝒓𝑃 + 3𝒅4 + 2𝒅3 + 1𝒅2 + 𝐺 𝒅1

HCM City Univ. of Technology, Faculty of Mechanical Engineering Phung Tri Cong
Robotics 3.72 Lecture 3

7. HOMOGENEOUS TRANSFORMATION
• Example 92 (Homogeneous transformation for multiple frames)
The coordinates of 𝑷 in the global frame 𝑮(𝑂𝑋𝑌𝑍) can be found by using
the homogeneous transformation matrices
The position of 𝑷 in frame 𝑩2 (𝑥2 𝑦2 𝑧2 ) is indicated by 2𝒓𝑃 . Therefore,
its position in frame 𝑩1 𝑥1 𝑦1 𝑧1 is
𝑥1 𝑥2
𝑦1 1 1 𝑦2
𝑹 2 𝒅 2
𝑧1 = 0 1 𝑧2
1 1

HCM City Univ. of Technology, Faculty of Mechanical Engineering Phung Tri Cong
Robotics 3.73 Lecture 3

7. HOMOGENEOUS TRANSFORMATION
And therefore, its position in the global frame 𝑮(𝑂𝑋𝑌𝑍) would be
𝑋 𝑥1
𝑌 = 𝐺 𝑹1 𝐺 𝒅1 𝑦1
𝑍 0 1 𝑧1
1 1
𝑥2
𝐺 𝐺 1 1 𝑦2
= 𝑹 1 𝒅1 𝑹 2 𝒅 2
0 1 0 1 𝑧2
1
𝑥2
𝐺 1 𝐺 1 𝐺 𝑦2
= 𝑹 1 𝑹 2 𝑹 1 𝒅2 + 𝒅1
0 1 𝑧2
1

HCM City Univ. of Technology, Faculty of Mechanical Engineering Phung Tri Cong
Robotics 3.74 Lecture 3

7. HOMOGENEOUS TRANSFORMATION
• Example 93 (Rotation about an axis not going through origin)
The homogeneous transformation matrix can represent rotations about an
axis going through a point different from the origin
We set a local frame 𝑩 at point 𝑷 parallel to the global frame 𝑮. Then, a
rotation around 𝒖 can be expressed as a translation along −𝒅, to bring the
body frame 𝑩 to the global frame 𝑮, followed by a rotation 𝒖 and a
reverse translation along 𝒅
𝐺
𝑻𝐵 = 𝑫𝑑,𝑑 𝑹𝑢,𝜙 𝑫𝑑,−𝑑
𝑰 𝒅 𝑹𝑢,𝜙 0 𝑰 −𝒅
=
0 1 0 1 0 1
𝑹𝑢,𝜙 𝒅 − 𝑹𝑢,𝜙 𝒅
=
0 1

HCM City Univ. of Technology, Faculty of Mechanical Engineering Phung Tri Cong
Robotics 3.75 Lecture 3

7. HOMOGENEOUS TRANSFORMATION
Where
𝑢12 𝑣𝑒𝑟𝑠𝜙 + 𝑐𝜙 𝑢1 𝑢2 𝑣𝑒𝑟𝑠𝜙 − 𝑢3 𝑠𝜙 𝑢1 𝑢3 𝑣𝑒𝑟𝑠𝜙 + 𝑢2 𝑠𝜙
𝑹𝑢,𝜙 = 𝑢1 𝑢2 𝑣𝑒𝑟𝑠𝜙 + 𝑢3 𝑠𝜙 𝑢22 𝑣𝑒𝑟𝑠𝜙 + 𝑐𝜙 𝑢2 𝑢3 𝑣𝑒𝑟𝑠𝜙 − 𝑢1 𝑠𝜙
𝑢1 𝑢3 𝑣𝑒𝑟𝑠𝜙 − 𝑢2 𝑠𝜙 𝑢2 𝑢3 𝑣𝑒𝑟𝑠𝜙 + 𝑢1 𝑠𝜙 𝑢32 𝑣𝑒𝑟𝑠𝜙 + 𝑐𝜙
And
𝒅 − 𝑹𝑢,𝜙 𝒅 =
𝑑1 1 − 𝑢12 𝑣𝑒𝑟𝑠𝜙 − 𝑢1 𝑣𝑒𝑟𝑠𝜙 𝑑2 𝑢2 + 𝑑3 𝑢3 + 𝑠𝜙 𝑑2 𝑢3 − 𝑑3 𝑢2
𝑑2 1 − 𝑢22 𝑣𝑒𝑟𝑠𝜙 − 𝑢2 𝑣𝑒𝑟𝑠𝜙 𝑑3 𝑢3 + 𝑑1 𝑢1 + 𝑠𝜙 𝑑3 𝑢1 − 𝑑1 𝑢3
𝑑3 1 − 𝑢32 𝑣𝑒𝑟𝑠𝜙 − 𝑢3 𝑣𝑒𝑟𝑠𝜙 𝑑1 𝑢1 + 𝑑2 𝑢2 + 𝑠𝜙 𝑑1 𝑢2 − 𝑑2 𝑢1

HCM City Univ. of Technology, Faculty of Mechanical Engineering Phung Tri Cong
Robotics 3.76 Lecture 3

7. HOMOGENEOUS TRANSFORMATION
• Example 94 (A rotating cylinder)
Imagine a cylinder with radius 𝑅 = 2 that its axis 𝒖 is at 𝒅
0 2
𝒖= 0 𝒅= 0
1 0
If the cylinder turns 900 about its axis then every point on the periphery
of the cylinder will move 900 on a circle parallel to 𝑥, 𝑦 -plane. The
transformation of this motion is
𝐺 𝑰 𝒅 𝑹𝐾,𝜋2 0 𝑰 −𝒅
𝑻𝐵 = 𝑫𝑑,𝑑 𝑹𝑢,𝜙 𝑫𝑑,−𝑑 =
0 1 0 1 0 1
0 −1 0 2
= 1 0 0 −2
0 0 1 0
0 0 0 1
HCM City Univ. of Technology, Faculty of Mechanical Engineering Phung Tri Cong
Robotics 3.77 Lecture 3

7. HOMOGENEOUS TRANSFORMATION
Consider a point on the cylinder that was on the origin. After the rotation,
the point would be seen at
𝐺
𝒓 = 𝐺 𝑻𝐵 𝐵𝒓
0 −1 0 2 0 2
= 1 0 0 −2 0 = −2
0 0 1 0 0 0
0 0 0 1 1 1

HCM City Univ. of Technology, Faculty of Mechanical Engineering Phung Tri Cong

You might also like