0% found this document useful (0 votes)
47 views50 pages

Chương 02

This document provides an overview of spatial representations of rigid bodies. It discusses representing the position of a rigid body using the position vector of a point fixed to the body in Cartesian, cylindrical, or spherical coordinates. It also covers representing the orientation of a rigid body using rotation matrices and their properties. The document outlines topics on position, orientation, rotation matrices, and composition of rotations. It provides references to textbooks and papers on robotics and kinematics.

Uploaded by

Vu Trung Kien
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
47 views50 pages

Chương 02

This document provides an overview of spatial representations of rigid bodies. It discusses representing the position of a rigid body using the position vector of a point fixed to the body in Cartesian, cylindrical, or spherical coordinates. It also covers representing the orientation of a rigid body using rotation matrices and their properties. The document outlines topics on position, orientation, rotation matrices, and composition of rotations. It provides references to textbooks and papers on robotics and kinematics.

Uploaded by

Vu Trung Kien
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 50

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: Spatial Representations of Rigid Bodies (Part I)

3
• - Topic 2 -

• Spatial Representations of Rigid Bodies (Part I)

- Week 1 -
Outline

1. Introduction

2. Position of a Rigid Body

3. Orientation of a Rigid Body

4. Rotation Matrix

4.1. Properties and SO(3)


4.2. Interpretations of the Rotation Matrix
4.3. Composition of Rotations
Introduction

How to Move Towards an Object?


1. Reference frames (coordinates) are assigned to the desired parts
2. The position and orientation (of a frame) with respect to another (reference) frame is obtained
End effector
{E}

object
{O}

{F}
conveyor
belt

{B}
base
Introduction

Where is the Mobile Robot?


1. Reference frames (coordinates) are assigned to the desired parts
2. The position and orientation of the robot with respect to a reference frame is obtained

inertial robot {R}


{I}

https://www.nasa.gov/images/content/482680main_PIA09201-full.jpg
Introduction

Where are the Aerial Robots?


1. Reference frames (coordinates) are assigned to the desired parts
2. The position and orientation of the robots with respect to a reference frame is obtained

{R3} {R1}
{R2}

{I}
inertial
Introduction

How to interpret the sensor data?


1. Reference frames (coordinates) are assigned to the desired parts
2. The position and orientation of the sensor data with respect to a reference frame on the robot is
obtained

{R}
{I} {S}
sensor
robot

Image from: Kuindersma et al. Optimization-based Locomotion Planning, Estimation, and Control Design for the Atlas Humanoid Robot, Autonomous
Robots, July 2015
Introduction
… And a Humanoid Robot?
1. Several reference frames (coordinates) are assigned to
the desired parts (hands, feet, head, waist, chest, etc) {He}

2. The position and orientation of these parts with respect


to a reference frame is obtained {Ch}

{Hl}
{Wr}
{Hr}

{Fl}
{I} {Fr}

HRP-2 at LAAS-CNRS (Toulouse)


Outline

1. Introduction

2. Position of a Rigid Body

3. Orientation of a Rigid Body

4. Rotation Matrix

4.1. Properties and SO(3)


4.2. Interpretations of the Rotation Matrix
4.3. Composition of Rotations
Position of a Rigid Body

1. How to represent the position of a rigid body?


• Through the position of a point P fixed to the body
• Position vector: P = OP

P

OP

O

2. How many coordinates are needed? dof: degrees of freedom


• In 2D: 2 coordinates (2 dof)
• In 3D: 3 coordinates (3 dof)
3. Representations: Cartesian, cylindrical, spherical coordinates
Position of a Rigid Body

1. Cartesian coordinates

P
 x
z
ŷ p =  y 
x
 z 

y
2. Cylindrical coordinates
ẑ x =  cos 
P
  y =  sin 
Relation with
z
ŷ p =   Cartesian
coordinates
 z   = x2 + y 2

  = atan2( y, x)

