Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Chương 03

Download as pdf or txt
Download as pdf or txt
You are on page 1of 44

Ho Chi Minh city University of Technology and Education

Faculty of Electrical & Electronics Engineering


Robotics and Intelligent Control Laboratory

Robotics

Presenter: Dr. Duc Thien, Tran

1
Tài liệu tham khảo

1. John J. Craig, Introduction to Robotics: Mechanics and Control, 2018.


2. F. Fahimi, Autonomous Robots: modeling, path planning, and control, 2009.
3. PGS. Nguyễn Trường Thịnh, Giáo trình Kỹ thuật Robot, NXB Đại học Quốc gia TP.HCM, 2014.
4. Bruno Siciliano, Lorenzo Sciavicco, Luigi Villani and Giuseppe Oriolo, Robotics: Modelling,
Planning and Control, 2009.
5. https://www.youtube.com/watch?v=8MzC8Nmr2rg
6. https://www.youtube.com/watch?v=OYEvD8UHT8Y

2
Contents

Topic 1: Introduction
Topic 2: Basic robotic concepts
Topic 3.1: Spatial Representations of Rigid Bodies (Part I)
Topic 3.2: Spatial Representations of Rigid Bodies (Part II)

3
• - Topic 2 -

• Spatial Representations of Rigid Bodies (Part II)

- Week 1 -
Outline

1. Exponential Coordinates
2. Parameterizations of the rotation
2.1. Axis/angle representation
2.2. Euler angles
2.2. Roll, pitch, yaw angles
2.3. Quaternions
3. Homogeneous transformations
Exponential Coordinates
Derivative of a Rotation Matrix
1. For all rotation matrices:

2. Taking the derivative

3. Skew-symmetric matrix

definition

4. Derivative of the rotation matrix (fundamental equation of the rotation motion):

5. Solution when
Remark: 𝜔
ෝ represents
the angular velocity
Exponential Coordinates
Derivative of a Rotation Matrix
1. Skew-symmetric matrix
Consider a vector ω:

The skew-symmetric matrix associated with ω is:

Properties of the skew-symmetric matrix:


Skew-symmetry: ˆ = −ˆ
T

Cross product:   p = ˆ p
Exponential Coordinates
Derivative of a Rotation Matrix
1. Example:
A rotation matrix R represents a rotation of θ about axis x. Find the angular velocity
associated with this rotation
Solution
- The angular velocity is represented by the skew-symmetric matrix ˆ = RRT

0 0 0  1 0 0  0 0 0 
 − cos   0 cos  sin   = 0 0 − 
ˆ = RRT = 0 − sin 
0  cos  − sin   0 − sin  cos   0  0 

- From the skew-symmetric matrix, the angular velocity is:

 
  Angular
 = 0 velocity in x
0
 
Exponential Coordinates
Matrix Exponential
1. Objective: compute
2. Procedure
Taylor expansion:

Using the properties:

Using the Taylor expansion of sine and cosine:

Properties:

(proof: expanding terms)


Outline

1. Exponential coordinates
2. Parameterizations of the Orientation
2.1. Axis/angle representation
2.2. Euler angles
2.2. Roll, pitch, yaw angles
2.3. Quaternions
3. Homogeneous transformations
Outline

1. Exponential coordinates
2. Parameterizations of the rotation
2.1. Axis/angle representation
2.2. Euler angles
2.2. Roll, pitch, yaw angles
2.3. Quaternions
3. Homogeneous transformations
Euler Angles

1. They represent the orientation using 3 angles


2. The angles are originated from 3 successive rotations about the current (mobile) axes
3. Possible combination of rotations:
XYZ XZY XZX XYX
YXZ YZX YXY YZY 12 in total
ZXY ZYZ ZXZ ZYX
Note: there cannot be successive rotations about parallel axes
4. Most used Euler angles:
• ZYZ
• ZXZ
• ZYX (Fick angles)
• YZX (Helmholtz angles)
Euler Angles
Euler Angles ZYZ
1. Originated from the following sequence of rotations:
• A rotation of ϕ1 about axis z
• A rotation of the new frame an angle ϕ2 about axis y’ (current axis)
• A rotation of the new frame an angle ϕ3 about axis z’’ (current axis)

