Chương 02
Chương 02
Robotics
1
Tài liệu tham khảo
2
Contents
Topic 1: Introduction
Topic 2: Basic robotic concepts
Topic 3: Spatial Representations of Rigid Bodies (Part I)
3
• - Topic 2 -
- Week 1 -
Outline
1. Introduction
4. Rotation Matrix
object
{O}
{F}
conveyor
belt
{B}
base
Introduction
https://www.nasa.gov/images/content/482680main_PIA09201-full.jpg
Introduction
{R3} {R1}
{R2}
{I}
inertial
Introduction
{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}
{Hl}
{Wr}
{Hr}
{Fl}
{I} {Fr}
1. Introduction
4. Rotation Matrix
OP
ŷ
O
x̂
1. Cartesian coordinates
ẑ
P
x
z
ŷ p = y
x
z
x̂
y
2. Cylindrical coordinates
ẑ x = cos
P
y = sin
Relation with
z
ŷ p = Cartesian
coordinates
z = x2 + y 2
= atan2( y, x)
x̂
Position of a Rigid Body
3. Spherical coordinates ẑ
P with:
r
0
p =
r
0 2
ŷ r0
x̂
1. Introduction
4. Rotation Matrix
Relation between
ẑ
frames
{W}
ŷ
O
x̂
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:
1. Introduction
4. Rotation Matrix
Frames
1. A frame is completely represented by its axes
2. Frame = coordinate system
3. Example: Frames {A} and {B}
In vector form …
Rotation Matrix
Every column represents the axes (x, y, z) of frame {B} with respect to frame {A}
Rotation Matrix
RA = ( RB )
B A T
Rotation Matrix
Example 3: given the following rotation, plot frames {A} and {B}
0 −1 0
A
RB = 0 0 −1
1 0 0
Rotation Matrix
0 1 0
3
R2 = 1 0 0
0 0 −1
𝜃 1 0 0
𝜃
Rx ( ) = 0 cos − sin
0 sin cos
𝜃
1. Introduction
4. Rotation Matrix
3 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
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)
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:
• 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
4. Rotation Matrix
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
- In matrix form:
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
4. Rotation Matrix
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
Example 3
Consider the following rigid body Then (2 cases):
Rz (90)
R = Ry (90) Rz (90)
Ry (90)
b) fixed y
Composition of Rotations
Example 4
Consider the following rigid body
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