Position of a Rigid Body

3. Spherical coordinates ẑ
P with:
r 
0  
p =  
r
 0    2
ŷ   r0


x = r sin  cos   = r sin 


y = r sin  sin  c = 
Relation with z = r cos  Relation with
z = r cos 
Cartesian cylindrical
coordinates coordinates
r = x2 + y 2 + z 2 (  ,c , z ) r =  2 + z2
( x, y , z )
 = cos −1 ( z / r )  = atan2(  , z )
 = atan2( y, x)  = c
Outline

1. Introduction

2. Position of a Rigid Body

3. Orientation of a Rigid Body

4. Rotation Matrix

4.1. Properties and SO(3)


4.2. Interpretations of the Rotation Matrix
4.3. Composition of Rotations
Orientation of a Rigid Body

1. How to represent the orientation of a rigid body?

Relation between

frames

{W}

O

2. How many coordinates are needed?


• In 2-D: 1 coordinate (1 dof)
• In 3-D: 3 coordinates (3 dof)
• In n-D: n(n-1)/2 coordinates
Orientation of a Rigid Body

1. In general:
• Orientation is not as straightforward as position.
• The problem is the topology of the space that describes the orientation (it is not Euclidean).
Example:

Description of the surface of a 2-D


sphere in the 3-D space
2. Representations of orientation:
Rotation matrix (implicit representation)
• Exponential coordinates.
Parameterizations
• Axis/angle representation: 3 parameters (minimal).
• Roll, Pitch, and Yaw angles: 3 parameters (minimal).
• Euler angles: 3 parameters (minimal).
• Quaternions: 4 parameters (implicit representation).
Outline

1. Introduction

2. Position of a Rigid Body

3. Orientation of a Rigid Body

4. Rotation Matrix

4.1. Properties and SO(3)


4.2. Interpretations of the Rotation Matrix
4.3. Composition of Rotations
Rotation Matrix

Frames
1. A frame is completely represented by its axes
2. Frame = coordinate system
3. Example: Frames {A} and {B}  
 

Remarks: - ^ represents a unit vector


- Super index represents the reference frame (with respect to …)
Rotation Matrix

Generic Rotation Matrix


With respect to {A}
• 2 frames: {A} and {B}
- Common origin ?
- Rotated ?
• Objective: describe frame {B} with respect to frame {A} ?

1. Coordinates of the axes of {B} with respect to {A} (using projections)

In vector form …
Rotation Matrix

Generic Rotation Matrix


• Coordinates of the axes of {B} with respect to {A}
- We want R so that the axes of {B} with respect to {A}:

- Matrix R is: Generic rotation matrix

• Rotation Matrix of frame {B} with respect to frame {A}

Every column represents the axes (x, y, z) of frame {B} with respect to frame {A}
Rotation Matrix

Generic Rotation Matrix


• Frame {B} with respect to frame {A}

• Frame {A} with respect to frame {B}

RA = ( RB )
B A T
Rotation Matrix

Generic Rotation Matrix


Example 1: Given the following frames {A} and {B} …

a) Obtain the rotation of frame {B} with respect to frame {A}


cos(90) cos(180) cos(90)  0 −1 0 
A
RB =  cos(0) cos(90) cos(90)  = 1 0 0 
cos(90) cos(90) cos(0)  0 0 1 
b) Obtain the rotation of frame {A} with respect to frame {B}
 cos(90) cos(0) cos(90)   0 1 0 
B
RA = cos(180) cos(90) cos(90)  =  −1 0 0 
 
 cos(90) cos(90) cos(0)   0 0 1 
Rotation Matrix

Generic Rotation Matrix


Example 2: obtain the rotation of frame {B} with respect to frame {A}
 cos( ) cos(90 +  ) cos(90) 
Rotation
𝜃
A
RB = cos(90 −  ) cos( ) cos(90) 
about z
 cos(90) cos(90) cos(0) 