z z' z ''
z' zf
𝜙1 z '' 𝜙3
y' yf
y ''
y y' y ''
𝜙2
x x' x ''
x' x '' xf
2. Equivalent rotation matrix:

Rotation matrix
from ZYZ Euler
angles
Euler Angles
Euler Angles ZYZ
1. ZYZ Euler angles from rotation matrix

Given a matrix find the ZYZ Euler angles

Using the previous matrix:

X X
X X

Comparing and solving:


+ if ϕ2 from 0 to π
– if ϕ2 from -π to 0

sin ϕ2 ≠ 0

Note: always 2 different solutions


Euler Angles
Euler Angles ZYZ
1. Singularities (of Euler Angles ZYZ)
They occur when sin ϕ2= 0; that is when: ϕ2= 0, π, 2π, ...

When ϕ2= 0 (sin ϕ2= 0 and cos ϕ2= 1):

Only ϕ1 + ϕ3 can be found

When ϕ2= π (sin ϕ2= 0 and cos ϕ2= -1):

Only ϕ3 - ϕ1 can be found


Euler Angles
Euler Angles ZYZ
1. Examples
a) Find the rotation matrix equivalent to the ZYZ Euler angles (30°, 50°, 90°)

 −0.5 −0.557 0.663


R = Rz (30°)Ry (50°)Rz (90°) = 0.866 −0.321 0.383
 0 0.766 0.643

b) Find the rotation matrix equivalent to the ZYZ Euler angles (-150°, -50°, -90°)

 −0.5 −0.557 0.663


R = Rz (−150°)Ry (−50°)Rz ( −90°) = 0.866 −0.321 0.383
 0 0.766 0.643
c) Given the previous matrix, find the possible ZYZ Euler angles
Outline

1. Exponential coordinates
2. Parameterizations of the rotation
2.1. Axis/angle representation
2.2. Euler angles
2.2. Roll, Pitch, Yaw Angles
2.3. Quaternions
3. Homogeneous transformations
Roll, Pitch, Yaw Angles

1. Originated from the following sequence of rotations:


• A rotation of ϕr about the fixed x axis (roll)
• A rotation of ϕp about the fixed y axis (pitch)
• A rotation of ϕy about the fixed z axis (yaw)
z
y
p
r y
x
https://www.grc.nasa.gov/www/k-12/airplane/Images/rotations.gif

2. Equivalent rotation matrix:


𝑅 Φ = 𝑅𝑧 Φ𝑦 𝑅𝑦 Φ𝑝 𝑅𝑥 (Φ𝑟 )
Rotation matrix
from roll, pitch,
yaw angles
Roll, Pitch, Yaw Angles

1. RPY angles from rotation matrix

Given a matrix find the RPY angles

Using the previous matrix:


X X
X X

Comparing and solving:

+ if ϕp from - π/2 to π/2


– if ϕp from π/2 to 3π/2

cos ϕp ≠ 0

Note: always 2 different solutions


Roll, Pitch, Yaw Angles

1. Singularities (of the RPY representation):


They appear when cos ϕp= 0; that is when:
ϕp= -π/2, π/2

When ϕp= π/2 (cos ϕp= 0 and sin ϕp= 1):

Only ϕr - ϕy can be found

When ϕp= -π/2 (cos ϕp= 0 and sin ϕp= -1):

Only ϕr + ϕy can be found


Roll, Pitch, Yaw Angles

1. Example
Given the following rotation matrix, find the two equivalent sets of Roll, Pitch, Yaw angles
 −0.5 −0.557 0.663
R = 0.866 −0.321 0.383
 0 0.766 0.643

Solution

 p = atan2(0, 0.7662 + 0.6432 ) = 0  p = atan2(0, − 0.7662 + 0.6432 ) = 180

 0.866 −0.5   0.866 −0.5 


