Lecture 9: Introduction To Kinematics and Rotation Matrices: Vaibhav Srivastava
Lecture 9: Introduction To Kinematics and Rotation Matrices: Vaibhav Srivastava
Vaibhav Srivastava
Department of Electrical & Computer Engineering
Michigan State University
1 / 17
Introduction to Kinematics
2 / 17
Rotation Matrices
• the set of rotation matrices is the configuration space or part of the configuration
space of any object that rotates
• rotation matrices one can then use the motion planning algorithms to plan the
motion of three-dimensional objects such as aerial, space and underwater vehicles
3 / 17
Geometric objects and their algebraic representation
The 3-dimensional Euclidean space contains various useful geometric objects:
z0
• points
p
points
v · w = kv kkw k cos(θ)
• The cross product between free vectors (or outer product) is a vector with length
kv × w k = kv kkw k sin(θ),
• Both the dot product and the cross product are defined without any reference
frame
• An axis is a unit-length vector. The dot product of a vector with an axis is the
length of the projection of the vector onto the axis
5 / 17
Representing vectors and points as arrays
• Although the representations of points and free vectors are identical, but
• it makes no sense to rotate a point or to translate a free vector
6 / 17
Product between vectors using coordinates
v · w = (v 0 )> w 0 = v1 w1 + v2 w2 + v3 w3 ,
(v × w )0 = [v2 w3 − v3 w2 , v3 w1 − v1 w3 , v1 w2 − v2 w1 ]>
7 / 17
Geometric and algebraic viewpoints
Geometric Viewpoint
Algebraic Viewpoint
8 / 17
Geometric properties of rotations
• Rotations are operations on free vectors;
• they preserve length of vectors and angles between vectors.
Robotic Planning and Kinematics, v0.91(e) (11 Apr 2016). Chapter 6, slide 230
• In three-dimensional space, there are three independent basic rotations
• In vehicle kinematics, three basic angles are roll, pitch and yaw
• Rotations can be composed and the order of composition is essential.
• Each rotation admits an inverse rotation.
• Each rotation leaves one axis unchanged called the rotation axis
roll x-axis
pitch y-axis
yaw z-axis
Figure 6.2: The roll-pitch-yaw conventions for aircra�. The yaw axis points downward towards the ground. The 9 / 17
0 0
mposed rotation #2) = rotate about axis z0 by ⇡/2 and then about axis x0 by ⇡/2
Frames do not commute
ated graphically in Figure 6.3, it is easy to see that the composite rotation #1 is not e
• Composed rotation 1 = rotate about axis x0 by π/2 and then about axis z0 by π/2
omposite• rotation
Composed #2.
rotation 2 = rotate about axis z0 by π/2 and then about axis x0 by π/2
z0 z0 z0
2
C C B
` ` `
B A 2 D B D E
x0 x0 x0
z0 z0 z0
2
C A
` `
A
`
2
B A B E C B
x0 x0 x0
Figure 6.3: Rotations do not commute, i.e., the order of composition is essential.
10 / 17
Rotations may not be composed as though they were arrays
• Does
0 +90 0 +90
?
+90 + 0 + −90 = 0
0 0 0 0
11 / 17
out of the page). Let us assume that ⌃1 is obtained by rotating ⌃0 counterclockwise by an
angle ✓. The array representation in the frame ⌃0 of the basis vector x1 for the frame ⌃1 is
Representing reference frames
y0
y1
x1
✓
x0
Figure 6.4: Two example reference frames with the same origin
• Consider two reference frames Σ0 = (O0 , {x0 , y0 }) and Σ1 = (O1 , {x1 , y1 }) in the
plane with the same origin0O0 =xO
1 1· x0 cos ✓
x1 = = .
x1 ·counterclockwise
• Let Σ1 be obtained by rotating Σ y0 sin ✓ by an angle θ
0
Now, define
• Thea 2array reference-frame
⇥ 2 representation in rotation
the framematrix
Σ0 of (representing
the basis vector⌃1x1with respect
for the frametoΣ⌃
1 0is) by
0
⇥ 0 ⇤
x x01=· x0x1 y· 1x0· x=
0
θ
cos cos(✓) sin(✓)
0
R1 = x 1 | y 1 = 1 x · y =sin θ . (6.1)
x1 · y0 y1 · y0
1 0 sin(✓) cos(✓)
12 / 17
Reference frame rotation matrix
• θ ∈ [−π, π) = S1 , or
13 / 17
The fundamental advantage of the rotation matrix representation is that it naturally extends
to problems in three dimensions. Indeed, let us write down 3-dimensional reference frames and
Three-dimensional reference frames
understand 3-dimensional reference-frame rotation matrices. Given two reference frames ⌃0 =
z0
z1
y1
y0
x0 x1
Figure 6.5: Two example reference frames with the same origin in three dimensions
• Consider two reference frames Σ0 = (O0 , {x0 , y0 , z0 }) and Σ1 = (O1 , {x1 , y1 , z1 })
(O0 , {x0 , y0 , z0 }) and ⌃1 = (O1 , {x1 , y1 , z1 }) with the same origin O0 = O1 in 3-dimensions,
in the plane with the same origin O0 =⌃1O
the reference-frame rotation matrix describing 1 respect to ⌃0 is defined by
with
2 3
x1 · x0 y1 · x0 z 1 · x0
• reference frame rotation matrix
⇥ representing
⇤
R 0 = x0 | y 0 | z 0 = 4 x · y
Σ wrt Σ is given (6.2)
y · y1 z · y 5 .0
by
1 1 1 1 1 0 1 0 1 0
y1 · z 0 z 1 · z 0
x1 · z 0
x1 · x0 y1 · x0 z1 · x0
R10 = [x10 y10 z10 ] = x1 · y0 y1 · y0 z1 · y0
x1 · z0 y1 · z0 z1 · z0
• Also known as the “direction cosine matrix”
15 / 17
entries in equation (6.2), one can immediately establish
R01 = (R10 )T .
Changes of reference frame
We continue to consider two frames ⌃0 and ⌃1 with the same origin.
Lemma 6.3
Lemma: (Coordinate
Given a 1pointtransformation) Given a frames
p and two reference point p and
Σ0 two
andreference
Σ1 , the frames
arrays ⌃p00 and
and⌃p1 ,1
the arrays p and p are related through
0
are related through
pp0 0==RR
0 01 1
1 p1 p
.
!
Proof. First, write the geometric decomposition of vector O0 p with respect to {x1 , y1 , z1 }:
! ! ! !
O0 p = O0 p · x 1 x 1 + O0 p · y 1 y 1 + O0 p · z 1 z 1 .
Second, express the le�-hand side and the right-hand side with respect to ⌃0 :
! ! ! !
p0 = (O0 p)0 = O0 p · x1 x01 + O0 p · y1 y10 + O0 p · z1 z10
2 ! 3
O0 p · x1
⇥ 0 ⇤ 6 ! 7
= x1 | y10 | z10 4 O0 p · y1 5 = R10 p1 .
!
O0 p · z 1
⌅
• The superscript of RHS (resp. LHS) p matches subscript (resp. superscript) of R
15 / 17
The
Subsection 11: The three three
basic basic rotations
rotations
• Consider two reference frames Σ0 = (O0 , {x0 , y0 , z0 })
and Σ1 = (O1 , {x1 , y1 , z1 }) in the plane with the same
origin O0 = O1
Consider two frames ⌃0 = (O0 , {x0 , y0 , z0 })Robotic
and ⌃ 1 = (O1 , {x1 , y1 , z1 }) with the same origin
Planning and Kinematics, v0.91(e) (11 Apr 2016).
1 . Iftwo
O0•=IfOthe the two frames
frames share
share the the same
same z-axis,
z-axis, that thatis,is,if if z0 = z1 , then there must exist an
z0 = z1
anglez0✓ =
such z1 ,that
then there must exist an angle θ such that
(
x1 = cos(✓)x0 + sin(✓)y0 ,
y1
y1 = sin(✓)x0 + cos(✓)y0 ,
y0
2 3
0 x0 ✓
so that, since z10 = 405,
x1
1
Figure 6.6: The frame ⌃1 obtained by rotating about z0 by ✓
2 3
cos(✓) sin(✓) 0
R10 = 4 sin(✓)twocos(✓) 05and,
basis vectors . in summary, the three basic rotations about the th
0 0 1
2 3 2 16 / 17
Thethethree
two basis vectors and, in summary, basicrotations
three basic rotations
about the three orthogonal axes are
The three basic rotations about the three orthogonal axes are
2 3 2 3
1 0 0 cos(✓) 0 sin(✓)
4
Rotx (✓) = 0 cos(✓) sin(✓)5 , Roty (✓) = 4 0 1 0 5,
0 sin(✓) cos(✓) sin(✓) 0 cos(✓)
2 3
cos(✓) sin(✓) 0
Rotz (✓) = sin(✓) cos(✓) 05 .
4 (6.3)
0 0 1
17 / 17
Thethethree
two basis vectors and, in summary, basicrotations
three basic rotations
about the three orthogonal axes are
The three basic rotations about the three orthogonal axes are
2 3 2 3
1 0 0 cos(✓) 0 sin(✓)
4
Rotx (✓) = 0 cos(✓) sin(✓)5 , Roty (✓) = 4 0 1 0 5,
0 sin(✓) cos(✓) sin(✓) 0 cos(✓)
2 3
cos(✓) sin(✓) 0
Rotz (✓) = sin(✓) cos(✓) 05 .
4 (6.3)
0
Robotic Planning and Kinematics, v0.91(e) (11 Apr 2016). 0 1 Chapter 6, slide 241
Every one of the three matrices satisfies the following algebraic properties:
Rotz (0) = I3 ,
Rotz (✓) · Rotz ( ) = Rotz (✓ + ),
1
(Rotz (✓)) = (Rotz (✓))T = Rotz ( ✓),
17 / 17