𝜃 cos  − sin  0
RB =  sin  0 
Similarly, the rotation
𝜃 A
cos  about x or y is
 0 0 1  obtained.

Example 3: given the following rotation, plot frames {A} and {B}
0 −1 0 
A
RB = 0 0 −1
1 0 0 
Rotation Matrix

Generic Rotation Matrix


Example 4:
There is a table, and on the table there is a cube. There is a camera
over the center of the cube and its frame is {3}. Find the rotation
matrix that relates frame {2} to the camera frame {3}

0 1 0 
3
R2 = 1 0 0 
0 0 −1

(Adapted from Spong et al, Robot Modeling and


Control, 2006)
Rotation Matrix
Elementary Rotations
Rotation about the x axis

𝜃 1 0 0 
𝜃
Rx ( ) = 0 cos  − sin  
0 sin  cos  
𝜃

Rotation about the y axis


𝜃
 cos  0 sin  
Ry ( ) =  0 1 0 
 − sin  0 cos   𝜃
𝜃

𝜃 Rotation about the z axis


𝜃 cos  − sin  0
𝜃 Rz ( ) =  sin  cos  0 
 0 0 1 
Outline

1. Introduction

2. Position of a Rigid Body

3. Orientation of a Rigid Body

4. Rotation Matrix

4.1. Main Properties and SO(3)

4.2. Interpretations of the Rotation Matrix


4.3. Composition of Rotations
Properties of a Rotation Matrix

1. Transpose of a rotation matrix (R)

Every axes (𝑥,


ො 𝑦,
ො 𝑧)Ƹ is a unit
vector and is perpendicular to
the other 2
Note that matrix RT is also a rotation matrix:

The transpose is equal to the inverse:


R is an orthogonal matrix
Properties of a Rotation Matrix

1. Transpose of a rotation matrix (R)


• R is an orthogonal matrix:
→ It has orthogonal rows (and columns)
3 constraints

3 constraints

→ Its rows (and columns) are an orthonormal basis in ℝ^3 6 constraints

• R has 9 elements
• R has 6 constraints (due to the orthonormal columns)
• R has 9 – 6 = 3 degrees of freedom (only 3 dof for orientation)
• The rotation matrix is a redundant matrix!
Properties of a Rotation Matrix

2. Determinant of a rotation matrix (R)


RT R = I det( RT R) = det( I )
det( RT ) det( R) = 1 Property: det( RT ) = det( R)
( det( R) ) =1
2
z Right-handed frame:
det( R) = 1 xy = z
yz = x
In a right-handed frame (normally used): y
det( R) = +1 zx = y
x

 x1 y1 z1 
det( R) = x1 ( y2 z3 − y3 z2 ) − x2 ( y1 z3 − y3 z1 ) + x3 ( y1 z2 − y2 z1 )
R =  x2 y2 z2 
 x3 y3 z3  = x12 + x2 2 + x32 = 1

In a right-handed frame: y  z = ( y2 z3 − y3 z2 , z1 y3 − y1 z3 , y1 z2 − z1 y2 ) = ( x1 , x2 , x3 )
Rotation Group: SO(3)

1. The rotation group in ℝ3 is known as SO(3) and is defined as:

2. SO = Special Orthogonal
Orthogonal matrices
Special because the determinant is +1 (positive)

3. SO(3)
It represents rotations of rigid bodies
It is a mathematical formalism (a Lie group)
For a matrix R to be a rotation matrix, it must belong to SO(3): it
must satisfy RRT=I and det(R)=+1
Properties of a Rotation Matrix

1. Example 1
Do the following matrices represent rotation matrices?
a)  1 3 b)  1 3
− 0 −   − 0 − 
 2 2   2 2 
R1 =  0 1 0  R2 =  0 1 0 
   
− 3 0 −
1   3
0 − 
1
 2 2   2 2 