r = atan2  ,  = 120 r = atan2  ,  = −60
 1 1   −1 −1 

 0.766 0.643   0.766 0.643 


 y = atan2  ,  = 50  y = atan2  ,  = −130
 1 1   −1 −1 
Outline

1. Exponential coordinates
2. Parameterizations of the rotation
2.1. Axis/angle representation
2.2. Euler angles
2.2. Roll, pitch, yaw angles
2.3. Quaternions
3. Homogeneous transformations
Outline

1. Exponential coordinates
2. Parameterizations of the rotation
2.1. Axis/angle representation
2.2. Euler angles
2.2. Roll, pitch, yaw angles
2.3. Quaternions
3. Homogeneous Transformations
Homogeneous Transformations
1. Point P of frame {B} in frame {A}: P zB
B
2. In a more compact way: p yB
zA
A
p
A
A t B : Origin of frame B
tB with respect to
xB frame A
yA

xA A
p = At B + A RB B p

 A p   A RB A
tB   B p 
 =
A
p
  Homogeneous
coordinates
1   0 1  1  B
p
A B
p A
TB p
Homogeneous
transformation matrix
Homogeneous Transformations

1. They represent the position and orientation (pose) of a frame with respect to another frame
2. Parts
Rotation

 r11 tx (orientation)
r12 r13
r r22 r23 t y   R t  translation

T =  21 =
(position)

 r31  
r32 r33 tz  0 1
 
0 0 0 1

3. Mathematically, they belong to SE(3): ℝ3 × 𝑆𝑂 3 (SE = Special Euclidean)

They can also be viewed from the perspective of projective geometry

 R 0 I t
4. Pure transformations T =  T = 
 0 1   0 1
Pure rotation Pure translation
Homogeneous Transformations

Pure Transformations
Pure rotations: Pure translations:

1 0 0 0 1 0 0 d
0 cos  − sin  0  0 1 0 0 
Rot x ( ) =  Transx (d ) = 
0 sin  cos  0 0 0 1 0
   
0 0 0 1 0 0 0 1

 cos  0 sin  0 1 0 0 0
 0 1 0 0  0 1 0 d 
Rot y ( ) =  Trans y (d ) = 
 − sin  0 cos  0 0 0 1 0
   
 0 0 0 1 0 0 0 1

cos  − sin  0 0 1 0 0 0
 sin  cos  0 0  0 1 0 0 
Rot z ( ) =  Transz (d ) = 
 0 0 1 0 0 0 1 d
   
 0 0 0 1 0 0 0 1
Homogeneous Transformations
Composition
1. When a transformation is applied with respect to the fixed frame:
- A pre-multiplication is used
2. When a transformation is applied with respect to the mobile (current, new) frame
- A post-multiplication is used
3. Example
A frame {A} is rotated 90° about x, and then it is translated a vector (6, -2, 10) with respect to the
fixed (initial) frame. Find the homogeneous transformation that describes {B} with respect to {A}
A
TB = Trans(6, −2,10) Rot x (90)
1 0 0 6  1 0 0 0  1 0 0 6 
0 1 0 −2  0 cos 90 − sin 90 0  0 0 −1 −2 
= =
0 0 1 10  0 sin 90 cos 90 0  0 1 0 10 
    
0 0 0 1  0 0 0 1  0 0 0 1 
Homogeneous Transformations
Composition
1. Example
Find the homogeneous transformation matrix that represents a rotation of an angle α about the x
axis, followed by a translation of b units along the new x axis, followed by a translation of d units
along the new z axis, followed by a rotation of an angle θ about the new z axis
Solution
A
TB = Rot x ( )Transx (b)Transz (d ) Rot z ( )

 cos  − sin  0 b 
cos  sin  cos  cos  − sin  −d sin  
=
 sin  sin  sin  cos  cos  d cos  
 
 0 0 0 1 
Homogeneous Transformations
Composition
1. Decomposition in pure transformations
Any homogeneous transformation can be decomposed in 2 components:
 R t   I t   R 0
