Professional Documents
Culture Documents
WEEK 3: ROBOTICS
1
EL
Topic 2: Robot Kinematics
2
Rotational Operator
EL
� , 𝜽𝜽 : Rotation about 𝒁𝒁
Rot 𝒁𝒁 � axis by an angle θ (anticlockwise sense)
3
EL
𝒒𝒒𝑿𝑿 = 𝒒𝒒𝒙𝒙 𝑪𝑪𝑪𝑪𝑪𝑪𝑪𝑪 − 𝒒𝒒𝒚𝒚 𝑺𝑺𝑺𝑺𝑺𝑺𝑺𝑺 + 𝒒𝒒𝒛𝒛 𝑿𝑿𝟎𝟎
4
In matrix form:
EL
q X cos θ − sin θ 0 q x
q = sin θ
Y cos θ 0 q y
q Z 0 0 1 q z
PT ( )
cos θ − sin θ 0
Rot Ẑ, θ = sin θ cos θ 0
0 0 1
5
Similarly, we get
EL
1 0 0
( )
Rot X̂, θ = 0 cos θ − sin θ
0 sin θ cos θ
PT ( )
cos θ 0 sin θ
Rot Ŷ, θ = 0 1 0
− sin θ 0 cos θ
6
Properties of Rotation Matrix
EL
•Each row/column of a rotation matrix is a unit vector
•Inner (dot) product of each row of a rotation matrix with each
other row becomes equal to 0. The same is true for each column
also.
•Rotation matrices are not commutative in nature
•
A
T
B = B −1
AT
PT � , 𝜽𝜽𝟏𝟏 𝑹𝑹𝑹𝑹𝑹𝑹 𝒀𝒀
𝑹𝑹𝑹𝑹𝑹𝑹 𝑿𝑿 � , 𝜽𝜽𝟐𝟐 ≠ 𝑹𝑹𝑹𝑹𝑹𝑹 𝒀𝒀
𝑹𝑹𝑹𝑹𝑻𝑻−𝟏𝟏 𝑿𝑿
� , 𝜽𝜽𝟐𝟐 𝑹𝑹𝑹𝑹𝑹𝑹 𝑿𝑿
7
A Numerical Example
EL
�𝑼𝑼 axis of the universal coordinate system
A frame {B} is rotated about 𝑿𝑿
by 45 degrees and translated along 𝑿𝑿 �𝑼𝑼 , 𝒀𝒀�𝑼𝑼 and 𝒁𝒁�𝑼𝑼 by 1, 2, and 3 units,
respectively. Let the position of a point Q in {B} is given by [3.0 2.0 1.0]T .
Determine U Q .
Solution:
PT U
Q
= U
BT × BQ
8
EL
𝟏𝟏 𝟎𝟎 𝟎𝟎 𝟏𝟏 𝟑𝟑
𝟎𝟎 𝐜𝐜𝐜𝐜𝐜𝐜𝐜𝐜𝐜𝐜 −𝐬𝐬𝐬𝐬𝐬𝐬𝐬𝐬𝐬𝐬 𝟐𝟐 𝟐𝟐
=
𝟎𝟎 𝐬𝐬𝐬𝐬𝐬𝐬𝐬𝐬𝐬𝐬 𝐜𝐜𝐜𝐜𝐜𝐜𝐜𝐜𝐜𝐜 𝟑𝟑 𝟏𝟏
𝟎𝟎 𝟎𝟎 𝟎𝟎 𝟏𝟏 𝟏𝟏
PT
=
𝟒𝟒
𝟐𝟐𝟐𝟐𝟐𝟐𝟐𝟐𝟐𝟐𝟐𝟐 − 𝐬𝐬𝐬𝐬𝐬𝐬𝐬𝐬𝐬𝐬 + 𝟐𝟐
𝟐𝟐𝟐𝟐𝟐𝟐𝟐𝟐𝟐𝟐𝟐𝟐 + 𝐜𝐜𝐜𝐜𝐜𝐜𝐜𝐜𝐜𝐜 + 𝟑𝟑
𝟏𝟏
=
𝟒𝟒
𝟐𝟐. 𝟕𝟕𝟕𝟕𝟕𝟕
𝟓𝟓. 𝟏𝟏𝟏𝟏𝟏𝟏
𝟏𝟏
9
Composite Rotation Matrix
EL
Composite rotation matrix representing a rotation of α angle
� , followed by a rotation of β angle about 𝒀𝒀
about 𝒁𝒁 � axis , followed
� axis.
by a rotation of γ angle about 𝑿𝑿
PT � , 𝜸𝜸 𝑹𝑹𝑹𝑹𝑹𝑹 𝒀𝒀
𝑹𝑹𝑹𝑹𝑻𝑻𝒄𝒄𝒄𝒄𝒄𝒄𝒄𝒄𝒄𝒄𝒄𝒄𝒄𝒄𝒄𝒄𝒄𝒄 = 𝑹𝑹𝑹𝑹𝑹𝑹 𝑿𝑿 � , 𝜷𝜷 𝑹𝑹𝑹𝑹𝑹𝑹 𝒁𝒁
� , 𝜶𝜶
10
EL
Representations of Position in Other Than
Cartesian Coordinate System
PT
11
Cylindrical Coordinate System
EL
Steps:
1. Starting from the origin O,
translate by r units along 𝑿𝑿 � 𝑼𝑼
axis
2. Rotate in anti-clockwise
PT sense about 𝒁𝒁
angle θ
� 𝑼𝑼 axis by an
3. Translate along 𝒁𝒁
units
� 𝑼𝑼 axis by z
12
EL
𝑻𝑻 𝒄𝒄𝒄𝒄𝒄𝒄𝒄𝒄𝒄𝒄𝒄𝒄𝒄𝒄𝒄𝒄𝒄𝒄
� 𝑼𝑼 , 𝒛𝒛 𝑹𝑹𝑹𝑹𝑹𝑹 𝒁𝒁
= 𝑻𝑻𝑻𝑻𝑻𝑻𝑻𝑻𝑻𝑻 𝒁𝒁 � 𝑼𝑼 , 𝜽𝜽 𝑻𝑻𝑻𝑻𝑻𝑻𝑻𝑻𝑻𝑻 𝑿𝑿
� 𝑼𝑼 , 𝒓𝒓
PT 𝟎𝟎 𝟎𝟎
We get qx = rcosθ
qy = rsinθ
qz = z
𝟎𝟎 𝟏𝟏
13
Spherical Coordinate System
EL
Steps:
1. Starting from the origin O,
translate along 𝒁𝒁 � 𝑼𝑼 axis by r
units
2. Rotate in anti-clockwise
sense about 𝒀𝒀� 𝑼𝑼 axis by an
PT angle α
3. Rotate in anti-clockwise
sense about 𝒁𝒁
angle β
� 𝑼𝑼 axis by an
14
𝑻𝑻 � 𝑼𝑼 , 𝜷𝜷 𝑹𝑹𝑹𝑹𝑹𝑹 𝒀𝒀
= 𝑹𝑹𝑹𝑹𝑹𝑹 𝒁𝒁 � 𝑼𝑼 , 𝜶𝜶 𝑻𝑻𝑻𝑻𝑻𝑻𝑻𝑻𝑻𝑻 𝒁𝒁
� 𝑼𝑼 , 𝒓𝒓
EL
𝒄𝒄𝒄𝒄𝒄𝒄𝒄𝒄𝒄𝒄𝒄𝒄𝒄𝒄𝒄𝒄𝒄𝒄
PT We get qx = rsinαcosβ
qy = rsinαsinβ
qz = rcosα
15
EL
Representations of Orientation in Other
Than Cartesian Coordinate System
PT
16
Roll, Pitch and Yaw Angles
EL
PT
17
EL
Steps:
� 𝑼𝑼 by an angle α
1. Rotate {B} about 𝑿𝑿 rolling
� 𝑼𝑼 by an angle β
2. Rotate {B|} about 𝒀𝒀 pitching
PT � 𝑼𝑼 by an angle γ
3. Rotate {B||} about 𝒁𝒁 yawing
18
𝑼𝑼
𝑩𝑩𝑹𝑹𝒄𝒄𝒄𝒄𝒄𝒄𝒄𝒄𝒄𝒄𝒄𝒄𝒄𝒄𝒄𝒄𝒆𝒆: 𝒓𝒓𝒓𝒓𝒓𝒓
� 𝑼𝑼 , 𝜸𝜸 𝑹𝑹𝑹𝑹𝑹𝑹 𝒀𝒀
= 𝑹𝑹𝑹𝑹𝑹𝑹 𝒁𝒁 � 𝑼𝑼 , 𝜷𝜷 𝑹𝑹𝑹𝑹𝑹𝑹 𝑿𝑿
� 𝑼𝑼 , 𝜶𝜶
EL
𝒄𝒄𝒄𝒄𝒄𝒄𝒄𝒄 −𝒄𝒄𝒄𝒄𝒄𝒄𝒄𝒄 + 𝒔𝒔𝒔𝒔𝒔𝒔𝒔𝒔𝒔𝒔𝒔𝒔 𝒔𝒔𝒔𝒔𝒔𝒔𝒔𝒔 + 𝒄𝒄𝒄𝒄𝒄𝒄𝒄𝒄𝒄𝒄𝒄𝒄
= 𝒄𝒄𝒄𝒄𝒄𝒄𝒄𝒄 𝒄𝒄𝒄𝒄𝒄𝒄𝒄𝒄 + 𝒔𝒔𝒔𝒔𝒔𝒔𝒔𝒔𝒔𝒔𝒔𝒔 −𝒔𝒔𝒔𝒔𝒔𝒔𝒔𝒔 + 𝒄𝒄𝒄𝒄𝒄𝒄𝒄𝒄𝒄𝒄𝒄𝒄
−𝒔𝒔𝒔𝒔 𝒄𝒄𝒄𝒄𝒄𝒄𝒄𝒄 𝒄𝒄𝒄𝒄𝒄𝒄𝒄𝒄
We compare with
PT 𝑼𝑼
𝑩𝑩𝑹𝑹 =
𝒓𝒓𝟏𝟏𝟏𝟏
𝒓𝒓𝟐𝟐𝟐𝟐
𝒓𝒓𝟑𝟑𝟑𝟑
𝒓𝒓𝟏𝟏𝟏𝟏
𝒓𝒓𝟐𝟐𝟐𝟐
𝒓𝒓𝟑𝟑𝟑𝟑
𝒓𝒓𝟏𝟏𝟏𝟏
𝒓𝒓𝟐𝟐𝟐𝟐
𝒓𝒓𝟑𝟑𝟑𝟑
19
EL
We get
𝒓𝒓𝟑𝟑𝟑𝟑
𝜶𝜶 = 𝐭𝐭𝐭𝐭𝐭𝐭−𝟏𝟏
𝒓𝒓𝟑𝟑𝟑𝟑
−𝒓𝒓𝟑𝟑𝟑𝟑
𝜷𝜷 = 𝐭𝐭𝐭𝐭𝐭𝐭−𝟏𝟏
PT 𝜸𝜸 =
𝒓𝒓𝟐𝟐𝟏𝟏𝟏𝟏 + 𝒓𝒓𝟐𝟐𝟐𝟐𝟐𝟐
𝐭𝐭𝐭𝐭𝐭𝐭−𝟏𝟏
𝒓𝒓𝟐𝟐𝟐𝟐
𝒓𝒓𝟏𝟏𝟏𝟏
20
A Numerical Example
EL
The concept of roll, pitch and yaw angles has been used to
represent the rotation of a frame {B} with respect to the reference
𝑩𝑩𝑹𝑹. Let us suppose that the above rotation can
frame {U}, that is 𝑼𝑼
also be expressed by a 3X3 rotation matrix as given below.
PT 𝑼𝑼
𝑩𝑩𝑹𝑹 = 𝟎𝟎. 𝟒𝟒𝟒𝟒𝟒𝟒 −𝟎𝟎. 𝟕𝟕𝟕𝟕𝟕𝟕 −𝟎𝟎. 𝟓𝟓𝟓𝟓𝟓𝟓
−𝟎𝟎. 𝟖𝟖𝟖𝟖𝟖𝟖 −𝟎𝟎. 𝟓𝟓𝟓𝟓𝟓𝟓 𝟎𝟎. 𝟎𝟎𝟎𝟎𝟎𝟎
Determine the angles of rolling, pitching and yawing.
21
Solution:
EL
𝒓𝒓𝟑𝟑𝟑𝟑 −𝟎𝟎. 𝟓𝟓𝟓𝟓𝟓𝟓
Angle of rolling 𝜶𝜶 = 𝐭𝐭𝐭𝐭𝐭𝐭 −𝟏𝟏
= 𝐭𝐭𝐭𝐭𝐭𝐭 −𝟏𝟏 = 𝟗𝟗𝟗𝟗𝟗
𝒓𝒓𝟑𝟑𝟑𝟑 𝟎𝟎. 𝟎𝟎𝟎𝟎𝟎𝟎
−𝒓𝒓𝟑𝟑𝟑𝟑
Angle of pitching 𝜷𝜷 = 𝐭𝐭𝐭𝐭𝐭𝐭 −𝟏𝟏
𝒓𝒓𝟐𝟐𝟏𝟏𝟏𝟏 + 𝒓𝒓𝟐𝟐𝟐𝟐𝟐𝟐
PT = 𝐭𝐭𝐭𝐭𝐭𝐭−𝟏𝟏
= 𝟒𝟒𝟒𝟒. 𝟖𝟖𝟖𝟖𝟖
−𝟎𝟎. 𝟐𝟐𝟐𝟐𝟐𝟐
𝟎𝟎. 𝟖𝟖𝟖𝟖𝟖𝟖
𝟐𝟐 + 𝟎𝟎. 𝟒𝟒𝟒𝟒𝟒𝟒 𝟐𝟐
22
EL
−𝒓𝒓𝟐𝟐𝟐𝟐 𝟎𝟎. 𝟒𝟒𝟒𝟒𝟒𝟒
Angle of yawing 𝜸𝜸 = 𝐭𝐭𝐭𝐭𝐭𝐭−𝟏𝟏 = 𝐭𝐭𝐭𝐭𝐭𝐭 −𝟏𝟏
𝒓𝒓𝟏𝟏𝟏𝟏 −𝟎𝟎. 𝟐𝟐𝟐𝟐𝟐𝟐
= −𝟓𝟓𝟓𝟓. 𝟗𝟗𝟗𝟗 ≈ −𝟔𝟔𝟔𝟔𝟔
PT
23
Using Euler Angles
U
R = UB R −1
EL
B
Steps:
� 𝑩𝑩 by an angle α in
1.Rotate {B} about 𝒁𝒁
anti-clockwise sense
� 𝑩𝑩′ by an angle β in
2.Rotate {B} about 𝒀𝒀
PT anti-clockwise sense
� 𝑩𝑩" by an angle γ in
3.Rotate {B} about 𝑿𝑿
anti-clockwise sense
24
EL
𝑩𝑩
𝑼𝑼𝑹𝑹𝑬𝑬𝑬𝑬𝑬𝑬𝑬𝑬𝑬𝑬𝑬𝑬𝑬𝑬𝑬𝑬𝑬𝑬𝑬𝑬𝑬𝑬
� 𝑩𝑩" , −𝜸𝜸 𝑹𝑹𝑹𝑹𝑹𝑹 𝒀𝒀
= 𝑹𝑹𝑹𝑹𝑹𝑹 𝑿𝑿 � 𝑩𝑩′ , −𝜷𝜷 𝑹𝑹𝑹𝑹𝑹𝑹 𝒁𝒁
� 𝑩𝑩 , −𝜶𝜶
PT
We compare with
𝑼𝑼
𝑩𝑩𝑹𝑹 =
𝒓𝒓𝟏𝟏𝟏𝟏
𝒓𝒓𝟐𝟐𝟐𝟐
𝒓𝒓𝟑𝟑𝟑𝟑
𝒓𝒓𝟏𝟏𝟏𝟏
𝒓𝒓𝟐𝟐𝟐𝟐
𝒓𝒓𝟑𝟑𝟑𝟑
𝒓𝒓𝟏𝟏𝟏𝟏
𝒓𝒓𝟐𝟐𝟐𝟐
𝒓𝒓𝟑𝟑𝟑𝟑
25
EL
𝒓𝒓𝟐𝟐𝟐𝟐
𝜶𝜶 = 𝐭𝐭𝐭𝐭𝐭𝐭−𝟏𝟏
𝒓𝒓𝟏𝟏𝟏𝟏
−𝒓𝒓𝟑𝟑𝟑𝟑
𝜷𝜷 = 𝐭𝐭𝐭𝐭𝐭𝐭−𝟏𝟏
𝒓𝒓𝟐𝟐𝟏𝟏𝟏𝟏 + 𝒓𝒓𝟐𝟐𝟐𝟐𝟐𝟐
PT 𝜸𝜸 = 𝐭𝐭𝐭𝐭𝐭𝐭 −𝟏𝟏
𝒓𝒓𝟑𝟑𝟑𝟑
𝒓𝒓𝟑𝟑𝟑𝟑
26
EL
Denavit-Hartenberg Notations
PT
27
Link and Joint Parameters
EL
• Length of linki (ai): It is the
mutual perpendicular
distance between Axisi-1 and
Axisi
• Angle of twist of linki (𝜶𝜶𝒊𝒊 ): It is
28
• Offset of linki (di): It is the distance
EL
measured from a point where ai-1
intersects the Axisi-1 to the point
where ai intersects the Axisi-1
measured along the said axis
Notes:
PT
•Revolute joint: θi is variable
•Prismatic joint: di is variable
angle between the extension of ai-1
and ai measured about the Axisi-1
29
Rules for Coordinate Assignment
EL
• Zi is an axis about which the
rotation is considered or along
which the translation takes
place
30
• If Zi-1 and Zi axes intersect each
EL
other, X axis can be selected
along either of two remaining
directions
31
EL
We have
𝒊𝒊−𝟏𝟏 𝒊𝒊−𝟏𝟏 𝑨𝑨 𝑩𝑩 𝑪𝑪
𝒊𝒊𝑻𝑻 = 𝑨𝑨𝑻𝑻 𝑩𝑩𝑻𝑻 𝑪𝑪𝑻𝑻 𝒊𝒊𝑻𝑻
= 𝑹𝑹𝑹𝑹𝑹𝑹 𝒁𝒁, 𝜽𝜽𝒊𝒊 𝑻𝑻𝑻𝑻𝑻𝑻𝑻𝑻𝑻𝑻 𝒁𝒁, 𝒅𝒅𝒊𝒊 𝑹𝑹𝑹𝑹𝑹𝑹 𝑿𝑿, 𝜶𝜶𝒊𝒊 𝑻𝑻𝑻𝑻𝑻𝑻𝑻𝑻𝑻𝑻 𝑿𝑿, 𝒂𝒂𝒊𝒊
PT = 𝑺𝑺𝑺𝑺𝑺𝑺𝑺𝑺𝒘𝒘𝒁𝒁 𝑺𝑺𝑺𝑺𝑺𝑺𝑺𝑺𝒘𝒘𝑿𝑿
32
𝒄𝒄𝜽𝜽𝒊𝒊 −𝒔𝒔𝜽𝜽𝒊𝒊 𝒄𝒄𝜶𝜶𝒊𝒊 𝒔𝒔𝜽𝜽𝒊𝒊 𝒔𝒔𝜶𝜶𝒊𝒊 𝒂𝒂𝒊𝒊 𝒄𝒄𝜽𝜽𝒊𝒊
EL
𝒊𝒊−𝟏𝟏 𝒔𝒔𝜽𝜽𝒊𝒊 𝒄𝒄𝜽𝜽𝒊𝒊 𝒄𝒄𝜶𝜶𝒊𝒊 −𝒄𝒄𝜽𝜽𝒊𝒊 𝒔𝒔𝜶𝜶𝒊𝒊 𝒂𝒂𝒊𝒊 𝒔𝒔𝜽𝜽𝒊𝒊
𝒊𝒊𝑻𝑻 =
𝟎𝟎 𝒔𝒔𝜶𝜶𝒊𝒊 𝒄𝒄𝜶𝜶𝒊𝒊 𝒅𝒅𝒊𝒊
𝟎𝟎 𝟎𝟎 𝟎𝟎 𝟏𝟏
𝒊𝒊−𝟏𝟏 −𝟏𝟏
Now, 𝒊𝒊
𝒊𝒊−𝟏𝟏𝑻𝑻 = 𝒊𝒊𝑻𝑻
PT =
𝒄𝒄𝜽𝜽𝒊𝒊
−𝒔𝒔𝜽𝜽𝒊𝒊 𝒄𝒄𝜶𝜶𝒊𝒊
𝒔𝒔𝜽𝜽𝒊𝒊 𝒔𝒔𝜶𝜶𝒊𝒊
𝟎𝟎
𝒔𝒔𝜽𝜽𝒊𝒊
𝒄𝒄𝜽𝜽𝒊𝒊 𝒄𝒄𝜶𝜶𝒊𝒊
−𝒄𝒄𝜽𝜽𝒊𝒊 𝒔𝒔𝜶𝜶𝒊𝒊
𝟎𝟎
𝟎𝟎
𝒔𝒔𝜶𝜶𝒊𝒊
𝒄𝒄𝜶𝜶𝒊𝒊
𝟎𝟎
−𝒂𝒂𝒊𝒊
−𝒅𝒅𝒊𝒊 𝒔𝒔𝜶𝜶𝒊𝒊
−𝒅𝒅𝒊𝒊 𝒄𝒄𝜶𝜶𝒊𝒊
𝟏𝟏
33
Example 1
EL
PT
34
Forward Kinematics
EL
PT
35
PT
36
EL
PT
37
EL
Inverse Kinematics
EL
PT
38
PT
39
EL
PT
40
EL
PT
41
EL
PT
42
EL