Solution
1
a) det R1 = It is not a rotation matrix
2

det R2 = 1
b) It is a rotation matrix
R2 R2T = I
Properties of a Rotation Matrix

1. Example 2
The following matrix is a rotation matrix. a) Compute its inverse, b) Verify that it is a rotation matrix,
c) Compute its transpose
 0.25 0.433 0.866 
R = 0.866 −0.50 0 
 0.433 0.75 −0.50 
Solution
a) Since it is a rotation matrix, its transpose is its inverse. Thus the inverse is:

 0.25 0.866 0.433 


RT = R −1 =  0.433 −0.50 0.75 
0.866 0 −0.50 
b) To verify, we need to check that det(R) = +1, and RRT = I
c) Its transpose is equal to its inverse and has been computed in a)
Code matlab

• R=[0.25,0.433,0.866;0.866,-0.5,0;0.433,0.75,-0.5]
a) inv(R)
b) det(R)
c) R’

34
Outline

1. Introduction

2. Position of a Rigid Body

3. Orientation of a Rigid Body

4. Rotation Matrix

4.1. Main Properties and SO(3)

4.2 Interpretations of the Rotation Matrix

4.2. Composition of Rotations


Interpretations of the Rotation Matrix

a) Representation of the Orientation


It describes the relative orientation between 2 reference frames

• Interpretation 1: Represents frame {B} in terms of frame {A}


• Interpretation 2: Takes frame {A} to frame {B}
• We start with the “reference frame” {A} (which is canonic in {A})
• We end in frame {B} (given by coordinates of {B} in {A})
Interpretations of the Rotation Matrix

b) Mapping between frames


It represents the same point in different frames

We want: start with point in {B} and represent it Point in frame {A} Point in frame {B}
in {A} (obtain the coordinates in {A})
Interpretations of the Rotation Matrix

b) Mapping between frames


Objective: start with point in {B} and represent it in {A} (obtain the coordinates in {A})
- How? Projecting the point on every axis of {A}

- In matrix form:

- Mapping of the point between frames:


Interpretations of the Rotation Matrix

b) Mapping between frames


1. Example
d1 P
a) Determine by inspection the coordinates of point P in frame B
d2 
B
p =  d1  d2
 0 
b) Starting with point P in frame B, determine its coordinates in frame A
0 −1 0 
- Rotation matrix: A
RB = 1 0 0 
0 0 1 

0 −1 0   d 2   −d1 
    
- Transformed point: A
p = A RB B p = 1 0 0   d1  =  d 2 
0 0 1   0   0 
Code matlab

syms d1 d2
• BP= [d2;d1;0]
• ARB= [cosd(90),-sind(90),0;...]
sind(90),cosd(90),0;...
0,0,1]
• AP=ARB*BP

40
Interpretations of the Rotation Matrix

c) Rotation Operator
It rotates a vector within the same reference frame
- In general: it rotates vector 𝒑1 an angle θ about axis 𝒌 to obtain 𝒑𝟐

- Example:
Find the resulting vector after rotating vector p1 = (0, 3, 1) an angle 30° about axis x
 0 
1 0 0  1 0

 
𝒑2 R(30, x) = 0 cos(30) − sin(30)  = 0 3
2
−1 
2
 
0 sin(30) cos(30)  0 1 3 
𝒑1  2 2
𝜃
0
 
p 2 = R (30, x)p1 =  1 
 3
 
Outline

1. Introduction

2. Position of a Rigid Body

3. Orientation of a Rigid Body

4. Rotation Matrix

4.1. Main Properties and SO(3)

4.2. Interpretations of the Rotation Matrix

4.2. Composition of Rotations


Composition of Rotations

1. Consider a point in 3 frames: {A}, {B}, {C}