T =  =   0 1
 0 1   0 1 
translation rotation
t R
2. Interpretations of the (de)composition of T
Interpretation 1:
1. First, it applies a translation of t units
2. Then, it applies a rotation R with respect to the new frame
Interpretation 2:
1. First, it applies a rotation R
2. Then, it applies a translation of t units with respect to the fixed (initial) frame
Homogeneous Transformations
Uses
1. They represent the pose (position+orientation) of a frame (rigid body) with respect to another frame

2. They change the reference frame in which a point is represented (using a linear relation):
A
p = ATB B
p
Note: the point must be represented using homogeneous coordinates (its notation uses ~)

3. They apply a transformation (rotation + translation) to a point in the same reference frame
Homogeneous Transformations

Uses
• Example 1
Consider frame {A} and {B}. Point P in frame {B} is given by (2, 0, 1), find its coordinates with
respect to frame {A} using a homogeneous transformation matrix
P zB

zA xB

4
yB
6
yA
xA
Solution
0 1 0 −4   2   −4 
 −4 
 A p   A RB A
tB   B p   A p   −1 0 0 6   0   4 
 =    = = A
p =  4 
1   0 1  1  1  0 0 1 0 1 1
  
      1 
0 0 0 1  1   1 
Homogeneous Transformations
Uses
1. Example 2
A frame {A} is rotated 90° about x, and then it is translated a vector (6, -2, 10) with respect to the
fixed (initial) frame. Consider a point p = (-5, 2, -12) with respect to the new frame {B}. Determine
the coordinates of that point with respect to the initial frame

Solution
- Homogeneous transformation
1 0 0 6  1 0 0 0  1 0 0 6 
0 1 0 −2  0 cos 90 − sin 90 0  0 0 −1 −2 
A
TB = Trans (6, −2,10) Rot x (90) =  =
0 0 1 10  0 sin 90 cos 90 0  0 1 0 10 
    
0 0 0 1  0 0 0 1  0 0 0 1 

- Point after transformation:


1 0 6   −5   1 
0
0 0 −1 −2   2  10 
A
p = TB p = 
A B
=
0 1 0 10   −12  12 
    
0 0 0 1  1  1 
Homogeneous Transformations
Uses
1. Example 3
A frame {A} is translated a vector (6, -2, 10) and then it is rotated 90° about axis x of the fixed (initial)
frame. Consider a point with coordinates (-5, 2, -12) with respect to the new frame ({B}). Find the
coordinates of that point with respect to the initial frame
Solution
- Homogeneous transformation
1 0 0 0  1 0 0 6  1 0 0 6 
0 cos 90 − sin 90 0  0 1 0 −2  0 0 −1 −10 
A
TB = Rot x (90)Trans (6, −2,10) = 0 sin 90 cos 90 0  0
=
0 1 10  0 1 0 −2 
    
0 0 0 1  0 0 0 1  0 0 0 1 

- Transformed point:
1 0 06   −5  1 
0 0 −1 −10   2   2 
A
p = TB p = 
A B
=
0 1 0 −2 −12  0 
  
    
0 0 0 1   1  1 
Homogeneous Transformations
Properties
1. Inverse of a homogeneous transformation:
R t −1  RT − RT t 
T =  T = 
 0 1 0 1 

Why? Solving for BP


A
p = tB + RB p
A A B B
p = A RBT A p − A RBT At B
A
p = TB
A B
p
B
p = ATB−1 A
p = BTA A
p

2. Product of homogeneous transformations:

 R1 t1   R2 t2   R1 R2 R1t 2 + t1 
T1 =   T2 =  T1T2 = 
 0 1  0 1   0 1 
It is not commutative
Homogeneous Transformations