Point P in frame {A}: Ap
Point P in frame {B}: Bp
Point P in frame {C}: Cp
2. Relations:
Point from frame {B} to frame {A}: A
p = A RB B p
Point from frame {C} to frame {B}: B
p = B RC C p
Point from frame {C} in frame {A}: A
p = ( A RB B RC ) C p

3. Composition of rotations: A
RC = A RB B RC
• Interpretations of ARC:
• It rotates point P from {C} to {B} and then from {B} to {A}
• It starts with frame {A}, then makes it coincident with {B}, and then with {C}
Composition of Rotations

a) Rotation with Respect to the Current (mobile) System


A post-multiplication with a rotation matrix is needed
Example 1
Initial frame: {0}
1º: Rotate θ1 about axis y0: Ry(θ1) → we obtain frame {1}
2º: Rotate θ2 about axis z1 (of the current system {1}): Rz(θ2) → we obtain
frame {2}
Resulting rotation: R = Ry(θ1) Rz(θ2)
1° z0 2° Final: z0
z1 z2 z1 y z
2 2 y2
y1 𝜃2
y1
𝜃1 y0 y0
x0 x2 x0 Ry (1 ) Rz ( 2 )
x1 Ry (1 ) x1 Rz ( 2 ) x2
Composition of Rotations

b) Rotation with Respect to the Fixed Frame


A pre-multiplication with a rotation matrix is needed
Example 2
Initial frame: {0}
1º: Rotate θ1 about frame y0: Ry(θ1) → we obtain frame {1}
2º: Rotate θ2 about frame z0 (of the initial, fixed {0}): Rz(θ2) → we obtain
frame {2}
1° z0 2° z0
Resulting rotation: R = Rz(θ2) Ry(θ1) z1 𝜃2
z2 y2
y1
𝜃1 y0 y0
x0 x0
x1 Ry (1 ) x2 Rz ( 2 )
Composition of Rotations

Example 3
Consider the following rigid body Then (2 cases):

First, apply a rotation of 90° about z.


a) Apply a rotation of 90° about the current (“new”) y axis Ry (90)
a) current y
b) Apply a rotation of 90° about the fixed y axis R = Rz (90) Ry (90)

Rz (90)

R = Ry (90) Rz (90)
Ry (90)
b) fixed y
Composition of Rotations

Example 4
Consider the following rigid body

First, apply a rotation of 90° about y. Then (2 cases):

a) Apply a rotation of 90° about the current (“new”) z axis Rz (90)


b) Apply a rotation of 90° about the fixed z axis a) current z
R = Ry (90) Rz (90)

Ry (90)

R = Rz (90) Ry (90)

Rz (90)
b) fixed z

Images from B. Siciliano et al, Robotics Modelling, Planning and Control, 2009
Composition of Rotations

Example 5
We apply the following rotations to a reference frame in the following order:
1. Rotation of θ about the current x axis
2. Rotation of ϕ about the current z axis
3. Rotation of α about the fixed z axis
4. Rotation of β about the current y axis
5. Rotation of γ about the fixed x axis
Write the expression of the resulting rotation matrix
Rx ( )
Rx ( ) Rz ( )
Rz ( ) Rx ( ) Rz ( )
Rz ( ) Rx ( ) Rz ( ) Ry ( )
R = Rx ( ) Rz ( ) Rx ( ) Rz ( ) Ry ( )
References

• Siciliano, Bruno, Sciavicco, Lorenzo, Villani, Luigi, y Oriolo, Giuseppe. Robotics: Modelling,
Planning and Control. Springer Science & Business Media, 2010 (Chapter 2.1-2.3)

• Spong, M. W., Hutchinson, S., & Vidyasagar, M. Robot Modeling and Control, Jon Wiley & Sons,
2006 (Chapter 2.1-2.4)

• Murray, Richard. M., Li, Z., Sastry, S. S., & Sastry, S. S. A Mathematical Introduction to Robotic
Manipulation. CRC press, 1994 (Chapter 2.1)

49
Thank you for your listening

50

You might also like