1. Example:
The figure shows a robot whose base is 1m away from the base
of the table. The table is 1m height and its surface is a square.
Frame {1} is fixed on a corner of the table. A 20 cm cube is
located on the middle of the table, and it has frame {2} attached
to its center. A camera is located 2m above the table, just over the
cube, and it has frame {3} attached to it.
a) Find the homogeneous transformations that relate each of
these frames with the base system {0}
b) Find the homogeneous transformation that relates the cube
frame {2} with respect to the camera frame {3}
Homogeneous Transformations
1. Example: Solution
a) By inspection, the homogeneous transformations that relate
each of the frames with respect to the base frame {0} are:
1 0 0 0 1 0 0 −0.5 0 1 0−0.5
0 1 0 1  0 1 0 1.5  1 0 0 1.5 
0
T1 =  0
T2 =  0
T3 = 
0 0 1 1 0 0 1 1  0 0 −1 3 
     
0 0 0 1 0 0 0 1  0 0 0 1 

b) Using the composition of transformations:


T2 = 3T0 0T2 = 0T3−1 0T2
3

0 1 0−1.5 1 0 0 −0.5 0 1 00


1 0 0 0.5  0 1 0 1.5  1 0 0 0 
= =
0 0 −1 3  0 0 1 1  0 0 −1 2 
    
0 0 0 1  0 0 0 1  0 0 0 1
Robot and vision

59
Coordination systems

60
Homogeneous Transformations

1. Example:
Consider that the transformations of the belt and of the robot base with respect to a reference frame
{W} are known. The transformation of the object with respect to the belt, as well as the
transformation of the end effector with respect to the robot base are also known.
a) Find the pose of the object with respect to the base of the robot
b) Find the pose of the object with respect to the end effector

End effector

{E}

object
{O}

{F}
belt
{B}
base
{W}
world
Homogeneous Transformations

1. Example:
Consider that the transformations of the belt and of the robot base with respect to a reference frame
{W} are known. The transformation of the object with respect to the belt, as well as the transformation
of the end effector with respect to the robot base are also known.
a) Find the pose of the object with respect to the base of the robot
End effector
b) Find the pose of the object with respect to the end effector
{E}
Solution
- Known transformations: W TF , W TB , FTO , BTE object
{O}
a) Desired pose (in terms of the known transformations): BTO
{F}
B
TO = ( TW )( TO ) = ( T
B W W
B
−1
) (( W
TF )( TO ) F
) {B}
belt

base
b) Desired pose (in terms of the known transformations): ETO {W}
TO = ( ETW )( W TO ) = ( W TE−1 )( W TF )( FTO ) = (( T )( T ) ) ( TF )( FTO )
−1 world
E W B W
B E

= ( BTE ) ( TB ) ( TF )( FTO )
−1 W −1 W
Important Points

• Orientation can also be represented (parameterized) with 3 or 4 parameters


• The minimal representations of orientations (Euler angles, roll/pitch/yaw), which use 3
angles, have singularities
• Quaternions use 4 components and they do not have singularities (use them whenever
possible!)
• Homogeneous transformation matrices represent position and orientation, and its use is
fundamental in robotics

63
John J. Craig, Introduction to Robotics: Mechanics and Control (3rd Edition),
Chapter 2: Spatial descriptions and transformations
• 2.1, 2.2, 2.3, 2.4,
• 2.27, 2.28, 2.29, 2.30. 2.31, 2.32, 2.33, 2.34,
• MATLAB Exercise 2A (a,b,c).
• MATLAB Exercise 2B (a,b,c,d).

64
References

• Siciliano, Bruno, Sciavicco, Lorenzo, Villani, Luigi, y Oriolo, Giuseppe. Robotics: Modelling,
Planning and Control. Springer Science & Business Media, 2010 (Chapter 2.4-2.7)
• Murray, Richard. M., Li, Z., Sastry, S. S., & Sastry, S. S. A Mathematical Introduction to Robotic
Manipulation. CRC press, 1994 (Capítulo 2.2-2.3)
• Spong, M. W., Hutchinson, S., & Vidyasagar, M. Robot Modeling and Control, Jon Wiley & Sons,
2006 (Chapter 2.5-2.7)

65
Thank you for your listening

66

You might also like