Geometry
Kinematics
and Dynamics ×
for Robotics ×
A Summary
Philippe Nadeau
July 1, 2025
2
Contents
1 Introduction 7
1.1 Our Robotics Notation Convention . . . . . . . . . . . . . . . . 8
2 Geometry 13
2.1 Vectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.2 Coordinate Systems . . . . . . . . . . . . . . . . . . . . . . . . 14
2.2.1 Alternate Conventions . . . . . . . . . . . . . . . . . . . 15
2.3 Orientations And Rotations . . . . . . . . . . . . . . . . . . . . 16
2.3.1 The Group of Rotation Matrices . . . . . . . . . . . . . 16
2.3.2 Interpreting Rotation Matrices . . . . . . . . . . . . . . 17
2.3.3 Composing Rotations . . . . . . . . . . . . . . . . . . . 18
2.3.4 Axis-Angle Representation . . . . . . . . . . . . . . . . 20
2.3.5 Unit Quaternions . . . . . . . . . . . . . . . . . . . . . . 22
2.4 Positions And Translations . . . . . . . . . . . . . . . . . . . . 28
2.5 Poses And Rigid Transformations . . . . . . . . . . . . . . . . . 29
2.5.1 Change of Coordinate System . . . . . . . . . . . . . . . 30
2.5.2 Screws and Twists . . . . . . . . . . . . . . . . . . . . . 31
2.6 Reverses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
2.7 Forward Kinematics . . . . . . . . . . . . . . . . . . . . . . . . 34
2.7.1 Product of Matrix Exponentials . . . . . . . . . . . . . 34
2.7.2 Denavit-Hartenberg Parameters . . . . . . . . . . . . . . 35
2.8 Inverse Kinematics . . . . . . . . . . . . . . . . . . . . . . . . . 38
2.8.1 Analytic Methods . . . . . . . . . . . . . . . . . . . . . 38
2.8.2 Numerical Methods . . . . . . . . . . . . . . . . . . . . 39
2.9 Key Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
3 Kinematics 43
3.1 Velocity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
3.1.1 Point on a Rotating Body . . . . . . . . . . . . . . . . . 44
3
4 CONTENTS
3.2 Rotation Time Derivative . . . . . . . . . . . . . . . . . . . . . 45
3.3 Velocity Twists . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
3.3.1 Interpretation . . . . . . . . . . . . . . . . . . . . . . . . 46
3.3.2 Point on a Rotating Body . . . . . . . . . . . . . . . . . 47
3.3.3 Coordinate System Change . . . . . . . . . . . . . . . . 47
3.3.4 Observation Point Change . . . . . . . . . . . . . . . . . 47
3.4 Acceleration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
3.4.1 Point on a Rotating Body . . . . . . . . . . . . . . . . . 48
3.5 Acceleration Twists . . . . . . . . . . . . . . . . . . . . . . . . 49
3.6 Key Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
4 Rigid Body Dynamics 51
4.1 Inertial Frame of Reference . . . . . . . . . . . . . . . . . . . . 51
4.2 Moments in Dynamics . . . . . . . . . . . . . . . . . . . . . . . 52
4.3 Moments of a Mass Distribution . . . . . . . . . . . . . . . . . 53
4.3.1 Zeroth Moment: Total Mass . . . . . . . . . . . . . . . . 54
4.3.2 First Moment: Centre of Mass . . . . . . . . . . . . . . 54
4.3.3 Second Moment: Inertia Tensor . . . . . . . . . . . . . . 54
4.4 Momentum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
4.4.1 Moment of Momentum . . . . . . . . . . . . . . . . . . . 58
4.4.2 With Body-Frame Along Principal Axes . . . . . . . . . 59
4.5 Energies, Work, and Power . . . . . . . . . . . . . . . . . . . . 60
4.5.1 Kinetic Energy . . . . . . . . . . . . . . . . . . . . . . . 60
4.5.2 Potential Gravitational Energy . . . . . . . . . . . . . . 61
4.5.3 Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
4.5.4 Power . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
4.6 Spatial Inertia Matrix . . . . . . . . . . . . . . . . . . . . . . . 62
4.7 Newtonian Mechanics . . . . . . . . . . . . . . . . . . . . . . . 63
4.7.1 Force . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
4.7.2 Torque . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
4.7.3 Newton-Euler Equations . . . . . . . . . . . . . . . . . . 68
4.7.4 Euler’s Laws . . . . . . . . . . . . . . . . . . . . . . . . 70
4.7.5 Euler’s Equations for the Motion of a Body in a Force
Field . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
4.8 Contacts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
4.8.1 The Rigid Body Assumption . . . . . . . . . . . . . . . 71
4.8.2 Types of Frictional Contacts . . . . . . . . . . . . . . . 72
4.8.3 Computing Contact Forces . . . . . . . . . . . . . . . . 75
4.8.4 Multi-Object Interactions . . . . . . . . . . . . . . . . . 81
4.9 Key Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
CONTENTS 5
5 Manipulator’s Dynamics 83
5.1 Lagrangian Mechanics . . . . . . . . . . . . . . . . . . . . . . . 83
5.1.1 Coordinates, Configurations, and Constraints . . . . . . 83
5.1.2 Jacobians . . . . . . . . . . . . . . . . . . . . . . . . . . 84
5.1.3 Hessian . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
5.1.4 Virtual Displacement and Virtual Work . . . . . . . . . 88
5.1.5 D’Alembert Principle . . . . . . . . . . . . . . . . . . . 89
5.1.6 Lagrange’s Equation Of Motion . . . . . . . . . . . . . . 90
5.1.7 Serial Robot Joint-Space Dynamics in Matrix Form . . 92
5.1.8 An Outlook on Lagrangian and Newtonian Mechanics . 94
5.2 Inverse Dynamics for Control . . . . . . . . . . . . . . . . . . . 94
5.2.1 Kinematics Iterations . . . . . . . . . . . . . . . . . . . 95
5.2.2 Dynamics Iterations . . . . . . . . . . . . . . . . . . . . 96
5.3 Direct Dynamics for Simulation . . . . . . . . . . . . . . . . . . 97
5.4 Calibration and Identification . . . . . . . . . . . . . . . . . . . 98
5.4.1 Robot Arm Kinematic Calibration . . . . . . . . . . . . 100
5.4.2 Hand-Eye-Robot-World Calibration . . . . . . . . . . . 104
5.4.3 Inertial Parameters Identification . . . . . . . . . . . . . 104
5.5 Key Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
A A Summary’s Summary 111
A.1 Geometry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
A.2 Kinematics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
A.3 Dynamics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
A.3.1 Newtonian Mechanics . . . . . . . . . . . . . . . . . . . 118
A.3.2 Lagrangian Mechanics . . . . . . . . . . . . . . . . . . . 119
B Useful Mathematical Formulas 123
B.1 Exponentials and Logarithms . . . . . . . . . . . . . . . . . . . 123
B.2 Trigonometric Identities . . . . . . . . . . . . . . . . . . . . . . 124
B.3 Taylor Series Expansion . . . . . . . . . . . . . . . . . . . . . . 124
B.4 Calculus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
B.5 Norms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
B.6 Matrix Properties . . . . . . . . . . . . . . . . . . . . . . . . . . 127
C Skew-Symmetric Operator 129
C.1 Similarity Transform over [u]x[v]x . . . . . . . . . . . . . . . . . 130
C.1.1 Longer Derivation . . . . . . . . . . . . . . . . . . . . . 130
D Rotation Time Derivative 131
6 CONTENTS
E Inertia Tensor Derivation 133
F Expressing Inertia Tensors in Any Frame 137
Chapter 1
Introduction
Robotics is a peculiar field in that, in contrast to many fields like physics or
medicine that study the natural world, it is a field that strive to material-
ize concepts imagined by humans. Robots have been artistic creations, with
the work of Karel
ˇ
Capek and Isaac Asimov most notably, well before the ad-
vent of the first industrial robots. To this day, roboticists pursue the goal,
perhaps pointlessly, of materializing the cultural concept of a robot as an au-
tonomous human-like machine capable of performing any task with perfect
assiduity. The field of robotics is perhaps not defined, like other fields, as the
study of phenomena that exist or existed in the natural world, but rather as
an effort to develop the physical counterpart of an idea. The search for tech-
nologies, materials, techniques, and systems that might result in improved
robots has led researchers to explore a wide range of fields, including mathe-
matics, biology, physics, etc. Meanwhile, students entering the field of robotics
might be coming from a well-established discipline like electrical engineering
or computer science that might not have covered some of the fundamental
concepts of robotics. Notably, fundamental concepts of geometry, kinematics,
and dynamics are often learned after the facts, and often misunderstood. Real
robots being subject to the dynamics of the physical world, a solid understand-
ing of dynamics is essential to the design of effective robotic systems. While
this information is often available in robotics textbooks, it is often scattered
across books and chapters, making it difficult for a newcomer to get a clear
and concise overview of the fundamental concepts of geometry, kinematics,
and dynamics. This book aims at providing a summary of essential robotics
prerequisite concepts in a concise manner, without assuming prior dynamics
knowledge, and with an emphasis on detailed and clear derivations.
7
8 CHAPTER 1. INTRODUCTION
Readers are encouraged to treat this book as a handbook : a small textbook
that can be quickly consulted and that is not meant to be read from cover to
cover. At the end of each chapter, a summary of key concepts is provided and
references are suggested for further reading. Additionally, the first appendix
provides a summary of the most important equations and concepts covered in
the book, and can serve as a quick refresher that can be read in under an hour.
1.1 Our Robotics Notation Convention
This book covers a wide range of concepts yet aims at being succint. To
accomplish this feat, we use equations to concisely encode information that
could have taken a whole paragraph if written in prose. However, condensing
information in this way introduces the challenge of devising a code that can be
used to encode and decode information easily. Fortunately, the field of math-
ematics, over many centuries, has defined an efficient code that we can use.
Fran¸cois Vi`ete (1540-1603), a mathematician who made great contributions
to algebraic notation, also worked as a code breaker for French kings, giving
them the ability to decipher some of the enemy’s critical communications. In
robotics, we need to slightly expand the conventional mathematical notation
to concisely encode specific information used frequently in our field (e.g., the
velocity of a mobile robot as seen from another one). Akin to the early days of
mathematics, there is currently no widely dominating standard for robotics no-
tation apart from what is borrowed from mathematics and physics. However,
roboticists needs are apparent: people desire a clear, concise, and consistent
notation.
We will distinguish between distinguish scalars from vectors and matrices
by using a different typography for each mathematical object. While vectors
will be denoted using bold lowercase letters (e.g. v), matrices will be denoted
using bold uppercase letters (e.g. M), and scalars will be denoted using normal
weight letters (e.g. m or K).
In this book, we will make use of the RIGID notation that is designed to be
compliant with the ISO 80000 Standard on Quantities and Units, and concise
yet unambiguous. The RIGID notation defines the relative position of three
main symbols (subject, basis and coordinate system) around a central element
(the quantity) as shown in Fig. 1.1. The quantity is the main concept that an
equation puts in relation with other concepts. For instance, Newton’s second
law can be encoded in the equation f = ma that relates three quantities: force,
mass, and acceleration. In robotics, it is often desired to encode the object
whose state is referred to by the quantity (e.g. the velocity of the drone). The
RIGID notation refers to this element as the subject the information encoded
1.1. OUR ROBOTICS NOTATION CONVENTION 9
c
b
Q
s
Figure 1.1: The main symbols used in the RIGID notation convention. The
quantity Q is potentially surrounded by subject s, basis b, coordinate system
c, and other symbols used to express exponentiation, transposition, time dif-
ferentiation, etc.
is the quantity of the subject. The principle of relativity, which essentially
states that relative quantities matter in physics (in contrast to absolute ones),
is central to our understanding of physics. Hence, it is necessary to specify
relative to what object a given quantity is measured, observed, or defined. In
the RIGID convention, this element is referred as the basis. Hence, the quantity
of interest is specifically the one of the subject as seen from the basis (e.g. the
velocity (quantity) of the drone (subject) as observed from the car (basis)).
In theory, the three elements (quantity, subject, basis) are sufficient to build
well-defined equations relating most robotics concepts grounded in physics.
However, robotics in inherently practical, and quantities eventually have to be
computed to enable the robots to move according to plan. That is to say that
an additional code has to be used to translate concepts into numbers that can
be processed by our mathematical tools. As we will see in Sec. 2.2, a coordinate
system enables encoding physical concepts into sequences of numbers, and the
coordinate system is the final piece needed in a well-defined robotics notation.
Mentionning every element of every symbol in every equation can hinder
the objective of efficiently communicating ideas, the original reason for which
symbols and equations are used instead of prose. Hence, the RIGID convention
defines rules that, when followed correctly, enable conciseness without creating
any ambiguity. In essence, the rules boils down to:
mentioning the coordinate system can be ommitted if it is the same as
the basis;
mentioning the basis can be ommitted if the context allows only for one;
and
mentioning the subject can be ommitted if the context allows only for
one.
For instance, if the coordinate system symbol is ommitted for a quantity in
an equation and the RIGID convention was used, it can be assumed that the
10 CHAPTER 1. INTRODUCTION
coordinate system is the same as the basis the information is not lost in
the encoding. In other words,
b
Q
s
b
b
Q
s
(1.1)
and if the context allows for only one basis (e.g. the control of a single drone
by a fixed operator),
Q
s
b
Q
s
b
b
Q
s
, (1.2)
which can be further simplified to
Q (1.3)
when the subject is the only one that can be referred to in the context.
The RIGID notation make space for common operators like transposition,
exponentiation, differentiation, etc. For instance, if p is the symbol denoting
the position of the subject,
w
car
˙
p
T
boat
=
5 0 0
(1.4)
can be the velocity of the boat as seen from the car and expressed in the F
w
coordinate system. Since the transpose of the velocity results in a row vector,
we can deduce that the coordinates of the position p are expressed in a column
vector.
In the following chapters, a special basis called world frame will be fre-
quently used and the letter w will be used to denote it. The world frame will
be assumed to be an inertial frame, an important characteristic that is cov-
ered in Sec. 4.1. Also, the subject will often consist in a rigid body (e.g. the
gripper of a robot manipulator) to which a body frame, symbolized with b, will
be associated. In many scenarios, only the world and body frames are needed
to fully define the kinematics and dynamics of a robot.
To make it easier to keep track of all the symbols used in the following
chapters, a table of frequently used symbols is provided in Table 1.1.
1.1. OUR ROBOTICS NOTATION CONVENTION 11
Table 1.1: Notation and common symbols used throughout this book
Expression Description (w.r.t with respect to)
ˆ
i Unit-length vector i
a
T
Transpose of a
[a]
×
Skew-symmetric operation on a
a · b = a
T
b Dot product between vector a and b
a × b = [a]
×
b Cross product of a on b
M
1
Inverse of matrix M
F
o
Cartesian reference frame named o
{w} Coordinate system named w
c
b
p
a
Position of a w.r.t. b, expressed in c
b
R
a
Rotation/Orientation of a w.r.t. b
c
b
T
a
Pose of a w.r.t. b, with position expressed in c
˙
a First derivative of a w.r.t. time
¨
a Second derivative of a w.r.t. time
c
b
v
a
Linear velocity of a relative to b, expressed in c
ω Angular velocity
a Linear acceleration
α Angular acceleration
c
b
ν
a
= [
c
b
v
a
,
c
b
ω
a
]
T
Spatial/six-dimensional (6D) velocity
c
b
λ
a
= [
c
b
a
a
,
c
b
α
a
]
T
Spatial (6D) acceleration
ρ(p) Mass density function
m Mass
c Centre of mass, also symbolized with
c
b
I
a
Inertia tensor of a computed w.r.t. b, expressed in c
c
b
I
a
Spatial (6D) inertia matrix of body a computed
w.r.t. b, expressed in c
c
b
f
a
Force exerted at a, experienced in b, expressed in c
c
b
τ
a
Torque exerted at a, experienced in b, expressed in c
c
b
W
a
= [
c
b
f
a
,
c
b
τ
a
]
T
Wrench (6D)
c
b
E
a
= m
c
b
v
a
Linear momentum
c
b
ε
a
Real angular momentum when velocity is
c
b
ν
a
c
b
K
a
Kinetic energy when velocity is
c
b
v
a
g 9.81ˆg Gravitational force on earth
W =
R
f(s)ds Work (scalar)
P = f ·
˙
p Power (scalar)
U Potential gravitational energy (scalar)
q Generalized coordinates
Q Generalized forces
M(q) System’s mass matrix
C(q,
˙
q) System’s Coriolis matrix
g(q) System’s gravity matrix
12 CHAPTER 1. INTRODUCTION
Chapter 2
Geometry
2.1 Vectors
The position of a particle exists in space even when no mathematical represen-
tation is used to express its position, it’s a natural phenomenon. Consequently,
the distance between two particles a and b also exists in space even though no
representation system is used to describe the distance. This is like having a
map with no scale the distance between two points on the map exists but
cannot be quantified. A free vector
a
p
b
connects both particles by starting at
a and reaching b but is not grounded in any representation. In other words,
a free vector has a magnitude and direction but is not fixed in space no
coordinates are defined for it. Many physical quantities are free vectors, and
the relation between them can be described by vector equations. Many vector
equations are independent of the coordinate system used to express the vectors
in physics, most of the time, relative quantities matter more than absolute
ones.
The extent to which a vector v is aligned with a unit vector ˆu is given by
projecting the first vector onto the second vector with
v · ˆu = v
T
ˆu = vucos(θ), (2.1)
where θ is the angle between the two vectors. In 3D, vectors v and u span a
plane that passes through the origin. The normal to the plane is given by the
cross product of the two vectors with
v × u = [v]
×
u = vusin(θ)ˆn, (2.2)
13
14 CHAPTER 2. GEOMETRY
where ˆn is the unit vector normal to the plane spanned by v and u, and [·]
×
is
the skew-symmetric matrix defined in appendix C. Note that the cross-product
is well-defined only in 3D. For this reason, and since the cross-product appears
in many equations, we will restrict ourselves to the 3D space.
θ
v
ˆu
v · ˆu
θ
v
u
v × u
Figure 2.1: On the left, v is projected onto ˆu and the extent of the projection is
given by the dot product. On the right, the cross product of v and u produces
a vector that is orthogonal to the plane spanned by v and u.
2.2 Coordinate Systems
A coordinate system {w} defined by a reference frame F
w
(i.e. its axes) and a
length scale (e.g. meters) can be used to ground positions in a mathematical
representation, enabling the usage of algebra on positions. A free vector that
is expressed in some referenced frame is sometimes called a line vector.
Assuming that vectors are described by 3 × 1 matrices, the coordinate of
a vector v on a basis vector ˆx is given by the extent of the projection of v
onto ˆx with v · ˆx. Relative to three orthogonal basis vectors ˆx, ˆy, and ˆz, the
coordinates of a vector v are given by
v · ˆx
v · ˆy
v ·ˆz
=
ˆx
T
ˆy
T
ˆz
T
|{z}
F
w
v (2.3)
= F
w
v, (2.4)
where
F
w
=
ˆx
T
ˆy
T
ˆz
T
=
ˆx
1
ˆx
2
ˆx
3
ˆy
1
ˆy
2
ˆy
3
ˆz
1
ˆz
2
ˆz
3
(2.5)
2.2. COORDINATE SYSTEMS 15
is the matrix that defines the reference frame F
w
with the basis vectors ˆx, ˆy,
and ˆz in the first, second, and third rows, respectively. This is the orientation
specification of the reference frame F
w
.
In 3D, a Cartesian reference frame F
w
is defined by
F
w
=
ˆw
x
ˆw
y
ˆw
z
T
, (2.6)
where the elements ˆw
x
, ˆw
y
, ˆw
z
of the matrix are (by definition) unit vectors
that are orthogonal to each other, implying that ˆw
T
x
ˆw
x
= 1 and ˆw
T
x
ˆw
y
=
ˆw
T
x
ˆw
z
= 0. The reference frame F
w
is therefore defined by a 3 × 3 matrix,
which is an element of a group called SO(3).
The orientation of a reference frame F
b
with respect to a reference frame
F
a
can be described with a rotation
a
R
b
, an orientation specification that is
further detailed in Sec. 2.3. Since the orientation of a reference frame relative
to another is independent of the position of the frames, no coordinate system
is needed to describe a rotation and its notation has no right sub-script.
2.2.1 Alternate Conventions
When defining the reference frame, the first axis ˆw
x
can be chosen arbitrarily
and the second axis ˆw
y
must lie in the plane perpendicular to ˆw
x
. The line
of the last axis ˆw
z
is determined as being orthogonal to the plane spanned
by ˆw
x
and ˆw
y
but its direction can be chosen, giving rise to two conventions:
left-handedness and right-handedness. By far, the most common convention is
the right-handedness where the direction of the ˆw
z
axis is given by the middle
finger of the right hand if the thumb is pointing in the ˆw
x
direction and the
index is pointed in the ˆw
y
direction as shown in Fig. 2.2. Mathematically,
ˆw
z
= ˆw
x
× ˆw
y
, (2.7)
which respects Hamilton’s convention for the cross product Hamilton is
the godfather of many important concepts in mathematics and physics. The
analog left-handed convention makes use of the left hand instead of the right
hand and its use is discouraged in robotics as it leads to confusion.
Expressed in coordinate system {w}, the position of particle b relative to
particle a is well-defined as
w
a
p
b
. This position vector can be laid out in a row
vector or in a column vector, giving rise to yet another convention. A homo-
geneous transformation T is applied to a column vector by pre-multiplying it
while the same transformation is applied to a row vector by post-multiplying
it by the transpose of the transformation. By far, the column vector is
the most widely used in robotics.
16 CHAPTER 2. GEOMETRY
ˆx
ˆy
ˆz
Figure 2.2: The right-hand can be used to form a coordinate system that
respects Hamilton’s convention for the cross product.
2.3 Orientations And Rotations
2.3.1 The Group of Rotation Matrices
A 3 × 3 rotation matrix has nine degrees of freedom but, in 3D, a rotation
has only three. Therefore, not every 3 × 3 matrix is a valid rotation matrix.
To represent a rotation, all columns of the matrix must be orthogonal to
each other. Also, all columns of the matrix must have a unit norm (making
columns orthonormal ). Together, these criterias imply six constraints (three
per criteria). Finally, a rotation is said to be proper if its determinant is
positive, as a rotation matrix with a negative determinant would correspond
to a rotation followed by a reflection (an improper rotation).
Mathematically, the set of valid rotation is the Special Orthogonal Group
(abbreviated SO(3)) defined as
SO(3) =
R
3×3
| R
T
R = 1
3×3
, det (R) = +1
. (2.8)
More generally, a group is a set G on which a binary operator O{} is defined
such that four axioms are respected:
Closure: The result from the operator is also in the group (O{a, b} G).
2.3. ORIENTATIONS AND ROTATIONS 17
Identity: There exist a unique element I in the group such that O{a, I} =
O{I, a} = a for any a G.
Inverse: For any a G, there is a unique element a
1
G such that
O{a, a
1
} = O{a
1
, a} = I.
Associativity: For any a, b, c G, O{c, O{a, b}} = O{a, O{b, c}}
For rotation matrices, the operator of the group is matrix multiplication, which
composes rotations.
2.3.2 Interpreting Rotation Matrices
In 3D, rotation matrices are 3 × 3 matrices that exhibit the same properties
as those of the reference frames detailed in Sec. 2.2. They are used to express
the orientation of a reference frame F
b
relative to a reference frame F
a
with
F
a
· F
T
b
=
ˆa
x
ˆa
y
ˆa
z
·
ˆ
b
x
ˆ
b
y
ˆ
b
z
=
ˆa
x
·
ˆ
b
x
ˆa
x
·
ˆ
b
y
ˆa
x
·
ˆ
b
z
ˆa
y
·
ˆ
b
x
ˆa
y
·
ˆ
b
y
ˆa
y
·
ˆ
b
z
ˆa
z
·
ˆ
b
x
ˆa
z
·
ˆ
b
y
ˆa
z
·
ˆ
b
z
=
a
R
b
(2.9)
such that
F
b
= F
b
· F
T
a
F
a
=
b
R
a
F
a
, (2.10)
where the vectors defining the reference frames are row unit vectors placed in
the physical world.
The ij-th element of rotation matrix
a
R
b
describes the orientation of i-th
axis of frame F
a
relative to the j-th axis of frame F
b
it is effectively the
projection of the i-th axis of frame F
a
onto the j-th axis of frame F
b
. More
precisely, the ij-th element is equal to the cosine of the angle θ
ij
between
a
i
and b
j
, and for that reason, the rotation matrix is sometimes called the
directional cosine matrix. Noting the definition of the dot product as a
i
·b
j
=
a
i
b
j
cos(θ
ij
) and since both axes are unit vectors,
cos(θ
ij
) = a
i
· b
j
= a
i
T
b
j
= b
j
T
a
i
, (2.11)
which supports defining the rotation matrix as
a
R
b
=
cos(θ
xx
) cos(θ
xy
) cos(θ
xz
)
cos(θ
yx
) cos(θ
yy
) cos(θ
yz
)
cos(θ
zx
) cos(θ
zy
) cos(θ
zz
)
=
ˆa
T
x
ˆ
b
x
ˆa
T
x
ˆ
b
y
ˆa
T
x
ˆ
b
z
ˆa
T
y
ˆ
b
x
ˆa
T
y
ˆ
b
y
ˆa
T
y
ˆ
b
z
ˆa
T
z
ˆ
b
x
ˆa
T
z
ˆ
b
y
ˆa
T
z
ˆ
b
z
. (2.12)
18 CHAPTER 2. GEOMETRY
a
R
b
=
F
a
F
a
F
a
ˆ
b
x
ˆ
b
y
ˆ
b
z
Figure 2.3: Visual interpretation of the rotation matrix
a
R
b
with respect to the
reference frame F
a
. The columns of the rotation matrix express the direction
of the axes of reference frame F
b
relative to reference frame F
a
.
Computing the transpose of (2.12) gives
a
R
T
b
=
ˆa
T
x
ˆ
b
x
ˆa
T
x
ˆ
b
y
ˆa
T
x
ˆ
b
z
ˆa
T
y
ˆ
b
x
ˆa
T
y
ˆ
b
y
ˆa
T
y
ˆ
b
z
ˆa
T
z
ˆ
b
x
ˆa
T
z
ˆ
b
y
ˆa
T
z
ˆ
b
z
T
=
ˆ
b
T
x
ˆa
x
ˆ
b
T
x
ˆa
y
ˆ
b
T
x
ˆa
z
ˆ
b
T
y
ˆa
x
ˆ
b
T
y
ˆa
y
ˆ
b
T
y
ˆa
z
ˆ
b
T
z
ˆa
x
ˆ
b
T
z
ˆa
y
ˆ
b
T
z
ˆa
z
=
cos(θ
xx
) cos(θ
yx
) cos(θ
zx
)
cos(θ
xy
) cos(θ
yy
) cos(θ
zy
)
cos(θ
xz
) cos(θ
yz
) cos(θ
zz
)
=
b
R
a
,
which shows that the transpose of a rotation matrix is its inverse operation:
a
R
1
b
=
a
R
T
b
=
b
R
a
. (2.13)
While a rotation can be expressed in many different representations, the
rotation matrix is usually the easiest to interpret by inspecting how its axes
are oriented relative to the reference frame it is defined relative to. Indeed,
the components of axis
ˆ
b
x
in F
a
are obtained by projecting it onto the axes
of F
a
with
ˆ
b
x
·ˆa
x
ˆ
b
x
·ˆa
y
ˆ
b
x
·ˆa
z
T
, which corresponds to the first column
of the rotation matrix in (2.12). Hence, the columns of the rotation matrix
express the direction of the axes of reference frame F
b
relative to reference
frame F
a
as pictured in Fig. 2.3.
2.3.3 Composing Rotations
Any rotation in 3D space can be expressed as a composition of three ele-
mentary rotations, each representing a rotation about one of the axes of the
reference frame. There are mainly two ways of composing rotations: through
2.3. ORIENTATIONS AND ROTATIONS 19
pre-multiplication and through post-multiplication. In general, a transforma-
tion is post-multiplied when it is defined with respect to the axes before any
transformation took place (i.e. the fixed frame). Conversely, a transformation
is pre-multiplied when it is defined with respect to the axes obtained following
previous transformations (i.e. the moving frame).
θ
1
θ
1
θ
2
θ
2
θ
1
θ
1
θ
2
θ
2
θ
2
Figure 2.4: The composition of R
x
(θ
1
) and R
z
(θ
2
) actively (on the left) and
passively (on the right). On the left, rotations are defined relative to the
previous/moving frame. On the right, rotations are defined relative to the
first/fixed frame with the blue shaded area depicting the rotation about the
fixed blue axis. Note that the number of distinct axes is smaller on the left,
making it easier to use when defining successive rotations.
If you use your right hand to represent a frame and you sequentially perform
rotations of your hand about the axes of your fingers, your hand is a moving
frame and you are performing active/alibi/intrinsic rotations. However, if
you are looking at a corner of a room and sequentially performing rotations
about the axes of the corner (i.e. the fixed frame), then you are performing
passive/alias/extrinsic rotations.
Passive/Alias/Extrinsic Rotations: Rotations (zyx) are compounded
through post-multiplication and each rotation is expressed about the
fixed frame. A rotation about the z axis of the fixed frame followed by a
rotation about the y axis of the fixed frame followed by a rotation about
the x axis of the fixed frame is R = R
z
R
y
R
x
.
Active/Alibi/Intrinsic Rotations: Rotations (zy
x
′′
) are compounded
through pre-multiplication and each rotation is expressed about the mov-
ing frame. A rotation about the z axis of the initial frame followed by a
20 CHAPTER 2. GEOMETRY
rotation about the y axis of the moved frame (the new y axis) followed
by a rotation about the x axis of the new moved frame is R = R
x
R
y
R
z
.
Elementary rotations in a right-handed 3D Cartesian space are defined as
such:
R
x
(θ) =
1 0 0
0 cos(θ) sin(θ)
0 sin(θ) cos(θ)
(2.14)
R
y
(θ) =
cos(θ) 0 sin(θ)
0 1 0
sin(θ) 0 cos(θ)
(2.15)
R
z
(θ) =
cos(θ) sin(θ) 0
sin(θ) cos(θ) 0
0 0 1
. (2.16)
2.3.4 Axis-Angle Representation
Euler’s rotations theorem state that any sequence of rotations can equivalently
be expressed as a single rotation about some axis. Consequently, any rotation
can be expressed as a tuple (ˆω, θ) where ˆω is the unit-length axis about which
the scalar rotation θ is performed.
For instance, the axis-angle representation can be useful to compute the
rotation that would bring a unit-vector ˆu onto another unit-vector ˆv, both
expressed in the same reference frame. To do so, the cross-product between
both vectors is taken to obtain the rotation axis
ˆω =
ˆu × ˆv
ˆu × ˆv
that is normal to both vectors. Then, by the definition of the dot product,
ˆu · ˆv = ˆuˆvcos(θ) = cos(θ)
such that
θ = arccos (ˆu · ˆv)
is the angle about ˆω between ˆu and ˆv. The orientation difference is thereby
defined with (ˆω, θ), and the rotation matrix that would produce the same
rotation can be obtained through Rodrigues’ formula.
2.3. ORIENTATIONS AND ROTATIONS 21
Rodrigues’ formula can be used to obtain a rotation matrix from the axis-
angle representation with
R = e
[ˆω]
×
θ
(2.17)
= 1
3×3
+ sin(θ) [ˆω]
×
+ (1 cos(θ)) [ˆω]
2
×
(2.18)
=
c + ˆω
2
x
(1 c) ˆω
x
ˆω
y
(1 c) ˆω
z
s ˆω
x
ˆω
z
(1 c) + ˆω
y
s
ˆω
y
ˆω
x
(1 c) + ˆω
z
s c + ˆω
2
y
(1 c) ˆω
y
ˆω
z
(1 c) ˆω
x
s
ˆω
z
ˆω
x
(1 c) ˆω
y
s ˆω
z
ˆω
y
(1 c) + ˆω
x
s c + ˆω
2
z
(1 c)
,
(2.19)
where c = cos(θ), s = sin(θ), ˆω = [ˆω
x
, ˆω
y
, ˆω
z
], and e
[ˆω]
×
θ
is the matrix
exponential of [ˆω]
×
θ.
The matrix exponential can be considered to be an extension of Euler’s
formula
e
jθ
= cos(θ) + j sin(θ) =
n=0
X
(jθ)
n
n!
(2.20)
to hyper-complex numbers such that
e
θ[ ˆω]
×
=
n=0
X
θ [ˆω]
×
n
n!
= 1
3×3
+ sin(θ) [ˆω]
×
+ (1 cos(θ)) [ˆω]
2
×
. (2.21)
When a rotation matrix is provided and one wishes to obtain the equivalent
(ˆω, θ) tuple, the matrix logarithm:
θ = arccos
tr (R) 1
2
(2.22)
[ˆω]
×
=
1
2 sin(θ)
R R
T
(2.23)
can be used for that purpose. (2.22) is clearly undefined when R = 1
3×3
as
1
3×3
1
T
3×3
= 0 (this is the singularity of this representation), and when
tr (R) = 1 as arccos(1) is undefined. If the provided rotation matrix is
identity, then any axis can be chosen with θ = 0. If tr (R) = 1, then one of
22 CHAPTER 2. GEOMETRY
the three following solutions can be selected
θ = π with (2.24)
ˆω =
1
p
2(1 + R
3,3
)
R
1,3
R
2,3
1 + R
3,3
or (2.25)
ˆω =
1
p
2(1 + R
2,2
)
R
1,2
1 + R
2,2
R
3,2
or (2.26)
ˆω =
1
p
2(1 + R
1,1
)
R
1,1
1 + R
2,1
R
3,1
, (2.27)
where R
i,j
is the (i, j)-th entry of the rotation matrix.
For small rotations, the axis-angle representation is nearly singular and
can behave badly in practice due to numerical errors since R 1 will produce
very large arccos values in (2.22) and 1/ sin(θ) will also become very large.
2.3.5 Unit Quaternions
To alleviate some of the problems due to the presence of the singularity in
the axis-angle representation, an additional parameter and a constraint can
be used.
Starting from the expanded matrix of (2.18) and performing a change of
variables such that
e
0
= cos(θ/2), (2.28)
e
1
= ˆω
x
sin(θ/2), (2.29)
e
2
= ˆω
y
sin(θ/2), (2.30)
e
3
= ˆω
z
sin(θ/2), (2.31)
the matrix in (2.18) can be rewritten as
R =
2(e
2
0
+ e
2
1
) 1 2(e
1
e
2
e
0
e
3
) 2(e
1
e
3
+ e
0
e
2
)
2(e
1
e
2
+ e
0
e
3
) 2(e
2
0
+ e
2
2
) 1 2(e
1
e
3
e
0
e
1
)
2(e
1
e
3
e
0
e
2
) 2(e
2
e
3
+ e
0
e
1
) 2(e
2
0
+ e
2
3
) 1,
(2.32)
where the elements [e
0
, e
1
, e
2
, e
3
]
T
are called the Euler parameters. Addition-
ally, enforcing
[e
0
, e
1
, e
2
, e
3
] = 1
2.3. ORIENTATIONS AND ROTATIONS 23
restricts the 4-dimensional parameter space to valid rotations. Euler param-
eters can be conveniently encoded in a quaternion, making it possible to use
quaternions’ algebra to rotate vectors.
A quaternion is a hyper-complex number
q = q
w
+ q
x
ˆ
i + q
y
ˆ
j + q
z
ˆ
k (2.33)
where
ˆ
i,
ˆ
j, and
ˆ
k are unit-length basis vectors and q
w
, q
x
, q
y
, and q
z
are real
numbers. A quaternion is usually more conveniently represented as a vector
q =
q
w
q
v
T
=
q
w
q
x
q
y
q
z
T
, (2.34)
where q
w
is the real part and q
v
is the vectorial part. A quaternion with q
w
= 0
is sometimes said to be pure. The operations that can be performed on quater-
nions differ from those that are permitted with other rotation representations.
For instance, quaternion addition
q + p =
q
w
q
v
+
p
w
p
v
=
q
w
+ p
w
q
v
+ p
v
(2.35)
follows from vector addition and is therefore commutative and associative.
The quaternion product can be concisely expressed using the left quaternion
product matrix
[q]
=
q
w
q
x
q
y
q
z
q
x
q
w
q
z
q
y
q
y
q
z
q
w
q
x
q
z
q
y
q
x
q
w
= q
w
1
4×4
+
0 q
T
v
q
v
[q
v
]
×
(2.36)
such that quaternion product can be expressed as
q p = [q]
p, (2.37)
where q p denotes the product of two quaternions.
Vectors expressed in quaternion form with v =
0, v
x
, v
y
, v
z
T
can be ro-
tated using quaternions with the (colloquially named) sandwich product
q v q
, (2.38)
which corresponds to the action Rv where v is the vector being rotated.
The exponential of a quaternion is defined as
e
q
= e
q
w
cos(q
v
)
q
v
q
v
sin(q
v
)
, (2.39)
24 CHAPTER 2. GEOMETRY
and produces a quaternion. The logarithm of the quaternion is defined as
log(q) =
log(q)
uθ
, (2.40)
and produces a 4-dimensional vector.
Quaternions have the following properties
q p = p q (2.41)
(q p) r = q (p r) (2.42)
q (p + r) = q p + q r (2.43)
q =
q
q
2
w
+ q
2
x
+ q
2
y
+ q
2
z
(2.44)
q
=
q
w
q
v
T
(2.45)
(p q)
= q
p
(2.46)
q
1
=
q
q
2
=
1
q
2
w
+ q
2
x
+ q
2
y
+ q
2
z
q
w
q
v
(2.47)
where ∥·∥ is the norm, (·)
is the complex conjugate, and (·)
1
is the inverse.
Additionally, unit quaternions enjoy the following properties
q = 1 (2.48)
q
1
= q
(2.49)
q =
cos(ϕ) u sin(ϕ)
, (2.50)
where a rotation of ϕ about u is performed. Although (2.50) might seems
like a way to convert a rotation represented as axis-angle into a quaternion,
this is not exactly how it is done. Indeed, the quaternion representation has
a particularity which is that it rotates twice slower than the 3D rotation it
represents. For instance, if two quaternions are separated by an angle ϕ, then
the equivalent rotation is done over an angle θ = 2ϕ.
Indeed, as hinted by the factors of 2 in (2.32), there exists two antipodal
quaternions (i.e., q and q) mapping to the same rotation. Consequently, to
represent a 3D rotation of θ about some axis ˆω with a quaternion, the ϕ in
(2.50) must be equal to θ/2. This leads to the following relationship between
a quaternion and its equivalent axis-angle representation
q =
cos(θ/2) ˆω sin(θ/2)
, (2.51)
2.3. ORIENTATIONS AND ROTATIONS 25
where ˆω and θ are those defined in Sec. 2.3.4. To convert a quaternion into
the axis-angle representation, the parameters are obtained with
θ = 2 atan(q
v
/q
w
) (2.52)
ˆω = q
v
/ q
v
, (2.53)
where ˆω = q
v
for unit quaternions.
A unit quaternion can be easily obtained from a rotation matrix with
q
w
=
p
1 + tr (R)
2
(2.54)
q
v
=
1
4q
w
R
3,2
R
2,3
R
1,3
R
3,1
R
2,1
R
1,2
(2.55)
where R
i,j
is the (i, j)-th entry of the rotation matrix. The reverse operation,
in which a rotation matrix is obtained from a quaternion, is performed with
R =
q
2
w
q
T
v
q
v
1
3×3
+ 2q
v
q
T
v
+ 2q
w
[q
v
]
×
(2.56)
=
q
2
w
+ q
2
x
q
2
y
q
2
z
2(q
x
q
y
q
w
q
z
) 2(q
w
q
y
+ q
x
q
z
)
2(q
w
q
z
+ q
x
q
y
) q
2
w
q
2
x
+ q
2
y
q
2
z
2(q
y
q
z
q
w
q
x
)
2(q
x
q
z
q
w
q
y
) 2(q
w
q
x
+ q
y
q
z
) q
2
w
q
2
x
q
2
y
+ q
2
z
. (2.57)
The equation in (2.54) is singular when tr (R) = 1, producing a division
by zero, and also breaks when tr (R) 1 as the square root of a negative
number is not real. Several techniques exist to robustly convert a rotation
matrix to a unit-quaternion with the aim of reducing the consequences of
numerical inaccuracies on the result.
As empirically measured in A Survey on the Computation of Quaternions
from Rotation Matrices by Sarabandi and Thomas, Cayley’s method seems to
26 CHAPTER 2. GEOMETRY
be the fastest and most accurate technique. It starts by defining
e
0
=
1
4
q
(1+R
11
+R
22
+R
33
)
2
+ (R
32
R
23
)
2
+ (R
13
R
31
)
2
+ (R
21
R
12
)
2
(2.58)
e
1
=
1
4
q
(1+R
11
R
22
R
33
)
2
+ (R
32
R
23
)
2
+ (R
13
+R
31
)
2
+ (R
21
+R
12
)
2
(2.59)
e
2
=
1
4
q
(1R
11
+R
22
R
33
)
2
+ (R
32
+R
23
)
2
+ (R
13
R
31
)
2
+ (R
21
+R
12
)
2
(2.60)
e
3
=
1
4
q
(1R
11
R
22
+R
33
)
2
+ (R
32
+R
23
)
2
+ (R
13
+R
31
)
2
+ (R
21
R
12
)
2
(2.61)
and then uses the largest positive number in [e
0
, e
1
, e
2
, e
3
] to determine the
signs of the elements of the unit-quaternion. The rationale behind choosing
to use the largest positive number is that since we need to assume that an
element is positive to resolve the sign ambiguity, we should be choosing the
element that is the less likely to change sign due to a small perturbation from
numerical inaccuracies. That way, we end up with one of the two antipodal
quaternions that can represent the rotation. Consequently, Cayley’s method
2.3. ORIENTATIONS AND ROTATIONS 27
stipulates that with i = argmax([e
0
, e
1
, e
2
, e
3
]),
if i = 0
e
0
e
1
e
2
e
3
=
e
0
e
1
sign
R
3,2
R
2,3
e
2
sign
R
1,3
R
3,1
e
3
sign
R
2,1
R
1,2
, (2.62)
if i = 1
e
0
e
1
e
2
e
3
=
e
0
sign
R
3,2
R
2,3
e
1
e
2
sign
R
2,1
+ R
1,2
e
3
sign
R
1,3
+ R
3,1
, (2.63)
if i = 2
e
0
e
1
e
2
e
3
=
e
0
sign
R
1,3
R
3,1
e
1
sign
R
2,1
+ R
1,2
e
2
e
3
sign
R
3,2
+ R
2,3
, (2.64)
if i = 3
e
0
e
1
e
2
e
3
=
e
0
sign
R
2,1
R
1,2
e
1
sign
R
1,3
+ R
3,1
e
2
sign
R
3,2
+ R
2,3
e
3
, (2.65)
such that Euler parameters with consistent signs are obtained. These param-
eters can then be used in a quaternion to perform rotations on vectors.
A random orientation can easily be obtained with quaternions, an oper-
ation that is much more difficult to perform using other representations. To
obtain a uniformly distributed rotation, four numbers can be sampled from
the Gaussian distribution (not uniform, Gaussian) and three of those are to
be normalized to produce a unit quaternion. Indeed, samples q S
3
are
uniformly distributed over S
3
for
q =
1
[a, b, c, d]
a b c d
T
, (2.66)
where a, b, c, d N (0, 1).
28 CHAPTER 2. GEOMETRY
Interpolating between two quaternions q
0
and q
1
using a parameter t
[0, 1] can also be performed easily. The first step is to ensure that the angle
between the quaternion vectors is acute such that the shortest path will be
followed. This can be verified by making sure that the angle between the two
quaternions
q
0
· q
1
= q
T
0
q
1
= cos(∆ϕ) < 0
should be acute. If it’s not the case, then you can simply set q
1
to its antipodal
quaternion q
1
then start the process by computing the rotation difference
with
δ = q
0
q
1
(2.67)
and then obtaining the corresponding axis-angle representation with
θ = 2 atan(δ
v
w
) (2.68)
ˆω = δ
v
/ δ
v
(2.69)
to finally compute the interpolated quaternion with
q
t
= q
0
cos(/2)
ˆω sin(/2)
. (2.70)
A critical advantage of the unit-quaternion representation is that it is trivial
to normalize the quaternion to enforce its constraint. Conversely, it can be
complicated to re-orthogonalize a rotation matrix such that rows and columns
are orthogonal (its constaints). Due to numerical inaccuracies, the composition
of many rotations will inevitably lead to constraint violation.
2.4 Positions And Translations
The position of the origin of F
b
relative to F
a
is defined by the free vector
a
p
b
. When
a
p
b
is expressed in F
w
, the position coordinates of
a
p
b
are denoted
w
a
p
b
=
p
x
p
y
p
z
T
such that
a
p
b
= p
x
ˆw
x
+ p
y
ˆw
y
+ p
z
ˆw
z
, (2.71)
where the basis vectors ˆw
x
, ˆw
y
, ˆw
z
of F
w
are weighted by the position coor-
dinates to produce the position vector. Hence, we say that
w
a
p
b
is the position
of F
b
relative to F
a
expressed in F
w
.
A position vector
a
p
b
can be expressed in a coordinate system F
w
with
w
a
p
b
=
ˆw
x
·
a
p
b
ˆw
y
·
a
p
b
ˆw
z
·
a
p
b
, (2.72)
2.5. POSES AND RIGID TRANSFORMATIONS 29
where the vector is projected onto the basis vectors of F
w
to produce the
position coordinates. Hence,
c
a
p
b
=
ˆc
x
·
a
p
b
ˆc
y
·
a
p
b
ˆc
z
·
a
p
b
(2.73)
=
ˆc
x
·
p
x
ˆw
x
+ p
y
ˆw
y
+ p
z
ˆw
z
ˆc
y
·
p
x
ˆw
x
+ p
y
ˆw
y
+ p
z
ˆw
z
ˆc
z
·
p
x
ˆw
x
+ p
y
ˆw
y
+ p
z
ˆw
z
(2.74)
=
ˆc
x
· (p
x
ˆw
x
) + ˆc
x
·
p
y
ˆw
y
+ ˆc
x
· (p
z
ˆw
z
)
ˆc
y
· (p
x
ˆw
x
) + ˆc
y
·
p
y
ˆw
y
+ ˆc
y
· (p
z
ˆw
z
)
ˆc
z
· (p
x
ˆw
x
) + ˆc
z
·
p
y
ˆw
y
+ ˆc
z
· (p
z
ˆw
z
)
(2.75)
=
ˆc
x
· ˆw
x
ˆc
x
· ˆw
y
ˆc
x
· ˆw
z
ˆc
y
· ˆw
x
ˆc
y
· ˆw
y
ˆc
y
· ˆw
z
ˆc
z
· ˆw
x
ˆc
z
· ˆw
y
ˆc
z
· ˆw
z
|
{z }
c
R
w
p
x
p
y
p
z
|{z}
w
a
p
b
=
c
R
w
w
a
p
b
, (2.76)
where (2.71) was used to expand the position vector and
c
R
w
was identified
from (2.12). Therefore, the coordinate system in which position vector is
expressed in can be changed by pre-multiplying is by the rotation matrix
relating the orientation of one coordinate system to the other. Succintly,
c
a
p
b
=
c
R
w
w
a
p
b
. (2.77)
From standard vector algebra we have that
a
p
b
+
b
p
a
= 0, (2.78)
a
p
b
+
b
p
c
=
a
p
c
, (2.79)
k · (
a
p
b
+
b
p
c
) = k
a
p
b
+ k
b
p
c
, (2.80)
where k is a scalar. Hence, the target of the position vector can be changed
with
c
a
p
b
=
c
a
p
d
+
c
d
p
b
(2.81)
as long as the vectors are expressed in the same coordinate system.
2.5 Poses And Rigid Transformations
The pose of a reference frame is defined by the position of its origin and by the
orientation of its orthonormal axes. This information is bundled into a pose
c
a
T
b
=
a
R
b
c
a
p
b
0 1
(2.82)
30 CHAPTER 2. GEOMETRY
w
a
p
b
F
w
w
a
p
c
a
b
d
c
Figure 2.5: Visual depiction of the vector algebra for 2
w
a
p
b
w
c
p
d
=
w
a
p
c
.
Note that vector algebra is independant of reference frames, but if vectors are
expressed in a reference frame, it must be the same for all vectors.
that defines the pose of b relative to a with position expressed in c. Note that
although the pose has a right sub-script, it only applies to the position.
A pose
f
e
T
d
can be transformed into another pose by pre-multiplying it by
a homogeneous transformation
c
b
T
a
which produces
c
b
T
a
f
e
T
d
=
b
R
a e
R
d b
R
a
f
e
p
d
+
c
b
p
a
0 1
(2.83)
where the operation only makes sense if {e} = {a} (i.e. the target of the
transformation is the reference of the pose), {c} = {b} (i.e. the transformation
is expressed in the same frame it is defined with respect to), and {a} = {f}
such that
b
R
a
f
e
p
d
is a valid change of reference frame as per (2.77). If those
rules are respected, we have
b
b
T
a
a
a
T
d
=
b
R
a a
R
d b
R
a
a
a
p
d
+
b
b
p
a
0 1
(2.84)
=
b
R
d
b
b
p
a
+
b
a
p
d
0 1
(2.85)
=
b
R
d
b
b
p
d
0 1
(2.86)
=
b
b
T
d
(2.87)
2.5.1 Change of Coordinate System
Sometimes, a pose
c
a
T
b
expressed in some coordinate system {c} must be
expressed in another coordinate system {d}. This change of coordinate system
is done by pre-multiplying the position vector in
c
a
T
b
by a rotation
d
R
c
. Since
2.5. POSES AND RIGID TRANSFORMATIONS 31
only the position component of the pose is changed, it is not possible to simply
multiply the pose by an homogeneous transformation built from
d
R
c
. Instead,
you must define
d
a
T
b
=
a
R
b d
R
c
c
a
p
b
0 1
(2.88)
which is not equal to
d
a
T
b
=
d
R
c
0
0 1
c
a
T
b
(2.89)
However, as indicated in (2.84), a pose usually needs to be expressed in
the same frame its defined with respect to such that a standard homogeneous
transformation can be applied to it.
2.5.2 Screws and Twists
The Chasles-Mozzi theorem states that any rigid transformation can be ex-
pressed as a displacement over the thread of a screw. Indeed, a particle moving
along the thread of the screw will experience a rotation about the axis of the
screw as well as a translation along the same axis. This screw representa-
tion can be useful in representing revolute and prismatic joints with a single
compact representation.
A screw is defined by its unit axis ˆs, thread pitch h, and a point q located
anywhere on the axis (the origin of the axis can be chosen easily). The pitch h
is the ratio of linear motion to angular motion such that a screw with h =
is a pure translation while a screw with h = 0 is a pure rotation. The motion
over a given screw can be expressed by specifying the magnitude θ of the
rotation about the screw axis. With such a definition, the displacement due
to the rotational motion is given by
R = e
[ˆs]
×
θ
(2.90)
p = ˆs +
1
3×3
e
[ˆs]
×
θ
q (2.91)
such that an homogeneous transformation matrix can be easily built as from
the screw parameters.
Interestingly, if the magnitude θ describes the rate of rotation about the
screw axis, then the screw representation can be used to describe the linear
and angular components of the velocity. In that case, the pitch represents the
ratio of linear velocity to angular velocity and
ν =
v
ω
=
("
hˆsθ ˆsθ × q
ˆsθ
#
=
"
hω ω × q
ˆsθ
#
if ω = 0 (2.92)
32 CHAPTER 2. GEOMETRY
defines a twist where the linear velocity v is the sum of a component along
the axis and a component orthogonal to the axis (leading the thread towards
and away from the axis). A twist is a motion about a screw, which can be
considered as the coordinate system the motion is defined relative to.
A unit screw
ˆ
S is expressed from the twist components as
ˆ
S =
"
h
ˆ
ω
ˆ
ω × q
ˆ
ω
#
if ω = 1
"
ˆ
v
0
#
if ω = 0 and v = 1
(2.93)
such that
ˆ
Sθ describes a rigid transformation.
When given the components of a twist, it is possible to find parameters
for the screw that the motion is performed about. Of course, since q was
arbitrarily chosen on the screw axis, an infinite number of solution exists,
although the simplest one is to choose the q that is at the intersection between
the screw axis and the plane orthogonal to the axis. Hence, for ν =
v ω
T
,
we have
h
h =
ω
T
v
ω
T
ω
ˆs = ω q =
ω×v
ω
T
ω
i
if ω = 0
h
h = ˆs = v q = 0
i
if ω = 0
(2.94)
that describes the screw parameters for the given twist.
The exponential map that produces homogeneous transformations from
unit screws described with twist components is
T = e
[
ˆ
S
]
×
θ
(2.95)
=
"
e
[
ˆ
ω]
×
θ
1
3×3
θ + (1 cos(θ)) [
ˆ
ω]
×
+ (θ sin(θ)) [
ˆ
ω]
2
×
ˆ
v
0
1×3
1
#
(2.96)
where
h
ˆ
S
i
×
=
[
ˆ
ω]
×
ˆ
v
0 0
(2.97)
is 4 ×4 matrix representation of the screw. The reverse operation can be done
with the matrix logarithm that maps a screw to a homogeneous transformation.
To do so, the transformation is first inspected to see if R = 1
3×3
that indicates
that ω = 0, v = p/ p, and θ = p. Otherwise,
ˆ
ω and θ are obtained
through (2.22) and
v = 1
3×3
+
1
2
(2 θ cot(θ/2)) [
ˆ
ω]
2
×
θ [
ˆ
ω]
×
(2.98)
2.6. REVERSES 33
provides the missing information.
The adjoint representation of a rigid transformation is the 6 × 6 matrix
Ad (T) =
R [p]
×
R
0
3×3
R
(2.99)
where
T =
R p
0 1
(2.100)
is the pose defined in (2.82), can be used to change the reference frame that a
twist or screw is expressed in with
w
w
ν
b
= Ad (
w
w
T
b
)
b
w
ν
b
(2.101)
=
w
R
b
[
w
w
p
b
]
×
w
R
b
0
3×3 w
R
b
"
b
w
v
b
b
w
ω
b
#
(2.102)
and has the following properties
Ad
b
b
T
a
Ad (
a
a
T
c
) = Ad
b
b
T
a
a
a
T
c
(2.103)
Ad (T)
1
= Ad
T
1
(2.104)
2.6 Reverses
It is useful to know how a position, rotation or pose can be reversed as the
reverse can appear in algebra. The reverse of a position vector is a vector with
the same magnitude but with a reversed direction. This is done by multiplying
the components of the position vector by 1. The reverse of a rotation is given
by its inverse and its transpose since R
1
= R
T
due to the orthonormality of
the vectors forming the rotation. The pose being a bundle of a rotation and a
position vector, its reverse Rev(·) is defined using a combination of the above
rules.
Rev(
c
a
p
b
) =
c
a
p
b
=
c
b
p
a
(2.105)
Rev(
a
R
b
) = (
a
R
b
)
1
=
a
R
T
b
=
b
R
a
(2.106)
In general, if the pose is expressed in a coordinate system different from the
one it is defined with respect to, then we have
Rev(
c
a
T
b
) =
c
b
T
a
=
a
R
T
b
c
a
p
b
0 1
=
b
R
a
c
b
p
a
0 1
(2.107)
34 CHAPTER 2. GEOMETRY
which can then be expressed in another coordinate system {d} as discussed
previously. Note that the reverse of a pose IS NOT equal to the inverse of
the pose when it is expressed in a coordinate system different from the one it
is defined with respect to.
Rev(
c
a
T
b
) =
c
b
T
a
= (
c
a
T
b
)
1
(2.108)
However, if a pose is expressed in the same coordinate system its defined
with respect to (e.g.
a
X
b
a
or
c
X
b
c
), the reverse of a pose is given by its inverse
as in
(
a
a
T
b
)
1
=
a
R
T
b
a
R
T
b
a
a
p
b
0 1
=
b
R
a
b
b
p
a
0 1
=
b
b
T
a
(2.109)
noting that the position vector is pre-multiplied by the rotation
b
R
a
to change
its coordinate system from {a} to {b} as the result of the inverse is expressed
in {b} while the original pose was expressed in {a}.
2.7 Forward Kinematics
Although kinematics is the subject of the next section, forward kinematics
describes the overall geometry of the robot such that the end-effector position
can be computed if the joint actuations and link lengths are known. It can be
argued that forward kinematics (and its reverse operation, the inverse kine-
matics) is ill-named as it does not necessarily imply the the robot is moving
(kinema- means motion, coined by Amp`ere). An hypothesis for this naming
is that the kinematics parameters were studied in the context of moving rigid
bodies, and that forward kinematics uses the same parameters to describe po-
sitions. Also, the field of statics studies forces between immobile rigid bodies,
so reusing that term would have led to ambiguities.
2.7.1 Product of Matrix Exponentials
Since prismatic and revolute joints can easily be described by unit screws, the
kinematic description of a robot can be defined through a list of unit screws,
all expressed relative to the world/base frame. Importantly, all unit screws
are defined when the robot is in its zero configuration (i.e. all joints are set to
zero).
For prismatic joints, the screw axis ω is set to zero and the v is set to the
unit axis of the base frame along which the motion takes place as defined in
2.7. FORWARD KINEMATICS 35
(2.93). For instance, a prismatic joint moving in the direction ˆz of the base
frame is noted
S =
v 0
T
=
0 0 1 0 0 0
T
(2.110)
where the unit screw S is defined from the twist components v and ω, which is
always set to zero for strictly prismatic joints. A revolute joint moving about
an axis that is oriented mid-way between the ˆx and ˆy axes of the robot base
frame, and which is crossing the origin of the base frame, is noted
S =
ω × q ω
T
=
0 0 0 cos(π/4) sin(π/4) 0
T
(2.111)
where the screw pitch h in (2.93) is always zero for strictly revolute joints, and
where the screw point q can be set to any point on the screw axis (the origin
was use here to simplify).
A constant matrix M is defined as
M =
w
T
ee
|
θ=0
(2.112)
describes the pose of the end-effector relative to the base frame when the robot
is in its zero configuration. With the end-effector and all joints defined, the
pose of the end-effector in any given configuration θ is obtained with
w
T
ee
(θ) = e
[S
1
]
×
θ
1
e
[S
2
]
×
θ
2
. . . e
[S
n
]
×
θ
n
M (2.113)
where the exponential map defined in (2.95) is used to transform twists into
homogeneous transformations. The formula in (2.113) is called the product of
exponentials and is used to compute the forward kinematics of a robot defined
through unit screws.
2.7.2 Denavit-Hartenberg Parameters
A succint description of the structure of a robot is useful to define the position
and velocity of the end-effector as a function of the joint displacements (i.e.
forward kinematics). For robots built from rigid links, the pose of a given link
is fully determined by the lengths and angles of links and joints closer to the
base. Consequently, the pose of any link can be determined by a sequence
of homogeneous transformations, each describing the reference frame of a link
with respect to the one of the previous link.
The Denavit-Hartenberg (DH) convention is a minimal parametrization
that describes each homogeneous transformation using only four values. The
authors of the DH convention proved that there is no parametrization with
fewer parameters. Although the pose of a raference frame has six degrees of
36 CHAPTER 2. GEOMETRY
ˆz
i1
ˆx
i1
a
i1
d
i
ˆz
i
ˆx
i
ϕ
i
ˆz
i+1
α
i+1
Figure 2.6: Proximal modified DH parametrization.
freedom, and hence would need at least six values to be defined, the DH con-
vention introduces two constraints that must be respected by every reference
frame defining the robot structure.
In its original definition, the DH notation led to ambiguities when used to
describe closed-loop and tree-like robots. A modified version of the convention
(now called Modified DH ) was introduced by Khalil and Kleinfinger to avoid
ambiguities of the original formulation. Two variants emanated from the mod-
ified DH notation, the distal variant and the proximal variant. With the distal
variant, the i-th joint is at the distal end of link i, farther from the root/base
of the robot it is the most popular version. The proximal variant (pictured
in Fig. 2.6) slightly simplifies the notation by having the i joint be closer to the
base of the robot Lipkin argues in A Note on Denavit-Hartenberg Notation
in Robotics that it is the best DH convention. In this document, we define
the proximal variant only, and will refer to this variant as DH to simplify the
text.
Each joint in the DH convention can be either prismatic or rotary but more
complicated joints (e.g. spherical, helical) can be easily modeled by superim-
posing joints. For instance, a helical joint can be modeled as a prismatic joint
superimposed atop a rotary joint. Each joint is specified relative to the previ-
ous joint by two parameters related to the previous joints (a
i1
and α
i1
), and
two parameters related to the joint itself (d
i
and ϕ
i
). The following constraints
2.7. FORWARD KINEMATICS 37
must be respected for any frame defining a joint:
the ˆz
i
axis must coincide with the i-th joint actuation axis and direction,
the ˆx
i1
axis must be perpendicular to ˆz
i
.
The joint actuation axis is the displacement vector axis along which a prismatic
joint slides, or about which a rotary joint revolves.
Therefore, the origin of the i-th joint can be localized by intersection the
ˆx
i1
axis with ˆz
i
. The ˆy
i
axis is then determined from ˆz
i
and ˆx
i
by following
the right-hand rule. This procedure implies that the ˆx
i
and ˆy
i
axes depends
on the definition of the following joint. Hence, the end-effector frame cannot
be defined arbitrarily as its ˆx axis must be perpendicular to the last joint’s ˆz
axis.
Once all frames have been correctly defined, the four parameters of each
joint can be extracted, and optionally an additionnal set of parameters for the
base frame and the end-effector frame. The parameters are defined as such,
with their order defining the order of operations:
1. a
i1
is the distance along ˆx
i1
between ˆz
i1
and ˆz
i
,
2. α
i1
is the angle about ˆx
i1
that would bring ˆz
i1
to ˆz
i
if they shared
their origin,
3. d
i
is the distance along ˆz
i
between the intersection with ˆx
i1
and the
origin of the frame, equal to zero for a revolute joint and variable for a
prismatic joint,
4. ϕ
i
is the angle about ˆz
i
that would bring ˆx
i1
to ˆx
i
if they shared their
origin, equal to zero for a prismatic joint and variable for a revolute joint.
For a prismatic joint, d
i
will be given by the (variable) actuation length, to
which is possibly added an offset. Similarly, for revolute joints, ϕ
i
will be given
by the actuation angle that is also possibly offset.
In the case that ˆz
i1
and ˆz
i
intersects, then they span a plane, and the
ˆx
i1
axis is defined as one of the two possible axes perpendicular to the plane.
If ˆz
i1
and ˆz
i
are parallel, then there are an infinite number of possibilities for
ˆx
i1
and any possibility can be selected.
The homogeneous transformation between adjacent frames is built from a
composition of active transformations with one of the two rightmost transfor-
38 CHAPTER 2. GEOMETRY
mation being dependant on the i-th joint actuation.
i1
T
i
=
1
3×3
a
i1
ˆx
i1
0
1×3
1
R
ˆx
i1
(α
i1
) 0
3×1
0
1×3
1
1
3×3
d
i
ˆz
i
0
1×3
1
R
ˆz
i
(ϕ
i
) 0
3×1
0
1×3
1
(2.114)
=
cos(ϕ
i
) sin(ϕ
i
) 0 a
i1
sin(ϕ
i
) cos(α
i1
) cos(ϕ
i
) cos(α
i1
) sin(α
i1
) d
i
sin(α
i1
)
sin(ϕ
i
) sin(α
i1
) cos(ϕ
i
) sin(α
i1
) cos(α
i1
) d
i
cos(α
i1
)
0 0 0 0 1
(2.115)
2.8 Inverse Kinematics
The inverse kinematics problem aims to find all combinations of joint angles
that results in the end-effector being in a desired pose. In 3D, robots with less
than 6 degrees of freedom (DoF) are called under-actuated, and those with
more than 6 DoF are over-actuated. The inverse kinematics of under-actuated
robots will yield no solution for any desired end-effector pose that cannot
possibly be reached due to actuation limitations. Even for robots with 6 or
more DoF, not all poses can be reached due to link lengths, joint limits, and
self-collisions. However, inverse kinematics does not integrate such constraints
(except the link lengths which are implicit), and the solutions found must be
ranked using an adequate criteria to select the best one.
Over-actuated robots will always have an infinite number of solutions to
the inverse kinematics problem, and a selection criteria must be implemented
via a numerical method.
For simple kinematic structures, analytical close-form solutions, which are
the fastest to evaluate, can be found. However, for more complex kinematic
structures, an iterative numerical approach must be used instead.
2.8.1 Analytic Methods
With the desired pose of the end-effector relative to the base of the robot given
by
w
T
ee
the serial kinematic chain is closed and becomes a loop. In such a loop, the pose
of any frame relative to any other frame can be defined either by composing
homogeneous transformations forward or backward in the loop. For instance,
2.8. INVERSE KINEMATICS 39
for a 6-DoF robot, we have
2
T
4
=
2
T
3 3
T
4
=
2
T
1 1
T
w w
T
ee 6
T
5 5
T
4
(2.116)
where (2.116) represents a system of 12 equations (as there are twelve parame-
ters in a 4×4 homogeneous transformation) with 6 unknowns (the joint angles,
one per transform). Many such systems of equations can be generated for the
robot, yielding a great number of equations. The idea is to find a sub-system
of equations that is can be solved for a sub-set of the unknowns. From there,
other equations can be simplified by considering the previously identified sub-
set of unknowns, which is now known. Such a procedure can yield analytic
equations that are very fast to evaluate for a given desired pose.
In the specific case of 6 DoF robots with a spherical wrist, the 3-2-1 kine-
matic structure can be exploited with Pieper’s technique to greatly simplify
the derivation of solutions. With such a kinematic structure, the reference
frame of the three joints farthest from the base can be defined such that they
share their origin, equivalent to a pure spherical joint. The location of this
origin is given by the position vector in
w
T
6
=
w
T
ee ee
T
6
(2.117)
which is
w
p
6
=
w
R
ee
ee
p
6
+
w
p
ee
(2.118)
and is equal to
w
p
6
=
w
p
5
=
w
p
4
. Since
6
p
ee
is fixed,
w
p
4
=
w
p
6
can be
directly computed from the end-effector position. A system of three equa-
tions can be built relating
w
p
4
to the three joint angles closest to the base
of the robot. This system being much smaller than the original, it follows
that finding a solution is much easier. Once equations for the first three joint
angles are determined, a second system of equations containing joint angles
for the three other joints can be defined. In sum, Pieper’s technique enables
the decomposition of a harder problem into two simpler ones.
2.8.2 Numerical Methods
For many systems, analytical solutions to the inverse kinematics problem do
not exist, and numerical methods that iteratively evaluate potential solutions
are needed. One such method makes use of the inverse Jacobian, which maps
task-space velocities to joint-space velocities. The idea is that by setting the
task-space velocities to be proportional to the distance between current pose
and the desired pose, the inverse Jacobian can provide the joint-space velocities
that must be followed to take a step in the approximate direction of the desired
40 CHAPTER 2. GEOMETRY
pose. This is equivalent to a gradient descent method since the Jacobian is
effectively a matrix of first-order partial derivatives. As any gradient descent
method, if the initial point is to far from the desired point, odds are that
the algorithm will be unable to converge to the desired point. Consequently,
the algorithm must start from a configuration in which the end-effector pose
is known, and the algorithm is iterated to reach an end-effector pose that is
slightly closer to the desired pose. In other words, there is an outer loop that
progressively move the target pose toward the desired pose, and there is an
inner loop, which must run significantly more often, that finds joint angles
reaching the current target.
The task-space velocity twist can be obtained through the matrix logarithm
of the pose difference
w
ν
ee
= Ad (
w
T
ee
) log (
ee
T
w w
T
t
) (2.119)
where
w
T
t
is the current target pose. Then, the velocity is followed for a unit
step size with
q
i+1
= q
i
+ J
s
(q)
+
w
ν
ee
(2.120)
where q
i+1
is the joint angles that should bring the robot closer to the goal.
The inner loop can be stopped when the updates are small enough, at which
point the outer loop can modify the target pose to be closer to the desired
end-effector pose.
Other numerical techniques can make use of the inertial information to
minimize the energy expenditure, or can be modified to take joint limits into
account. For instance, a Levenberg-Marquadt scheme can be used to introduce
an adaptive damping that make sure that the pseudo-inverse is always far from
singular.
2.9 Key Concepts
A vector represents the location of a point relative to another one in
some vector space.
A Cartesian reference frame consists in three orthogonal unit vectors
that form basis directions.
A coordinate system is needed to express the vector as a sequence of
numbers. A coordinate system is a reference frame that is associated
with a physical quantity (e.g., meters or km/h).
Rotation matrices are orthonormal matrices whose columns describe ba-
sis directions relative to some reference frame.
2.9. KEY CONCEPTS 41
Rotations are composed through matrix multiplication, and the inverse
of a rotation is given by its transpose.
When composed through post-multiplication, the rotation is performed
relative to a fixed reference frame, while pre-multiplication performs the
rotation relative to a moving reference frame.
A sequence of multiple rotations can be expressed as a single rotation
about some axis via the axis-angle representation. The axis-angle repre-
sentation is minimal (only three parameters) but posess a singularity at
identity.
The matrix logarithm of a rotation matrix yields the axis-angle represen-
tation, and the matrix exponential of an axis-angle representation yields
a rotation matrix.
Unit quaternions encode rotation axis and magnitude in a four-dimensional
vector space to avoid the singularity of the axis-angle representation, but
cover all rotations twice.
A pose is a homogeneous transformation that describes the position and
orientation of a reference frame relative to another one.
A pose can be expressed in a different coordinate system by pre-multiplying
it by a rotation matrix.
Any rigid transformation can be expressed as a twist: the motion about
a screw axis.
The twist can be represented as a 6D vector, combining linear and an-
gular components.
A screw axis has a unit axis, a thread pitch, and a screw point.
The screw pitch is the ratio of the linear and angular components, while it
is zero for purely rotational motions, it is infinite for purely translational
motions.
The adjoint of a rigid transformation is a 6 × 6 matrix that can be used
to express a twist in a different coordinate system.
The forward kinematics equations define the pose of the end-effector as
a function of the robot geometry and the joint actuation.
42 CHAPTER 2. GEOMETRY
The forward kinematics of a serial robot can be expressed as a product
of matrix exponentials, each representing the end-effector motion that is
due to a joint actuation.
The Denavit-Hartenberg convention is a minimal parametrization (four
per joint) that can be used to describe the kinematic structure of a robot.
Several variations exist.
The inverse kinematics problem aims to find the joint angles that result
in a desired end-effector pose for a given robot.
While the inverse kinematics of simple robots can be solved analytically,
more complex robots require numerical methods to find a solution.
Chapter 3
Kinematics
As mentioned in Sec. 2.1, position is a Euclidean vector. An important prop-
erty of vectors is that their derivatives are also vectors, implying that velocity
and acceleration are vectors, which will be referred to as
c
b
˙
p
a
and
c
b
¨
p
a
re-
spectively the kinematic of {a} observed from {b} expressed in the {c}
coordinate system.
In a 3D world, position (and therefore its derivatives) is described by a 3D
vector. However, as a body can translate and rotate in space, the kinematics
is characterised by linear and rotational or angular components while a
point only has a position, a rigid body also has an orientation.
However, the linear and angular components are only intermediates used
to compute the real kinematics of all points on the rigid body. In general,
all points on a rigid body can have a different kinematic but they all share the
same description of the kinematic. In other words, the velocity of all points
on a body is described with the same linear and angular components but the
velocity evaluated at each point can differ from one point to another.
Velocity and acceleration are commonly described using six-dimensional
(6D) vectors, called spatial vectors or twists
c
b
ν
a
=
c
b
v
a
c
b
ω
a
c
b
λ
a
=
c
b
a
a
c
b
α
a
, (3.1)
which describe screwing motions along a directed line as defined in (2.92).
Importantly, 6D spatial vectors are not merely a stack of two 3D vectors but
really are elements of a six-dimensional vector space.
43
44 CHAPTER 3. KINEMATICS
3.1 Velocity
Velocity is the time-derivative of the position vector. Since a body is com-
posed from a multitude of points, each point on a rigid-body has a different
velocity in general. The description of the body’s kinematics through linear
and angular components, as described in Sec. 3.3.1, can be used to succintly
describe the velocity of all points on the body. While the linear components v
describes the instantaneous flow of points passing through an origin, the an-
gular components ω describes the instantaneous axis of rotation about which
the body is revolving. One must be careful not to confuse the linear velocity
v of a body with the real velocity of its origin
˙
p, although they can be equal
in some circumstances (for instance if ω = 0). In general, linear velocities
cannot simply be pre-multiplied by a rotation matrix to express it in
another reference frame.
The linear and angular components can be combined with
˙
p = v + ω × p (3.2)
to obtain the real velocity of any point on the body.
Since the axis of rotation ω does not depend on the linear velocity, it can be
easily expressed in any frame through a pre-multiplication by an adequate ro-
tation matrix. Also, as any vector, angular veocities can be composed through
vector addition. For instance, considering the scenario depicted in Fig. 3.1,
the angular velocity of {o} is given by
w
ω
o
=
w
ω
b
+
w
R
b b
ω
o
(3.3)
where
w
ω
b
is the angular velocity of {b} relative to {w} and expressed in {w}.
3.1.1 Point on a Rotating Body
The real velocity and acceleration of a point-mass in space is really what
matters in many dynamics equations. The velocity of the origin of {o} in
Fig. 3.1, where {b} moves (linearly and rotationaly) with respect to {w}, is
computed with
w
˙
p
b
=
w
v
b
+
w
ω
b
×
w
p
b
(3.4)
b
˙
p
o
=
b
v
o
+
b
ω
o
×
b
p
o
(3.5)
=
b
v
o
(3.6)
w
˙
p
o
=
w
˙
p
b
+
w
R
b
b
˙
p
o
(3.7)
=
w
v
b
+
w
R
b
b
˙
p
o
+
w
ω
b
×
w
R
b
b
p
o
(3.8)
=
w
v
b
+
w
b
v
o
+
w
ω
b
×
w
b
p
o
(3.9)
3.2. ROTATION TIME DERIVATIVE 45
{w}
{b}
{o}
w
ν
b
b
ν
o
w
ν
o
= ?
Figure 3.1: The kinematic relations shown with the red arrows are known and
the one shown with the blue arrow is computed.
where the identity
R (a × b) = (Ra) × (Rb) (3.10)
can be used. The rightmost term in (3.8) corresponds to the velocity contri-
bution due to the rotation of {b} about {w}.
3.2 Rotation Time Derivative
As derived in appendix D, the total time derivative of a rotating vector is
d
dt
(
w
R
b
b
p
o
) =
w
R
b
b
˙
p
o
+
w
ω
b
×
w
b
p
o
(3.11)
where
w
ω
b
is the instantaneous angular velocity of {b} with respect to {w}
and expressed in the inertial/fixed frame {w}. The derivative of a rotation
matrix is
w
˙
R
b
=
w
ω
b
×
w
R
b
(3.12)
which is an important result.
46 CHAPTER 3. KINEMATICS
3.3 Velocity Twists
3.3.1 Interpretation
The spatial vectors describing the velocity of a body are usually either ex-
pressed in a moving/body frame F
b
or in a fixed/inertial frame F
w
as pic-
tured in Fig. 3.2. When the velocity is expressed in F
b
, the linear components
describe the real velocity of the origin and the angular components describe
how the real velocity of the other points in the rigid body can be obtained.
However, when the velocity is expressed in F
w
, the linear velocity of a body
can be thought as a measure of the flow of points passing through the origin
(pretending that the body is large enough) as the body moves, which is not
necessarily equal to the velocity of the F
b
’s origin. Indeed, the origins of both
frames will not usually overlap, and therefore their velocity will be different in
general.
F
w
F
b
˙
θ
Figure 3.2: Interpretation of the two velocity twists describing the kinemat-
ics of the revolving link. The smaller circle passes through the body frame
while the larger one passes through the world frame. The velocity of a point
travelling along the smaller circle and being instantaneously coincident with
F
b
corresponds to the linear components of the velocity twist expressed in
the body frame. Conversely, the velocity of a point travelling along the larger
circle and being instantaneously coincident with F
w
corresponds to the linear
components of the velocity twist expressed in the world frame.
The velocity twist might be easier to interpret when expressed in the body
frame, but expressing the velocity twist in the world frame might be useful for
dynamics. In section Sec. 3.3.3, a relation that enables changing the frame in
which a velocity twist is expressed in will be highlighted.
3.4. ACCELERATION 47
3.3.2 Point on a Rotating Body
The real velocity of a point {o} that is fixed in F
b
can be obtained from the
velocity twist via
w
˙
p
o
=
1
3×3
[
w
R
b
b
p
o
]
×
w
ν
b
(3.13)
=
1
3×3
[
w
R
b
b
p
o
]
×
w
v
b
w
ω
b
(3.14)
=
w
v
b
+
w
ω
b
×
w
b
p
o
(3.15)
3.3.3 Coordinate System Change
Since the velocity can be expressed as a twist (from (2.92)), the adjoint repre-
sentation of an homogeneous transformation defined in (2.99) can be used as
done in (2.101) to change the coordinate system the velocity is expressed in
with
w
ν
b
=
w
v
b
w
ω
b
= Ad (
w
T
b
)
b
w
ν
b
=
w
R
b
[
w
p
b
]
×
w
R
b
0
3×3 w
R
b
"
b
w
v
b
b
w
ω
b
#
(3.16)
where
w
T
b
is the homogeneous transformation between the two coordinate
frames.
3.3.4 Observation Point Change
Velocities are observed from a point of view, and it is often useful to know
what would be the result of the observation from another point of view. This
change of observation point can be performed on twists with
w
ν
o
=
w
ν
b
+ Ad (
w
T
b
)
b
ν
o
(3.17)
where the adjoint transformation from (2.101) was used to express all twists
in {w}. When comparing the above equation to the ones in Sec. 3.1.1, clearly
the use of velocity twists becomes apparent as the equations are much more
succint and less error-prone.
3.4 Acceleration
Acceleration is the time-derivative of the velocity vector, and it can be de-
scribed through linear and angular components, similarly to velocity vectors.
48 CHAPTER 3. KINEMATICS
To obtain an expression for the angular acceleration of {o} in the situation
depicted in Fig. 3.1, equation (3.3) is differentiated with respect to time
w
α
o
=
d
dt
(
w
ω
o
) (3.18)
=
d
dt
(
w
ω
b
+
w
R
b b
ω
o
) (3.19)
=
w
α
b
+
w
R
b b
α
o
+
w
ω
b
× (
w
R
b b
ω
o
) (3.20)
where the derivative of a rotated vector from (3.11) was used.
The above equation reveals that, in contrast to how angular velocities are
composed with (3.3), an additional velocity-dependant term in the rightmost
term of (3.20) appeared.
3.4.1 Point on a Rotating Body
Given the situation depicted in Fig. 3.1, the velocity of {o} is given by the
superposition of three terms
w
˙
p
o
=
w
v
b
+
w
ω
b
×
w
b
p
o
+
w
b
˙
p
o
(3.21)
=
w
v
b
+
w
ω
b
×
w
R
b
b
p
o
+
w
R
b
b
˙
p
o
(3.22)
that are respectively caused by the linear velocity of {b} relative to {w}, an-
gular velocity of {b} relative to {w}, and real velocity of {o} relative to {b}.
Differentiating 3.22, we obtain
d
dt
(
w
˙
p
o
) =
d
dt
(
w
v
b
) +
d
dt
(
w
R
b
b
˙
p
o
) +
d
dt
(
w
ω
b
×
w
R
b
b
p
o
) (3.23)
=
w
a
b
+
d
dt
(
w
R
b
b
˙
p
o
) (3.24)
+
d
dt
(
w
ω
b
) ×
w
R
b
b
p
o
+
w
ω
b
×
d
dt
(
w
R
b
b
p
o
)
(3.25)
and using the result from (3.11) to solve the derivatives
w
¨
p
o
=
w
a
b
+
w
R
b b
a
o
+
w
ω
b
×
w
R
b
b
˙
p
o
(3.26)
+
w
α
b
×
w
R
b
b
p
o
+
w
ω
b
× (
w
R
b
b
˙
p
o
+
w
ω
b
×
w
R
b
b
p
o
) (3.27)
=
w
a
b
+
w
b
a
o
+
w
ω
b
× (2
w
b
˙
p
o
+
w
ω
b
×
w
b
p
o
) +
w
α
b
×
w
b
p
o
(3.28)
w
¨
p
o
=
w
a
b
+
w
b
a
o
+ 2
w
ω
b
×
w
b
˙
p
o
+
w
ω
b
× (
w
ω
b
×
w
b
p
o
) +
w
α
b
×
w
b
p
o
(3.29)
3.5. ACCELERATION TWISTS 49
which produces the important relation between
w
¨
p
o
and
b
a
o
, the acceleration
of a body {o} in a rotating frame {b} to the one in a fixed frame {w}, as
w
¨
p
o
=
w
a
b
+
w
b
a
o
+ 2
w
ω
b
×
w
b
˙
p
o
+
w
ω
b
× (
w
ω
b
×
w
b
p
o
) +
w
α
b
×
w
b
p
o
(3.30)
b
a
o
=
b
w
¨
p
o
b
w
a
b
2
b
w
ω
b
×
b
˙
p
o
b
w
ω
b
×
b
w
ω
b
×
b
p
o
b
w
α
b
×
b
p
o
(3.31)
when all vectors are expressed in the same frame.
3.5 Acceleration Twists
The equation in (3.30) defines the acceleration of all points on a rotating body.
However, the equation contains velocity-dependant terms, and therefore does
not define a helicoidal field that could be parametrized with a screw.
In contrast, the acceleration twist defined as
λ =
˙
v
˙
ω
=
a
α
(3.32)
defines a helicoidal vector field that can be parametrized with a screw axis.
As a true vector, the acceleration twist enjoys the properties of vectors, like
the one of vector addition such that
3
λ =
1
λ +
2
λ (3.33)
Similarly to how the components of the velocity twists are combined in
(3.13), the acceleration of a point on a rotating body can be easily obtained
with
w
¨
p
o
=
1
3×3
[
w
R
b
b
p
o
]
×
w
λ
b
(3.34)
=
1
3×3
[
w
R
b
b
p
o
]
×
w
a
b
w
α
b
(3.35)
=
w
a
b
+
w
α
b
×
w
b
p
o
(3.36)
where a and α are respectively the linear and angular components of the accel-
eration twist. Note that although the symbol used to describe the components
of the acceleration twist are the same as those used to describe classical accel-
eration, those quantities are not equal in general.
The linear components of the acceleration twist can be intepreted as being
the rate of the flow of points going through the origin as pictured in Fig. 3.2,
which is not necessarily equal to the acceleration of the origin. For a body
rotating at a constant velocity, the rate of the flow of points passing through
the origin will be equal to zero, although most points are accelerating as their
velocity vector is constantly changing direction.
50 CHAPTER 3. KINEMATICS
3.6 Key Concepts
In general, the velocities of all points on a rigid body are different.
Decomposing a rigid body velocity into linear and angular components
is useful to succintly describe the kinematics of all points on the body.
The linear velocity describes the instantaneous flow of points passing
through the origin, while the angular velocity describes the instantaneous
axis of rotation about which the body is revolving.
The linear and angular components can be combined to obtain the real
velocity of any point on the body.
A velocity twist is a six-dimensional vector consisting of the linear and
angular components of the velocity. It inherits the properties of vectors
and of twists.
A velocity twist can be expressed in a different coordinate system by
pre-multiplying it by the adjoint of the transformation between the two
coordinate systems.
Similar to velocity, the acceleration of a rigid body can be decomposed
into its linear and angular components.
Chapter 4
Rigid Body Dynamics
Dynamics, also referred to as kinetics in older book, studies how forces influ-
ence the motion of a body.
4.1 Inertial Frame of Reference
Imagine you are on a long highway in Quito (Ecuador), which is nearly ex-
actly on the equator. You are driving at a constant speed, and your perception
of the road is that it is perfectly straight. You know that the gravitational
acceleration is 9.81 m/s
2
, however, the accelerometer in your smartphone pre-
tends that it is in fact 9.78 m/s
2
instead. What could possibly explain this
discrepancy?
The skewed perception of the accelerometer is due to the fact that, as you
drive, you are in fact rotating about the axis of the earth. This revolute mo-
tion implies that your velocity vector is constantly changing direction, which
induces a rotational acceleration about the axis of the earth. The error in the
accelerometer’s estimate was due to the (incorrect) assumption that you were
not accelerating, resulting in a discrepancy between the observed kinematics
and the measured forces.
A ubiquitous term in dynamics is inertial frame, which designate a refer-
ence frame that does not accelerate. In such a frame, Newton’s laws are valid,
since the inertial reference frame does not rotate about any axis. Indeed, ro-
tating implies that the velocity direction changes over time, and therefore that
the frame accelerates (even if the magnitude of the velocity does not change).
The cosmological principle states that the same phenomenon can be ob-
served independently of the observer’s location in the universe and indepen-
51
52 CHAPTER 4. RIGID BODY DYNAMICS
dently of the direction of observation. According to this principle, the universe
would be isotropic and homogeneous, and hence would not have any center. In
other words, the cosmological principle states that any phenomena observed in
an inertial frame can be equivalently observed in any other inertial reference
frame. Consequently, it does not matter in which inertial reference frame the
rigid object dynamics is observed in, all are equivalent.
The obvious question becomes the one of finding what is the inertial frame
of our universe. It turns out that this is a very complicated question but that
a weighted average of the heaviest quasars’ (the heaviest stars) velocities could
give us an approximate location. This is the basis of the International Celestial
Reference System whose origin is located at the barycenter of our solar system
and whose axes are such that very massive and very far celestial bodies do not
appear to rotate. In the context of robotics, any frame in which Newton’s laws
are sufficiently accurate can be considered as an inertial frame. In practice,
we can almost always consider that a frame fixed somewhere in the workspace
of the robot is an inertial frame, which we will refer to as the world frame F
w
.
4.2 Moments in Dynamics
In mathematics, the Nth moment of a function f(x) is a characteristic defined
as
Z
−∞
x
N
f(x)dx, (4.1)
and is determined by the shape of f(x). In physics, the moment of something
usually refer to the first moment, which involves the product of a distance and
the physical quantity. The moment of a physical quantity is formally defined
as
b
p
a
×
w
q, (4.2)
where q is a physical quantity observed in an inertial frame and
b
p
a
is a po-
sition relative to a local frame about which the moment is computed. It is
particularly important to note that q is observed in an inertial frame. Since
many fundamental physical quantities in dynamics (including mass) vary de-
pending on the frame in which they are observed, several equations will only be
applicable when quantities are related through a common ground, the inertial
frame.
Three moments are central to dynamics: the moment of force, the moment
of momentum and the moment of inertia. The moment of force, also called
torque, is defined as
b
τ
a
=
b
p
a
×
b
w
f
a
, (4.3)
4.3. MOMENTS OF A MASS DISTRIBUTION 53
where
b
w
f
a
is the force on {a} observed in the inertial frame F
w
and expressed
in the local frame F
b
. For a point mass i located at
b
p
a
relative to the local
frame F
b
, the moment of mass is defined as
b
p
a
×
w
m
i
, (4.4)
where the mass is measured in the inertial frame F
w
. Surprisingly, the mea-
sured mass of a body varies depending on the observer’s velocity. Indeed, as
highlighted by the famous E = mc
2
equation, mass is tied to energy, and
therefore to the frame it is observed in. However, since the discrepancy be-
tween the measured mass and the mass observed in the inertial frame is very
small (unless the observer is moving at a significant fraction of the speed of
light), we will consider the mass to be independent of the frame it is measured
in (m
w
m). The moment of momentum (also called angular momentum) is
defined as
b
ε
a
=
b
p
a
×
b
w
E
a
, (4.5)
where
b
w
E
a
is the momentum (to be defined in Sec. 4.4) of {a} observed in the
inertial frame F
w
and expressed in the local frame F
b
.
4.3 Moments of a Mass Distribution
In robotics, we are often interested in the dynamics of objects that we model as
rigid bodies: bodies for which the relative position between any two points does
not change over time. A rigid body is a mass distribution with volume V R
3
and mass density function ρ(p) mapping any point in V to a nonnegative mass
density.
The Nth moment of a body’s mass distribution is determined by integrating
over the moments of all point masses making up the body, which can be
expressed as
Z
M
[
b
p
i
]
N
×
dm, (4.6)
where the integral is over the mass distribution M of the body and
b
p
i
is the
position of the i-th point mass. Since the mass density of the rigid body might
not be homogeneous, a more general definition is given as
Z
V
[
b
p
i
]
N
×
ρ(
b
p
i
)dV, (4.7)
where
b
p
i
is the position of the i-th point in the volume V of the body relative
to a frame F
b
fixed on the body.
54 CHAPTER 4. RIGID BODY DYNAMICS
4.3.1 Zeroth Moment: Total Mass
The zeroth moment of a mass distribution is given by
Z
V
[
b
p
i
]
0
×
ρ(
b
p
i
)dV = 1
3×3
Z
V
ρ(
b
p
i
)dV
| {z }
m
= m1
3×3
, (4.8)
where m is the total mass of the body.
4.3.2 First Moment: Centre of Mass
The first moment of a mass distribution is given by
Z
V
[
b
p
i
]
1
×
ρ(
b
p
i
)dV =
"
Z
V
b
p
i
ρ(
b
p
i
)dV
| {z }
m
b
p
c
#
×
= m [
b
p
c
]
×
, (4.9)
where the identity [u]
×
+ [v]
×
= [u + v]
×
was used, and where
b
p
c
is the
centre of mass of the body. For bodies of homogeneous mass density (that is,
ρ(p) = ρ p V for some ρ R
+
), the location of the centre of mass is given
by the geometrical centre, or centroid, of the body. The first moment represents
the weighted location of the centre of mass and is the point about which
zero torque is exerted when the mass of the body is uniformly accelerated.
Consequently, the motion of a rigid body under uniform acceleration can be
equivalently described by a single point positioned at
b
p
c
with mass equals to
m. Also, the centre of mass being the point around which the body’s mass
is symmetrically distributed, any rigid body is easier to accelerate about its
centre of mass than about any other point.
4.3.3 Second Moment: Inertia Tensor
The second moment of the body’s mass distribution is given by
Z
V
[
b
p
i
]
2
×
ρ(
b
p
i
)dV =
Z
V
[
b
p
i
]
T
×
[
b
p
i
]
×
ρ(
b
p
i
)dV =
b
I
b
, (4.10)
which is the inertia matrix (also called inertia tensor ) of the body computed
relative to F
b
.
The inertia tensor I is a 3×3 symmetric and positive-definite matrix where
the I
ij
element expresses how torque applied about axis e
i
will produce angular
acceleration around axis e
j
. Analogously, the I
ij
element expresses how the
rotation about axis e
i
will produce angular momentum around axis e
j
.
4.3. MOMENTS OF A MASS DISTRIBUTION 55
The diagonal elements of I are called the moments of inertia while the
off-diagonal elements are termed products of inertia. When computed relative
to some frame F
e
, symmetries of the mass distribution about the axes of F
e
will make some products of inertia be zero. When I
ij
= 0, no torque about
e
i
, however large it is, will produce any angular acceleration about e
j
. This is
crucial for racing cars; a rotation about the axle of an imbalanced wheel will
produce an angular momentum around another axis, making the wheel wobble.
Carefully balancing the mass distribution of the wheels reduces products of
inertia to values close to zero, which ultimately enables the car to sustain
greater accelerations.
For a frame F
a
whose origin is the same as F
b
but whose axes are oriented
with
b
R
a
relative to F
b
, the inertia matrix computed relative to F
a
is given
by
a
b
I
b
=
Z
V
[
a
b
p
i
]
2
×
ρ(
b
p
i
)dV (4.11)
=
Z
V
[
a
R
b
b
p
i
]
2
×
ρ(
b
p
i
)dV (4.12)
=
Z
V
[
a
R
b
b
p
i
]
T
×
[
a
R
b
b
p
i
]
×
ρ(
b
p
i
)dV (4.13)
=
Z
V
a
R
b
[
b
p
i
]
T
×
a
R
T
b a
R
b
| {z }
=1
[
b
p
i
]
×
a
R
T
b
ρ(
b
p
i
)dV (4.14)
=
Z
V
a
R
b
[
b
p
i
]
2
×
a
R
T
b
ρ(
b
p
i
)dV (4.15)
=
a
R
b
Z
V
[
b
p
i
]
2
×
ρ(
b
p
i
)dV
| {z }
b
I
b
a
R
T
b
(4.16)
=
a
R
b b
I
b a
R
T
b
, (4.17)
where (4.14) makes use of the identity [Ru]
×
= R [u]
×
R
T
. The relation in
(4.17) defines how the inertia matrix changes when the coordinate system used
to express point positions is changed.
Given a frame F
c
whose origin is located at the centre of mass and whose
axes are aligned with the body frame F
b
, the inertia matrix computed relative
56 CHAPTER 4. RIGID BODY DYNAMICS
to F
b
is expressed as
b
I
b
=
Z
V
[
b
p
i
]
2
×
ρ(
b
p
i
)dV (4.18)
=
Z
V
[
b
p
c
+
c
p
i
]
2
×
ρ(
c
p
i
)dV (4.19)
=
Z
V
[
b
p
c
]
2
×
ρ(
c
p
i
)dV +
Z
V
[
c
p
i
]
2
×
ρ(
c
p
i
)dV
[
b
p
c
]
×
Z
V
[
c
p
i
]
×
ρ(
c
p
i
)dV
| {z }
=0
Z
V
[
c
p
i
]
×
ρ(
c
p
i
)dV
| {z }
=0
[
b
p
c
]
×
(4.20)
= [
b
p
c
]
2
×
Z
V
ρ(
c
p
i
)dV
| {z }
m
+
Z
V
[
c
p
i
]
2
×
ρ(
c
p
i
)dV
| {z }
c
I
b
(4.21)
= m [
b
p
c
]
2
×
+
c
I
b
, (4.22)
where
c
I
b
is the inertia matrix of the body computed relative to the centre of
mass. The relation between
b
I
b
and
c
I
b
in (4.22) is known as Steiner’s theorem
or as the parallel axis theorem.
The equations in (4.22) and (4.17) can be combined to relate the iner-
tia tensor of a body computed relative to frames with different origins and
orientations with
a
I
b
=
a
R
b
b
I
b
m [
b
p
c
]
T
×
[
b
p
c
]
×
a
R
T
b
+ m [
c
p
a
]
T
×
[
c
p
a
]
×
(4.23)
where the position of the centre of mass relative to body frame F
b
is given by
b
p
c
.
There exists a set of axes, called the principal axes of inertia, about which
the mass distribution is symmetric. Such an inertia tensor
p
c
I
b
is obtained
when p in (4.10) is defined relative to c and expressed in F
p
where c denotes
the centre of mass and F
p
=
p
x
p
y
p
z
T
denotes the principal orientation
of the mass distribution. The structure of
p
c
I
b
is particularly simple as its off-
diagonal elements are zero and its diagonal elements are strictly positive. Due
to its special meaning,
p
c
I
b
is the common denominator of all inertia tensor
expressions for a given body.
Computing the eigenvectors of any inertia matrix for a given body yields
the principal axes of inertia, with the eigenvalues being the principal moments
of inertia. The existence of principal axes of inertia has an important implica-
tion: the motion of a rigid body about its centre of mass is strictly determined
by the principal moments of inertia (in fact only their ratios really matters).
4.4. MOMENTUM 57
Consequently, from a dynamics perspective, any rigid body can be modeled as
an ellipsoid whose radii are given by the principal moments of inertia oriented
along the principal axes of inertia.
Finally, inertia is additive, meaning that the inertia of a body can be
computed as the sum of the inertia of all its constituent point-masses.
4.4 Momentum
Momentum is defined as the product of inertia and velocity. For a point-mass,
the momentum is given by
c
b
E
a
= m
c
b
v
a
(4.24)
when observed from {b}, and expressed in the {c} coordinate system. The
momentum is a conserved quantity, which means that it does not change over
time in a closed system. Consequently, the momentum is a characteristic of
a system. From (4.41), it is apparent that the momentum inherits the vector
properties of the velocity. The total momentum of a system of point-masses
is therefore given by the sum of the momenta of all the point-masses. For a
body whose volume is V
b
R
3
and whose mass density is given by ρ(p
i
), the
momentum of the body is given by
w
E
b
=
Z
V
b
w
˙
p
i
ρ(p
i
)dV (4.25)
=
Z
V
b
(
w
˙
p
c
+
c
˙
p
i
) ρ(p
i
)dV (4.26)
=
Z
V
b
w
˙
p
c
ρ(p
i
)dV +
Z
V
b
c
˙
p
i
ρ(p
i
)dV (4.27)
=
w
˙
p
c
Z
V
b
ρ(p
i
)dV
| {z }
=m
+
Z
V
b
w
ω
b
×
c
p
i
ρ(p
i
)dV (4.28)
= m
w
˙
p
c
+ [
w
ω
b
]
×
Z
V
b
c
p
i
ρ(p
i
)dV
| {z }
=0
(4.29)
= m
w
˙
p
c
= m (
w
v
b
+
w
ω
b
×
b
p
c
+
w
b
˙
p
c
) (4.30)
where the integral in (4.29) equals zero by the definition of the centre of mass
(c × ma = 0).
58 CHAPTER 4. RIGID BODY DYNAMICS
4.4.1 Moment of Momentum
The moment of momentum of a point mass i in a rigid body whose local frame
is F
b
and that is rotating about inertial frame F
w
is defined as
b
ε
i
=
b
p
i
×
b
w
E
b
, (4.31)
where
b
p
i
is the position of the point mass relative to the local frame F
b
. Like
the momentum, the moment of momentum is a conserved quantity, making it
a characteristic of interest and the basis upon which the equations of motion
for a rotating body will be derived in Sec. 4.7.3.
Assuming that the body moves about inertial frame F
w
, the moment of
momentum computed relative to F
b
is given by
b
ε
b
=
Z
V
b
b
p
i
×
b
w
˙
p
i
ρ(p
i
)dV (4.32)
=
Z
V
b
b
p
i
×
b
w
v
b
+
b
w
ω
b
×
b
p
i
ρ(p
i
)dV (4.33)
=
Z
V
b
b
p
i
×
b
w
v
b
ρ(p
i
)dV +
Z
V
b
b
p
i
×
b
w
ω
b
×
b
p
i
ρ(p
i
)dV (4.34)
=
Z
V
b
b
p
i
ρ(p
i
)dV ×
b
w
v
b
+
Z
V
b
b
p
i
×
b
p
i
×
b
w
ω
b
ρ(p
i
)dV (4.35)
=
Z
V
b
b
p
i
ρ(p
i
)dV
| {z }
=m
b
p
c
×
b
w
v
b
+
Z
V
b
[
b
p
i
]
T
×
[
b
p
i
]
×
ρ(p
i
)dV
| {z }
=
b
I
b
b
w
ω
b
(4.36)
= m
b
p
c
×
b
w
v
b
+
b
I
b
b
w
ω
b
(4.37)
where the definition of the centre of mass and inertia matrix were used in
(4.36). The first term in the right-hand side of (4.37) represents the moment
of momentum that is due to the motion of the centre of mass, while the second
term represents the moment of momentum that is due to the motion of the
body about F
b
. The expression in (4.37) is part of onig’s theorem. There
is a significant source of confusion in the naming convention used to describe
the terms in (4.37). Indeed, either
w
ε
b
or
b
I
b w
ω
b
are widely termed angular
momentum. The ambiguity comes from the fact that, when considering a
revolving body with no translational motion (e.g., a spinning top), ε = Iω.
We will follow the advice of Peter Hughes and Roy Featherstone, and name
real angular momentum or real moment of momentum the left-hand side of
(4.37) and intrinsic angular momentum the rightmost term in (4.37).
4.4. MOMENTUM 59
The equation in (4.37) expresses the momentum in the body frame and
requires that the motion of the body be also expressed in F
b
. It is usually
more practical to express the motion of the body in the inertial frame F
w
with
w
b
ε
b
=
w
R
b
m
b
p
c
×
b
w
v
b
+
b
I
b
b
w
ω
b
(4.38)
= m
w
R
b
b
p
c
×
w
v
b
+
w
R
b b
I
bw
R
T
b w
R
b
| {z }
=1
w
ω
b
(4.39)
= m
w
R
b
b
p
c
×
w
v
b
+
w
R
b b
I
b w
ω
b
, (4.40)
in which
w
v
b
and
w
ω
b
are expressed in the world frame. The equations for the
linear and angular momentum expressed in F
w
, on which stands the equations
of motion, are given by
w
E
b
= m
w
˙
p
c
= m (
w
v
b
+
w
ω
b
×
b
p
c
+
w
b
˙
p
c
) (4.41)
w
b
ε
b
= m
w
R
b
b
p
c
×
w
v
b
+
w
R
b b
I
b w
ω
b
, (4.42)
where F
c
, F
b
, and F
w
are respectively the centre of mass frame, the body
frame, and the world frame that is assumed to be an inertial frame.
4.4.2 With Body-Frame Along Principal Axes
The simplest expression for the intrinsic momentum is produced when a ref-
erence frame F
b
is fixed at the centre of mass of the body and aligned with
the principal axes of inertia. In such a case, the inertia matrix is diagonal and
each component of the intrinsic angular momentum is given by
p
w
ε
b
=
p
c
I
b
p
w
ω
b
(4.43)
=
p
x
c
I
b
0 0
0
p
y
c
I
b
0
0 0
p
z
c
I
b
p
x
w
ω
b
p
y
w
ω
b
p
z
w
ω
b
(4.44)
=
I
p
x
ω
x
I
p
y
ω
y
I
p
z
ω
z
, (4.45)
where the angular momentum about some axis only depends on the angular
velocity about this same axis.
60 CHAPTER 4. RIGID BODY DYNAMICS
4.5 Energies, Work, and Power
Energy, whose unit is the Joule, is a conserved quantity a closed system
will conserve its energy over time. As Maxwell remarks, the absolute value of
energy in a system is unknown and unimportant as all phenomena depend on
the variations of energy and not on its absolute value”.
4.5.1 Kinetic Energy
The kinetic energy of a point mass {i} whose mass is m
i
is given by integrating
its momentum over the velocity with
w
K
i
=
Z
˙
p
0
w
E
i
d
˙
p =
1
2
m
i
w
˙
p
T
i
w
˙
p
i
, (4.46)
where
w
˙
p
i
is the real velocity of the point mass observed and expressed in F
w
.
For a rigid body, as depicted in Fig. 4.1, the kinetic energy is given by
w
K
b
=
1
2
Z
V
w
˙
p
T
i w
˙
p
i
ρ(p
i
)dV (4.47)
=
1
2
Z
V
(
w
v
b
+
w
ω
b
×
b
p
i
)
T
(
w
v
b
+
w
ω
b
×
b
p
i
) ρ(p
i
)dV (4.48)
=
1
2
Z
V
w
v
T
b w
v
b
+ 2
w
v
T
b
(
w
ω
b
×
b
p
i
)
+ (
w
ω
b
×
b
p
i
)
T
(
w
ω
b
×
b
p
i
)
| {z }
=ω
T
[p]
T
×
[p]
×
ω
ρ(p
i
)dV (4.49)
=
1
2
m
w
v
2
b
+ 2
w
v
T
b
[
w
ω
b
]
×
Z
V
b
p
i
ρ(p
i
)dV
| {z }
=m
b
p
c
+
w
ω
T
b
Z
V
[
b
p
i
]
2
×
ρ(p
i
)dV
| {z }
=
b
I
b
w
ω
b
(4.50)
=
1
2
m
w
v
2
b
| {z }
linear
+ m
w
v
T
b
[
w
ω
b
]
×
b
p
c
+
1
2
w
ω
T
b b
I
b w
ω
b
| {z }
rotational
, (4.51)
in which the middle term cancels if F
b
is at the centre of mass such that
b
p
c
= 0. In such a case, the kinetic energy is reduced to the linear and
rotational terms in (4.51). In (4.49), the rightmost term in the integral was
4.5. ENERGIES, WORK, AND POWER 61
rearranged with
(
w
ω
b
×
b
p
i
)
T
(
w
ω
b
×
b
p
i
) = ([
b
p
i
]
T
×
w
ω
b
)
T
([
b
p
i
]
T
×
w
ω
b
) (4.52)
= ([
b
p
i
]
×
w
ω
b
)
T
([
b
p
i
]
×
w
ω
b
) (4.53)
=
w
ω
T
b
[
b
p
i
]
T
×
[
b
p
i
]
×
w
ω
b
(4.54)
=
w
ω
T
b
[
b
p
i
]
2
×
w
ω
b
. (4.55)
In (4.50), the definitions of the mass, centre of mass, and inertia matrix were
used to resolve the integral. As a reminder,
m =
Z
V
ρ(p
i
)dV (4.56)
m
b
p
c
=
Z
V
b
p
i
ρ(p
i
)dV (4.57)
b
I
b
=
Z
V
[
b
p
i
]
2
×
ρ(p
i
)dV . (4.58)
F
b
F
w
w
p
b
,
w
R
b
b
p
c
Figure 4.1: Reference frame F
b
is fixed on the rigid body, F
w
is the inertial
frame, and is the centre of mass.
4.5.2 Potential Gravitational Energy
The potential gravitational energy is the amount of kinetic energy that would
appear if a mass was to fall from a given point to the lowest potential energy
level of the system. Close to the earth, the potential gravitational energy of
mass m is
U = m gh (4.59)
where h is the height of the centre of mass above the reference ground, and
the gravitational acceleration is g = [0, 0, 9.81]
T
m/s
2
.
62 CHAPTER 4. RIGID BODY DYNAMICS
4.5.3 Work
Work is done when applying a force on a mass along a displacement. Doing so
changes the kinetic and/or potential energy of the mass. Therefore, the units
of work are Joules (scalar).
W =
Z
f(s) · dr (4.60)
4.5.4 Power
Power is the amount of energy transferred per unit of time. Its units are
Joules per second or Watts. Power can also represent the product of force
with velocity and is the time derivative of work.
P =
W
t
=
dW
dt
(4.61)
P = f ·
˙
p (4.62)
4.6 Spatial Inertia Matrix
The spatial inertia matrix, also called pseudo-inertia or system inertia matrix,
can be used to relate momenta and velocities, expressed as the 6-dimensional
vectors
c
b
ν
a
=
c
b
v
a
c
b
ω
a
T
(4.63)
c
b
E
a
=
c
b
E
a
c
b
ε
a
T
(4.64)
built from the usual 3-dimensional vectors. For a rigid body, the spatial inertia
matrix can be defined as
I =
m1
3×3
m [c]
×
m [c]
×
I
(4.65)
which is, like the inertia matrix, symmetric and positive-definite. The matrices
in (4.65) and in (4.63) can be related with
E = Iν (4.66)
and with
K =
1
2
ν
T
Iν (4.67)
4.7. NEWTONIAN MECHANICS 63
provided that the vectors are all expressed in the same reference frame. In
(4.67), the kinetic energy is related to the spatial velocity through the spatial
inertia, and since the kinetic energy must be positive, then the spatial inertia
matrix must be symmetric positive-definite given any non-zero velocity. Note
that for more complicated systems, a system inertia matrix different from
(4.65) can be determined such that the relations in (4.66) and (4.67) still
stand.
4.7 Newtonian Mechanics
Newton’s laws of motion were initially defined for point-masses and Euler pro-
posed formulations that are well-suited to rigid bodies. Newtonian Mechanics
usually refer to the combination of Newton’s and Euler’s laws of motion with
the socalled Newton-Euler equations.
4.7.1 Force
Newton’s first law of motion introduces the concept of inertia and states that
a body will stay at rest unless a force is acted upon it. With the concept of
momentum in mind, the first law leads nicely to Newton’s second law
f =
dE
dt
(4.68)
that states that a force acting on a body will change the rate of its momentum.
The first two laws thereby imply that a body will conserve its momentum.
Newton’s third law stems from the idea of conservation of momentum and
states that two interacting bodies will be subject to opposed forces—a two-
body system conserving its momentum has to have internal forces that cancel
each other.
The expression in (4.68) defines a force as a physical phenomenon affecting
the momentum of a body. Assuming that the mass of the body is constant, a
force acting on a body will change the direction or the magnitude of the body’s
velocity. If the body is only accelerating in a straight line, the force required
to produce this acceleration is given by the simplest form of Newton’s second
law,
w
f
b
=
dE
dt
=
d
dt
(m
w
˙
p
c
) = m
w
a
c
, (4.69)
where F
b
is a frame fixed in the accelerating body, F
w
is the inertial frame,
and F
c
is a frame at the centre of mass of the body with axes aligned with
F
b
. In general, when the body frame F
b
is accelerating relative to the inertial
64 CHAPTER 4. RIGID BODY DYNAMICS
frame F
w
, through a change of direction or through a linear acceleration, the
expression for the momentum of a body (as derived in (4.30)) is given by
w
E
b
= m (
w
v
b
+
w
ω
b
×
b
p
c
+
w
b
˙
p
c
) . (4.70)
The rate of change of the momentum is then given by
w
˙
E
b
=
d
dt
(m (
w
v
b
+
w
ω
b
×
w
R
b
b
p
c
+
w
R
b
w
b
˙
p
c
)) (4.71)
= m
d
dt
(
w
v
b
) +
d
dt
(
w
ω
b
×
w
R
b
b
p
c
) +
d
dt
(
w
R
b
b
˙
p
c
)
, (4.72)
and using d/dt(u × v) = du/dt × v + u × dv/dt,
= m
w
a
b
+
w
α
b
×
w
R
b
b
p
c
+
w
ω
b
×
d
dt
(
w
R
b
b
p
c
) +
d
dt
(
w
R
b
b
˙
p
c
)
,
(4.73)
and using d/dt(Rv) = R ˙v + ω × Rv,
= m
w
a
b
+
w
α
b
×
w
R
b
b
p
c
+
w
ω
b
× (
w
R
b
b
˙
p
c
+
w
ω
b
×
w
R
b
b
p
c
)
+
w
R
b
d
dt
(
w
b
˙
p
c
) +
w
ω
b
× (
w
R
b
b
˙
p
c
)
!
, (4.74)
= m
w
a
b
+
w
α
b
×
w
b
p
c
+
w
ω
b
× (
w
b
˙
p
c
+
w
ω
b
×
w
b
p
c
)
+
w
b
a
c
+
w
ω
b
×
w
b
˙
p
c
, (4.75)
and since
w
a
c
=
w
a
b
+
w
b
a
c
,
= m (
w
a
c
+
w
α
b
×
w
b
p
c
+ 2
w
ω
b
×
w
b
˙
p
c
+
w
ω
b
×
w
ω
b
×
w
b
p
c
) . (4.76)
The result in (4.76) can be validated by comparing it to the expression in
(3.30) for the acceleration of a point in a rotating frame. Indeed, starting with
Newton’s second law
w
f
b
= m
w
¨
p
c
(4.77)
and using (3.30) with {o} = {c}
w
¨
p
c
=
w
a
c
+ 2
w
ω
b
×
w
b
˙
p
c
+
w
ω
b
× (
w
ω
b
×
w
b
p
c
) +
w
α
b
×
w
b
p
c
(4.78)
yields
w
b
f
b
= m
w
a
c
| {z }
=
w
f
b
+ m (
w
α
b
×
w
b
p
c
+ 2
w
ω
b
×
w
b
˙
p
c
+
w
ω
b
×
w
ω
b
×
w
b
p
c
) . (4.79)
4.7. NEWTONIAN MECHANICS 65
as an extension of Newton’s second law to rotating bodies.
Assuming that
w
a
c
=
w
a
b
,
w
b
f
b
= m (
w
a
b
+ 2
w
ω
b
×
w
b
˙
p
c
+
w
ω
b
× (
w
ω
b
×
w
b
p
c
) +
w
α
b
×
w
b
p
c
) (4.80)
= m (
w
a
b
) (4.81)
+ m (2
w
ω
b
×
w
b
˙
p
c
) (4.82)
+ m (
w
ω
b
× (
w
ω
b
×
w
b
p
c
)) (4.83)
+ m (
w
α
b
×
w
b
p
c
) (4.84)
is the force that would be measured by a sensor located at F
b
. The term in
(4.81) is Newton’s Second Law relating the linear acceleration of a body to
the force it experiences. The additional terms on the right-hand side of (4.80)
are called fictitious forces as they are not due to a real physical force (i.e.
gravitational, electromagnetic, or nuclear). The term in (4.82) is the Coriolis
force, while the term in (4.83) is the centrifugal force, and (4.84) is called
Euler’s force. Fictitious forces are added to correct the skewed perception of
kinematics in the rotating frame and reconcile the requirement that the sum
of all forces on a body must be zero (i.e., forces sensed must be explained by a
velocity change). In other words, fictitious forces compensate for what is not
“seen” by a force sensor located at F
b
due to its own motion. The classical
example if the one of a person in a carousel. As the carousel spins about its
axis, the person has no linear velocity or acceleration. Nonetheless, the person
will feel a force pushing them outwards from the centre of the carousel: the
centrifugal force. Likewise, a force sensor held by the person will measure an
outward force. However, once the carousel stops spinning, the person will not
be feeling the outward force anymore, as if it had vanished. A real force would
not appear or vanish depending on the motion of the sensor, a true force either
exists or does not. Fictitious forces are therefore not real forces, but rather
form an adjustment enabling the sensor to take its own motion into account.
In robotics, fictitious forces are crucial to the identification of a manipu-
lated object’s inertial parameters (i.e., mass, centre of mass, and inertia ma-
trix). Indeed, when a robot manipulates an object, the forces and torques
measured by the robot are influenced by the motion of the sensor. However,
the goal of the operation is to identify inertial parameters that are independent
of the sensor’s motion such that these parameters can be used in a variety of
applications. Hence, when identifying inertial parameters, fictitious forces will
be used to correct the skewed perception of the sensor and produce estimates
that are independent of the sensor’s motion.
66 CHAPTER 4. RIGID BODY DYNAMICS
4.7.2 Torque
Just as the concept of force was defined by Newton as the rate of change
of momentum, Euler related the change in the moment of momentum to a
moment of force, or torque, applied to a body. With the moment of momentum
of a point mass defined as
b
ε
i
=
b
p
i
×
b
w
E
b
(4.85)
in (4.31), the rate of change of the real angular momentum of a body is given
by
w
b
˙
ε
b
=
d
dt
Z
V
w
b
p
i
×
w
˙
p
i
ρ(p
i
)dV
, (4.86)
where V R
3
is the volume of the body. Another expression for
b
˙
ε
b
can be
obtained by performing a time differentiation of the angular momentum in
(4.42) with
w
b
˙
ε
b
=
d
dt
(m
w
R
b
b
p
c
×
w
v
b
+
w
R
b b
I
b w
ω
b
) . (4.87)
Equating the expressions in (4.86) and (4.87) yields
d
dt
Z
V
w
b
p
i
×
w
˙
p
i
ρ(p
i
)dV
| {z }
=A
=
d
dt
(m
w
R
b
b
p
c
×
w
v
b
+
w
R
b b
I
b w
ω
b
)
| {z }
=B
, (4.88)
where A and B are introduced to simplify the derivation. We will first com-
pute A, then compute B, and finally combine the two expressions. Since the
derivative and integral are linear operations, we have that
A =
d
dt
Z
V
w
b
p
i
×
w
˙
p
i
ρ(p
i
)dV
(4.89)
=
Z
V
d
dt
(
w
b
p
i
×
w
˙
p
i
) ρ(p
i
)dV , (4.90)
and using d/dt(u × v) =
˙
u × v + u ×
˙
v,
=
Z
V
w
b
˙
p
i
×
w
˙
p
i
+
w
b
p
i
×
w
¨
p
i
ρ(p
i
)dV (4.91)
=
Z
V
w
b
˙
p
i
×
w
˙
p
i
| {z }
=
w
b
˙
p
i
×
(
w
˙
p
b
+
w
b
˙
p
i
)
ρ(p
i
)dV +
Z
V
w
b
p
i
×
w
¨
p
i
ρ(p
i
)dV
|
{z }
=
w
b
τ
b
(4.92)
4.7. NEWTONIAN MECHANICS 67
where the rightmost term is identified as being the total moment of force acting
on the body since f = ma. Continuing, we have
=
Z
V
w
b
˙
p
i
×
w
˙
p
b
ρ(p
i
)dV +
Z
V
w
b
˙
p
i
×
w
b
˙
p
i
ρ(p
i
)dV
| {z }
=0
+
w
b
τ
b
(4.93)
=
Z
V
w
b
˙
p
i
ρ(p
i
)dV
| {z }
=m
w
b
˙
p
c
×
w
˙
p
b
+
b
τ
b
(4.94)
= m
w
R
b
b
˙
p
c
×
w
˙
p
b
+
w
b
τ
b
, (4.95)
which provides, for the first time, an expression featuring the torque (or mo-
ment of force) exerted on a body. The expression for B is computed as
B =
d
dt
(m
w
R
b
b
p
c
×
w
v
b
+
w
R
b b
I
b w
ω
b
) (4.96)
= m
w
R
b
b
˙
p
c
×
w
˙
p
b
+ m
w
R
b
b
p
c
×
w
¨
p
b
+
w
R
b b
I
b w
α
b
+
w
ω
b
×
w
R
b b
I
b w
ω
b
(4.97)
by using d/dt(u×v) =
˙
u×v+u×
˙
v and d/dt(Rv) = R ˙v+ω ×Rv. Combining
A and B, we find that
A = B (4.98)
m
w
R
b
b
˙
p
c
×
w
˙
p
b
| {z }
+
w
b
τ
b
= m
w
R
b
b
˙
p
c
×
w
˙
p
b
| {z }
+m
w
R
b
b
p
c
×
w
¨
p
b
+
w
R
b b
I
b w
α
b
+
w
ω
b
×
w
R
b b
I
b w
ω
b
, (4.99)
in which common terms cancel out. The result is Euler’s law of motion for a
rotating rigid body:
w
b
τ
b
= m
w
R
b
b
p
c
×
w
a
b
+
w
R
b b
I
b w
α
b
+
w
ω
b
×
w
R
b b
I
b w
ω
b
, (4.100)
which relates the total torque exerted on a body to its kinematics. (4.100) can
be used to predict the motion of a body onto which a force is applied on a
point remote from the origin of the body. Such a force will induce a moment of
force, or torque, relative to F
b
that will change its angular acceleration. Note
that, due to the leftmost term of the right-hand side of (4.100), if the origin
of F
b
is not coincident with the centre of mass, the body will also experience
a linear acceleration. However, when F
b
= F
c
, the leftmost term cancels out
and the body will only experience a change in angular acceleration.
In a nutshell, Euler’s second law of motion ((4.100)) states that the torque
acting on a body will produce angular acceleration (a change in the rate of
its angular momentum), and potentially a linear acceleration too. The inertia
matrix provides the mapping between torque and angular acceleration.
68 CHAPTER 4. RIGID BODY DYNAMICS
4.7.3 Newton-Euler Equations
In general, a body can be subject to multiple forces acting upon it. By virtue
of being vector quantities, forces can be added together to form a resultant
force acting on a body. Unless all forces are applied at the origin, or unless
there is a perfect balance of forces, a net moment of force will be exerted
on the body (i.e., a torque) about its origin. When analysed relative to the
body frame, the motion of the body will therefore be influenced both by a
force exerted on the origin and by a torque exerted about the origin. The
Newton-Euler equations of motion define how forces and torques acting on a
body influence its motion.
In Sec. 4.7.1, we derived an expression describing the influence that a force
has on the linear acceleration of a body whose velocity might be changing
direction or magnitude (i.e., the body might be accelerating). In Sec. 4.7.2,
differentiating the moment of momentum with respect to time led to an ex-
pression describing how a moment of force influences the angular acceleration
of a body and potentially also contributes to a linear acceleration. We now
have done most of the work and all is left is to combine the two expressions
into the Newton-Euler equation of motion for an accelerating rigid body. We
will first express the equation of motion as a set of two equations, one for lin-
ear motion and one for angular motion, and then combine them into a single
equation.
In Sec. 4.7.1, we obtained the expression
w
b
f
b
= m (
w
a
b
+ 2
w
ω
b
×
w
b
˙
p
c
+
w
ω
b
× (
w
ω
b
×
w
b
p
c
) +
w
α
b
×
w
b
p
c
) (4.101)
describing how the force
w
b
f
b
acting on a body influences its linear acceleration.
In Sec. 4.7.2, we derived
w
b
τ
b
= m
w
b
p
c
×
w
a
b
+
w
b
I
b w
α
b
+
w
ω
b
×
w
b
I
b w
ω
b
, (4.102)
which describes how the moment of force
w
b
τ
b
influences the acceleration of the
body it is exerted on. Putting the two equations together yields the Newton-
Euler equations of motion for a rotating rigid body:
w
b
f
b
= m (
w
a
b
+ 2
w
ω
b
×
w
b
˙
p
c
+
w
ω
b
× (
w
ω
b
×
w
b
p
c
) +
w
α
b
×
w
b
p
c
) (4.103)
w
b
τ
b
= m
w
b
p
c
×
w
a
b
+
w
b
I
b w
α
b
+
w
ω
b
×
w
b
I
b w
ω
b
, (4.104)
where all quantities are expressed in F
w
, which is assumed to be an inertial
frame. The force
w
b
f
b
and torque
w
b
τ
b
are respectively acting on and about F
b
,
and are expressed as a function of the body kinematics and inertial parameters.
4.7. NEWTONIAN MECHANICS 69
With Centre of Mass Rigidly Attached
Equation (4.103) and (4.104) can be further simplified by assuming that the
centre of mass does not move relative to F
b
. For instance, in the context of a
robot manipulating an object, we can simplify the equations if we assume that
the object will not slip in the gripper. In such a case,
w
b
¨
p
c
= 0 and
w
b
˙
p
c
= 0,
and the Newton-Euler equations becomes
w
b
f
b
= m (
w
a
b
+
w
ω
b
× (
w
ω
b
×
w
b
p
c
) +
w
α
b
×
w
b
p
c
) (4.105)
w
b
τ
b
= m
w
b
p
c
×
w
a
b
+
w
b
I
b w
α
b
+
w
ω
b
×
w
b
I
b w
ω
b
, (4.106)
where the Coriolis force does not appear anymore. We can usually select the
body-fixed frame F
b
such that the centre of mass (presumably) does not move
relative to it. Making use of skew-symmetric matrices and of matrix notation,
the above equations can be rewritten as
w
b
f
b
w
b
τ
b
=
m1
3×3
m [
w
b
p
c
]
×
m [
w
b
p
c
]
×
w
b
I
b
w
a
b
w
α
b
+
m [
w
ω
b
]
×
[
w
ω
b
]
×
w
b
p
c
[
w
ω
b
]
×
w
b
I
b w
ω
b
. (4.107)
The equations are further simplified when F
b
= F
w
, but such a situation
rarely occurs in robotics. An equivalent, but slightly more practical formu-
lation is obtained by expressing the equations in the body-fixed frame F
b
,
such that the inertial parameters do not need to be transformed into F
w
via
a continuously changing rotation matrix. The resulting equations become
b
f
b
b
τ
b
=
m1
3×3
m [
b
p
c
]
×
m [
b
p
c
]
×
b
I
b
"
b
w
a
b
b
w
α
b
#
+
m
h
b
w
ω
b
i
×
h
b
w
ω
b
i
×
b
p
c
h
b
w
ω
b
i
×
b
I
b
b
w
ω
b
, (4.108)
in which the kinematics are now expressed in F
b
.
The system of equations in (4.108) can be concisely written as
b
w
W
b
=
b
I
c
b
w
λ
b
+
h
b
w
ν
b
i
×
b
I
c
b
w
ν
b
(4.109)
where
b
w
W
b
=
"
b
w
f
b
b
w
τ
b
#
b
w
λ
b
=
"
b
w
a
b
b
w
α
b
#
b
w
ν
b
=
"
b
w
v
b
b
w
ω
b
#
(4.110)
and the skew-symmetric matrix of the velocity twist is defined as
h
b
w
ν
b
i
×
=
h
b
w
ω
b
i
×
0
h
b
w
v
b
i
×
h
b
w
ω
b
i
×
. (4.111)
70 CHAPTER 4. RIGID BODY DYNAMICS
The wrench
b
w
W
b
is a six-dimensional spatial force vector that can be expressed
in a different reference frame through the relation
x
w
W
b
= Ad (
x
T
b
)
T
b
w
W
b
(4.112)
where Ad (
x
T
b
) is the adjoint matrix of the pose of F
b
relative to F
x
, as
defined in (2.99).
4.7.4 Euler’s Laws
Euler’s laws of motion generalize Newton’s second law to rotating rigid bodies
and state that
w
f
b
=
d
w
E
b
dt
(4.113)
w
τ
b
=
d
w
ε
b
dt
, (4.114)
where f and τ are respectively the total force and torque exerted upon the
body. Note that the above equations are only true if the momentum
is measured and expressed in an inertial frame. Making use of (4.41)
and (4.42), where the body reference frame F
b
is at the centre of mass such
that
b
p
c
= 0, Newton’s law can be formulated as
w
f
b
=
w
f
c
=
d
w
E
b
dt
= m
d (
w
v
b
)
dt
= m
w
a
c
(4.115)
w
τ
b
=
w
τ
c
=
d
w
ε
c
dt
=
w
c
I
w
α
c
+
w
ω
c
×
w
c
I
w
ω
c
(4.116)
where velocities and accelerations are expressed in the inertial frame F
w
through the use of (3.11).
4.7.5 Euler’s Equations for the Motion of a Body in a
Force Field
When F
b
is chosen to be located at the centre of mass and that is it also aligned
with the principal axes of inertia, the equation for the angular momentum is
greatly simplified such that
ε
i
= I
i
ω
i
(4.117)
and the rotational kinetic energy from (4.51) becomes
K
rot
=
1
2
w
ω
T
b
I
b w
ω
b
=
1
2
I
x
ω
2
x
+ I
y
ω
2
y
+ I
z
ω
2
z
(4.118)
4.8. CONTACTS 71
where I
x
is the moment of inertia of the principal axis labeled as x. The
expression for the torque in (4.116) becomes
τ
x
= I
x
α
x
(I
y
I
z
)ω
y
ω
z
τ
y
= I
y
α
y
(I
z
I
x
)ω
z
ω
x
τ
z
= I
z
α
z
(I
x
I
y
)ω
x
ω
y
(4.119)
that are referred as Euler’s equations for the motion of a body in a force field.
Since the equations in (4.119) only depends on the principal axes of inertia,
two objects with different shapes but with the same principal axes of inertia
will move in the same way. For instance, an equivalent ellipsoid can be defined
to represent a rigid body.
4.8 Contacts
4.8.1 The Rigid Body Assumption
In previous chapters, rigid transformations were used to succinctly describe
the pose and motion of complete objects. The assumption underlying the use
of rigid transformations is that objects are perfectly rigid, which has important
ramifications. A direct consequence of assuming that bodies are perfectly rigid
is that even an infinitely large force will not deform the body it has an infi-
nite Young’s modulus. Since there is no internal deformation in which energy
can be stored, the force applied to a rigid body is instantaneously transferred
across the object, violating the finite speed of sound (e.g. about 5000 m/s in
steel). Also, when considering several contact forces exerted on a rigid body,
the rigid body assumption implies that all forces can be summed together to
obtain the net force acting on the body. Although greatly simplifying dynamic
analyses, the rigid body assumption can also lead to indeterminate situations
where multiple, equally valid, sets of forces could be applied to the body. For
instance, when considering a perfectly rigid chair resting on the ground whose
weight is 10 Newtons, the set of forces at each leg could be {2.5, 2.5, 2.5, 2.5}
Newtons or {3, 3, 2, 2} Newtons, or any other combination that sums to 10
Newtons.
In robotics, simple models are ubiquitous: cameras are modelled as pin-
holes, robot links are modelled as rigid bodies, contacts are modelled as in-
finitesimal points, friction is modelled as a step function, and so on. Although
it is often reasonable to use simple models, one must be cautious about the
implications of the underlying assumptions.
72 CHAPTER 4. RIGID BODY DYNAMICS
A Slightly Relaxed Object Model
To avoid issues pertaining to the rigid body assumption (i.e. indeterminacies
and instantaneous force propagation), a slightly relaxed version of the rigid
body model can be used. Instead of considering objects as perfectly rigid,
we can consider that a finite number of contact points, distributed over the
contact interface between two objects, can slightly deform while the rest of
the object remains rigid. Hence, the Young’s modulus (or equivalently, the
stiffness or spring constant) of the material at the contact points is considered
to be finite but very large such that a very large force at the contact point
is required to produce a very small deformation. Under this relaxed model,
the contact points are said to be deforming in the elastic regime as opposed
to the plastic regime where deformation is permanent. Denoting the material
stiffness by κ, and the deformation at the contact point by δ, the relation
f = κδ (4.120)
expresses that the force required to deform the material is proportional to the
deformation. From (4.60), the potential energy stored in the material due to
the deformation is given by
U =
Z
f =
Z
κδ =
κδ
2
2
=
f
2
2κ
(4.121)
such that the potential energy stored in the material is proportional to the
square of the force applied to the contact point. Extending D’Alembert Prin-
ciple (see (5.46)) led to the principle of least action, which states that the path
taken by a system between two points in configuration space is the one that
minimizes energy expenditure. Essentially, a dynamical system will follow the
path that minimizes the energy spent, or as Maupertuis put it, Nature is
thrifty in all its actions”. Hence, in the context of our contact model, the ob-
jects will deform in such a way that the potential energy stored in the contact
points is minimized, which from (4.121) is equivalent to minimizing the square
of the contact forces. Mathematically,
min
f
i
X
i
f
i
2
(4.122)
expresses the objective that nature will follow when determining the contact
forces, we shall do the same.
4.8.2 Types of Frictional Contacts
Many tasks like grasping, placing, or pushing, involve interacting with objects
through frictional contacts, and modelling friction as accurately as possible is
4.8. CONTACTS 73
crucial for the success of these tasks. The field of tribology studies this very
phenomenon and has developed several models to describe the frictional forces
that arise when two surfaces are in contact. Tribologists have shown that fric-
tion depends on many factors such as the roughness of the surfaces, chemical
bonding, local lubrication, the real contact area (which is usually much smaller
than the apparent contact area), the temperature, etc. Although more com-
plex models can describe friction more accurately, they also introduce more
parameters and dependencies that are difficult to estimate, if observable at
all. Hence, in robotics, simple models are often preferred since the uncertainty
in the model parameters far outweighs the benefits of a more accurate model.
The Coulomb friction model (sometimes referred to as Amontons’), poten-
tially augmented with viscous drag and Stribeck effect, is typically used. As
shown in Fig. 4.2, the Coulomb friction model assumes that the friction force
is proportional to the real contact area that is itself proportional to the force
pressing the two surfaces together.
The Coulomb friction model is defined as
(
F
t
µ
s
F
n
if v = 0
F
t
= µ
k
F
n
if v > 0
(4.123)
where F
t
is the tangential friction force, F
n
is the normal force exerted on
the contact interface, µ
s
is the static friction coefficient that is experienced
when the objects are immobile, and µ
k
is the kinetic friction coefficient that
is experienced when the relative velocity v between the two surfaces is greater
than zero. At very low velocities, empirical results suggest that the coefficient
of friction is not equal to µ
k
but rather a value between µ
s
and µ
k
. This
phenomenon is known as the Stribeck effect and results in a smooth transition
between the static and kinetic friction regimes, as shown in Fig. 4.2. As the
relative velocity between the two surfaces increases, the contact between the
two surfaces becomes lubricated and enters an hydrodynamic regime where a
significant viscous drag force is experienced. The friction model resulting from
the Coulomb model augmented with viscous drag and Stribeck effect can be
expressed as
F
t
(v) = F
n
µ
k
+ (µ
s
µ
k
)e
mv
+ dv (4.124)
where m is the Stribeck constant and d is the viscous drag slope. A smooth
Coulomb model is obtained by setting m 1 and d = 0, with the magnitude
of m determining how quickly the friction force transitions from the static to
the kinetic regime.
Since empirical results suggest that the real contact area is much smaller
than the apparent contact area, the assumption that objects are contacting
74 CHAPTER 4. RIGID BODY DYNAMICS
0 0.5 1 1.5 2 2.5 3
0
0.2
0.4
0.6
0.8
1
1.2
F
static
= F
n
µ
s
F
kinetic
= F
n
µ
k
d
m
Hydro dy namic Regime
Velocity v (m/s)
Friction F
t
(Newtons)
F
t
(v) = F
n
·
µ
k
+ (µ
s
µ
k
)e
mv
+ dv
Static Friction
Kinetic Friction
Viscous Drag Slope d
Figure 4.2: Friction force as a function of velocity. When immobile, a body is
subject to a static friction force F
static
= µ
s
F
n
, and when in motion, a lower
kinetic friction force F
kinetic
= µ
k
F
n
is experienced. The Stribeck effect is
apparent during the transition between the static and kinetic regimes, where
coefficient of friction smoothly decreases as velocity increases. As velocity
increases, the interface between the two surfaces enters the hydrodynamic
regime and a significant viscous drag force dv is experienced.
4.8. CONTACTS 75
1 2
3
w
R
1,3
w
R
1,1
w
R
2,3
w
R
2,1
w
R
3,3
w
R
3,2
w
R
4,3
w
R
4,2
Figure 4.3: Three objects in contact through four contact points. At each
contact point, two frames are defined: one for each object in contact. Each
frame is defined with a normal directed outward from the surface of the object
it belongs to. In this figure,
w
R
i,j
expresses the orientation of a frame attached
to the j-th object and located at the i-th contact point relative to the world
frame F
w
.
through point-like contacts can be made with relatively stiff materials. Also,
contact points can be assumed to be in the elastic regime, with the local
deformation being linearly proportional to the force sustained by the contact
point. Discretized point contact can be modelled as hard or soft contacts, with
the former only transmitting forces while the latter also resisting torque about
the surface normal. In practice, discretizing the contact area into a set of
contact points brings about the problem of determining their location, which
is ultimately determined by microscopic variations in the shape of the objects.
An optimistic solution is to assume that the contact points are located on the
the convex hull of the contact area, such that they are best positioned to resist
torque about the surface normal.
4.8.3 Computing Contact Forces
According to D’Alembert principle (see Sec. 5.1.5), the sum of all external
forces acting on a body in motion must be equal and opposed to the sum
of the inertial forces. Hence, the sum of wrenches due to contact forces and
of inertial forces must result in a zero wrench an equilibrium. The force
acting on a body j at the i-th contact point can be expressed in a local frame
F
i,j
=
ˆu ˆv ˆn
, where ˆn is the outward surface normal and ˆu, ˆv are two
orthogonal vectors tangent to the surface. The wrench due to the contact force
76 CHAPTER 4. RIGID BODY DYNAMICS
is given by
w
W
i,j
=
w
R
i,j
[
w
p
i
]
×
w
R
i,j
f
i
(4.125)
where f
i
is the force acting at the i-th contact point expressed in F
i,j
whose
orientation relative to the world frame is given by
w
R
i,j
. By virtue of the
action-reaction principle (i.e., Newton’s third law, see Sec. 4.7.1), the wrench
exerted on an object at a contact point is equal and opposite to the wrench
exerted on the other object at the same contact point. Hence,
w
W
i,a
=
w
W
i,b
(4.126)
for two objects a and b in contact at the i-th contact point. The condition in
(4.126) can either be enforced by defining
f
i,a
= f
i
(4.127)
f
i,b
= f
i
(4.128)
w
R
i,a
=
w
R
i,b
(4.129)
or by defining
f
i,a
= f
i
(4.130)
f
i,b
= f
i
(4.131)
w
R
i,a
=
w
R
i,b
(4.132)
where the second set of equations results in a minimal set of force vectors (only
one per contact point), which reduces the size of the problem when solving for
the contact forces. Also, in the second set of equations, normals are oriented
outward for both objects, following a common convention. However, defining
w
R
i,a
=
w
R
i,b
results in one of the contact frame being left-handed, which
can be confusing when performing computations. It is therefore recommended
to be very careful when using the second set of equations.
With the inertial wrench
w
W
b
j
exerted on object j given by the equation
of motion in (4.103)–(4.104), the equilibrium equation can be expressed as
X
i
w
W
i,j
+
w
W
b
j
= 0 (4.133)
that is simplified to
X
i
w
W
i,j
+ m
1
3×3
[
w
p
c
]
×
0
0
g
= 0 (4.134)
4.8. CONTACTS 77
in static (or quasi-static) situations where g is the gravitational acceleration
constant (e.g. 9.81 m/s
2
).
The system of linear equations defined in (4.133) can be solved to obtain
contact forces acting on the body, but with two caveats. First, (4.133) will be
under-determined with the rank of the coefficient matrix not greater than 6
but with at least 3 tri-dimensional forces to solve for (9 unknowns). Second,
the direction of the force acting at a contact point is constrained to (i) be
compressive since glue would be required to sustain a tensile force, and (ii)
respect friction limits at the contact point. Due to the first constraint, contact
forces are often referred to as unilateral forces since the contact force can only
push on the body and not pull. With a contact force expressed in its local
frame as f
i
=
f
u
i
f
v
i
f
n
i
T
, the compressive constraint can be expressed
as
f
n
i
0 (4.135)
if the surface normal ˆn
i
is pointing outward.
A contact point is said to be sticking if the tangential force is less than
some threshold given by the friction model, and slipping otherwise. Using the
Coulomb friction model, the contact condition at the i-th contact point can
be expressed as
c = µ
i
f
n
i
f
t
i
(4.136)
where µ
i
is the friction coefficient at the i-th contact point, and f
t
i
is the
tangential force acting at the i-th contact point. The contact point is said to
be sticking if c > 0 or equivalently if
µ
i
f
n
i
f
t
i
(4.137)
where the left hand side represents the maximal tangential force that can be
sustained by the contact point. Squaring and rearranging terms in (4.136)
yields
f
2
u
i
+ f
2
v
i
µ
2
i
f
2
n
i
(4.138)
that represent the equation of a cone with axis along the normal force and
with an angle of atan(µ
i
), as pictured in Fig. 4.4. Any contact force lying
inside the cone will result in a sticking contact, while any contact force lying
outside the cone will result in a slipping contact.
Enforcing (4.137) can be difficult due to the non-linear nature of (4.136),
and a common approach is to linearize the Coulomb friction model. To do so,
the friction cone is approximated as a N-sided pyramid, as shown in Fig. 4.5.
A greater number of sides will result in a better approximation of the cone,
but will also result in a more complex definition that is more computationally
78 CHAPTER 4. RIGID BODY DYNAMICS
ˆu
i
ˆv
i
ˆn
i
atan(µ
i
)
f
i
f
t
i
c
Figure 4.4: The Coulomb friction cone at the i-th contact point whose normal
is ˆn
i
, coefficient of friction is µ
i
, and with an angle of atan(µ
i
). The contact
force f
i
must lie inside the cone for the contact condition c to be positive and
the contact point to be sticking.
expensive to enforce. The proportion of friction cone volume covered by the
pyramid is given by
1
N sin(2π/N )
2π
(4.139)
where N is the number of sides of the pyramid. Hence, a simple four-sided
pyramid will result in a volume difference of about 35% with the cone, which
means that about a third of the forces inside the friction cone will end up
outside the pyramid and incorrectly identified as slipping contacts. In com-
parison, an octagonal pyramid will result in a volume difference of about 10%
with the cone.
The area of the N -sided polygon inscribed in the friction circle, as shown
in Fig. 4.5, is defined by the set of inequalities
cos
2πi
N
f
u
+ sin
2πi
N
f
v
µf
n
cos
π
N
i {0, . . . , N 1} (4.140)
where i N is the index of the side of the polygon. The inequalities can be
rewritten in matrix form as
Cf 0
N×1
(4.141)
4.8. CONTACTS 79
with C defined as
C =
1 0 µ cos
π
N
.
.
.
.
.
.
.
.
.
cos
2πi
N
sin
2πi
N
µ cos
π
N
.
.
.
.
.
.
.
.
.
cos
2π(N1)
N
sin
2π(N1)
N
µ cos
π
N
(4.142)
such that a square and octagonal approximation of the friction cone result in
C =
1 0 µ/
2
0 1 µ/
2
1 0 µ/
2
0 1 µ/
2
and C =
1 0 µ cos(π/8)
1/
2 1/
2 µ cos(π/8)
0 1 µ cos(π/8)
1/
2 1/
2 µ cos(π/8)
1 0 µ cos(π/8)
1/
2 1/
2 µ cos(π/8)
0 1 µ cos(π/8)
1/
2 1/
2 µ cos(π/8)
(4.143)
respectively.
Determining the contact forces in an assembly of multiple (nearly) rigid
bodies in contact can be formulated as the following quadratic problem with
linear constraints. With P
j
being the set of contact points on the j-th body
and O the set of bodies in the assembly, the contact forces can be determined
by solving
min
f
i
X
i∈P
f
i
2
(4.144)
s.t.
X
i∈P
j
w
W
i,j
+
w
W
b
j
= 0 j O (4.145)
f
n
i
0 i P (4.146)
C
i
f
i
0
N×1
i P (4.147)
The optimization problem defined above is a quadratic program with linear
constraints that can be solved very quickly with standard solvers. The problem
can be cast into the following standard form
min
x
1
2
x
T
Px + q
T
x (4.148)
s.t. l Ax u (4.149)
80 CHAPTER 4. RIGID BODY DYNAMICS
(a) (b)
µ f
n
θ/2
µf
n
cos(θ/2)
f
u
f
v
θ
θ
f
u
cos θ f
v
sin θ
Figure 4.5: (a) Four-sided and eight-sided pyramidal approximations of the
Coulomb friction cone. A greater number of sides will result in a better ap-
proximation of the cone. (b) A cut of the friction cone perpendicular to the
normal axis with an inscribed octagon. Here θ = 2π/N is the angle between
two consecutive sides of the polygon.
by defining
x =
f
u
1
f
v
1
f
n
1
f
u
2
f
v
2
f
n
2
···
T
R
3|P|
(4.150)
P = 1
3|P3|P|
(4.151)
q = 0
3|P1
(4.152)
as the objective, and
l =
w
W
T
b
1
w
W
T
b
j
···
w
W
T
b
|O|
−∞
N|P|
−∞
|P|
T
(4.153)
u =
w
W
T
b
1
w
W
T
b
j
···
w
W
T
b
|O|
0
N|P|
0
|P|
T
(4.154)
4.9. KEY CONCEPTS 81
as the lower and upper bounds, and
A =
B
11
B
21
··· B
|P|1
B
12
B
22
··· B
|P|2
···
.
.
. ···
.
.
.
B
1|O|
B
2|O|
··· B
|P||O|
C
1
0
N×3
··· 0
N×3
0
N×3
C
2
0
N×3
···
···
.
.
. ···
.
.
.
0
N×3
0
N×3
0
N×3
C
|P|
0 0 1
0
1×3
··· 0
1×3
0
1×3
0 0 1
0
1×3
···
···
.
.
. ···
.
.
.
0
1×3
0
1×3
···
0 0 1
(4.155)
where
B
ij
=
"
w
R
i,j
[
w
p
i
]
×
w
R
i,j
#
if i P
j
0
6×3
otherwise.
(4.156)
In (4.156), the local contact frames at the i-th contact point, located on an
interface between object a and b, are defined such that
w
R
i,a
=
w
R
i,b
,
resulting in
w
R
i,b
being a left-handed coordinate system. By doing so, the size
of x is reduced by half, and the action-reaction principle is enforced without
the need to introduce additional constraints.
4.8.4 Multi-Object Interactions
This is a placeholder for the upcoming section on multi-object interactions.
4.9 Key Concepts
An inertial frame of reference is a frame that does not accelerate. In an
inertial frame, Newton’s laws of motion apply without modification.
Any rotating frame of reference accelerates due to the change of velocity
direction.
82 CHAPTER 4. RIGID BODY DYNAMICS
The moment of some physical quantity is defined as the cross product of
a position vector and the physical quantity.
Important moments include: moment of force, moment of momentum,
and moment of mass.
In the equations of motion, the zero-th, first, and second moments of a
mass distribution appear.
The zero-th moment is the total mass, the first moment is the centre of
mass, and the second moment is the inertia tensor. These moments can
be bundled into a spatial inertia matrix.
While the total mass is guaranteed to be positive, the centre of mass is
always located inside the convex hull of the mass distribution, and the
inertia tensor is always positive-definite.
An eigendecomposition of the inertia tensor can be used to determine
the principal axes of inertia, which are the axes along which the inertia
tensor is diagonal.
The momentum of a rigid body is the product of its mass and its velocity,
it is a conserved quantity, and it is additive.
For a rotating body, the angular momentum (or moment of momentum)
is also a characteristic of interest.
The kinetic energy of a rigid body is given by the integral over the
momentum of all particles in the body. Kinetic energy therefore inherits
the properties of momentum (i.e., conservation and additivity).
The equations of motion for a rotating rigid body relate the forces and
torques acting on the body to its kinematics.
Deriving the equations of motion involves differentiating the linear and
angular momentum of the body with respect to time.
Chapter 5
Manipulator’s Dynamics
5.1 Lagrangian Mechanics
5.1.1 Coordinates, Configurations, and Constraints
The minimal set of coordinates q = [q
1
, . . . , q
n
]
T
that can be used to fully de-
scribe the position of all particles in a system is called the generalized coordi-
nates. The number of generalized coordinates should be equal to the number
of degrees of freedom minus the number of constraints. The motion of the
system can be described as a trajectory within the space of generalized coor-
dinates called the configuration space. A configuration is a specific point in
the configuration space that can be described using the system’s generalized
coordinates.
A holonomic constraint reduces the number of coordinates necessary to
fully describe the system’s position and can be written as
f (q
1
, . . . , q
n
, t) = 0, (5.1)
where all terms inside the parentheses are independant from each other. In
Cartesian space, constraining a particle to stay on the surface of a sphere is
an instance of a holonomic constraint, since, instead of three Cartesian coor-
dinates, only two (e.g., azimuth and polar angles) are required to describe the
particle’s position. If, instead of describing the particle’s position with Carte-
sian coordinates, azimuth and polar angles were used (with a given radius),
the holonomic constraint would be implicitly enforced. Conversely, a non-
holonomic constraint restrict possible system configurations without reducing
the number of coordinates necessary to describe it. In Cartesian space, con-
straining a particle to stay inside a given box is an instance of a nonholonomic
83
84 CHAPTER 5. MANIPULATOR’S DYNAMICS
constraint, as it is impossible to describe all positions within the box using less
than three coordinates. When the state of a system not only depends on its
generalized coordinates but also on the trajectory taken or on derivatives of
the generalized coordinates, it means that the system is under nonholonomic
constraints.
5.1.2 Jacobians
A Jacobian matrix is a matrix of partial derivatives
J
s
(q) =
h
r
q
1
r
q
2
···
r
q
n
i
, (5.2)
in which each column is a basis vector that relates how a small change in a
generalized coordinate q
i
will produce a change in r. For a robot with m joints,
the Jacobian relating the velocity of the joints to the spatial velocity of the
end-effector is a 6 × m matrix. The matrix
J
s
(q) =
h
r
q
1
r
q
2
···
r
q
n
i
(5.3)
=
r
x
q
1
r
x
q
2
. . .
r
x
q
n
r
y
q
1
r
y
q
2
. . .
r
y
q
n
r
z
q
1
r
z
q
2
. . .
r
z
q
n
r
α
q
1
r
α
q
2
. . .
r
α
q
n
r
β
q
1
r
β
q
2
. . .
r
β
q
n
r
γ
q
1
r
γ
q
2
. . .
r
γ
q
n
(5.4)
is called the space Jacobian of the system and maps motions in the configura-
tion space to motions in the task space via
dr
x
dt
dr
y
dt
dr
z
dt
dr
α
dt
dr
β
dt
dr
γ
dt
=
r
x
q
1
r
x
q
2
. . .
r
x
q
n
r
y
q
1
r
y
q
2
. . .
r
y
q
n
r
z
q
1
r
z
q
2
. . .
r
z
q
n
r
α
q
1
r
α
q
2
. . .
r
α
q
n
r
β
q
1
r
β
q
2
. . .
r
β
q
n
r
γ
q
1
r
γ
q
2
. . .
r
γ
q
n
dq
1
dt
dq
2
dt
dq
3
dt
dq
4
dt
dq
5
dt
dq
6
dt
(5.5)
˙
r = J
s
(q)
˙
q. (5.6)
The above matrix is often called space Jacobian because it expresses task space
velocity in the space/inertial frame. An alternative Jacobian, termed body
5.1. LAGRANGIAN MECHANICS 85
Jacobian J
b
(q), can be defined such that the task space velocity is expressed
in the body/moving frame. The relation between the two follows from (3.16)
as
J
b
(q) = Ad (
b
T
w
) J
s
(q), (5.7)
which uses the adjoint representation defined in (2.101).
For manipulators, the i-th column J
s
(q)
i
of the space Jacobian represents
the screw vector describing the i-th joint axis in the world frame as a function
of the configuration of the robot. Hence, we have that
J
s
(q)
i
= Ad (
w
T
i1
(q)) S
i
, (5.8)
where
w
T
i1
(q) is a function of the joint angles and S
i
is the screw definition
of the i-th joint as in (2.110) or (2.111). As a reminder, the definition of the
unit-screw for a given joint is
S
i
=
"
ω × q
ω
#
if revolute
"
v
0
#
if prismatic
, (5.9)
where ω and v are angular and linear axes, respectively, and q is a point
anywhere on the screw axis.
Making use of the space Jacobian, the equations
w
ν
b
= J
s
(q)
˙
q (5.10)
w
λ
b
=
˙
J
s
(q)
˙
q + J
s
(q)
¨
q (5.11)
Q = J
s
(q)
T
W (5.12)
W = J
s
(q)
T
Q (5.13)
map joint-space quantities to task-space quantities and are widely used in
robotics. For instance, (5.10) can be used to compute what the end-effector
velocity of a manipulator will be for given joint-space velocities (a manip-
ulator’s joints are the generalized coordinates). However, note that (5.10)
produces a six-dimensional twist, which needs to be transformed into a lin-
ear and angular velocity bundle before being used in 3D dynamics equations
(4.103) and (4.104). Such transformation can be built from (3.13) and (3.34)
as
w
v
b
w
ω
b
=
1
3×3
[
w
p
o
]
×
0
3×3
1
3×3
w
ν
b
(5.14)
w
a
b
w
α
b
=
1
3×3
[
w
p
o
]
×
0
3×3
1
3×3
w
λ
b
, (5.15)
86 CHAPTER 5. MANIPULATOR’S DYNAMICS
where
w
p
o
is the point for which the kinematics is to be computed (e.g., the
origin of the end-effector frame).
Note that if the Jacobian is not square and full rank, as with underactuated
or over-actuated robots, it cannot be simply inverted as in (5.13). A matrix is
full-rank when its rank is equal to its number of rows or columns, whichever
is the smallest. The left pseudo-inverse of the Jacobian, defined as
J
s
(q)
+
= J
s
(q)
T
J
s
(q)J
s
(q)
T
1
(5.16)
J
s
(q)
+
J
s
(q) = 1, (5.17)
can be used instead, and produces the solution minimizing ||˙q||
2
.
For under-actuated robots, the mapping from joint velocities to end-effector
velocity will not cover the six elements of the spatial velocity, and the Jacobian
will be taller than it is wide. This is captured by the null-space of the Jacobian
given by
Null (J
s
(q)) = {
˙
q | J
s
(q)
˙
q = 0}, (5.18)
spanning the joint velocities that do not result in any motion of the end-
effector. With an over-actuated robot, the rank of Null (J
s
(q)) can be greater
than zero, which means that even if the end-effector is kept fixed, parts of the
robot can move. In contrast, with an under-actuated robot, rank(J
s
(q)) < 6
such that velocity cannot be produced in some directions. The right pseudo-
inverse of the Jacobian, defined as
J
s
(q)
+
=
J
s
(q)
T
J
s
(q)
1
J
s
(q)
T
(5.19)
J
s
(q)J
s
(q)
+
= 1, (5.20)
can be used to find the solution minimizing the L2-norm of the error between
the desired end-effector velocity and the actual end-effector velocity. The in-
ability to generate velocity in some directions can be turned into an advantage
as the robot will be able to resist infinite force in those directions. For in-
stance, the vertical force exerted on a SCARA robot will be sustained by the
(presumably infinitely strong) structure of the robot and not by the (much
weaker) joints. SCARA robots are therefore useful to lift heavy objects and
move them in the plane.
Importantly, when J
s
(q) is rank-deficient and det (J
s
(q)) = 0, it effectively
maps generalized velocities to a lower dimensional space in which some task-
space velocities cannot be represented. This happens when the generalized
coordinates are in a singular configuration resulting in the robot being unable
to make any further motion in some directions. Typically, a singularity is
reached when the axes of two joints become collinear, or when the axes of
5.1. LAGRANGIAN MECHANICS 87
three joints are parallel. In that situation, (5.19) can be used to make a
motion approximately following the desired motion, hoping to move away from
the singular configuration.
Close to a singularity, the joint velocities required to make any further
motion can be unrealisable by the robot hardware, and it might be a good
idea to prevent such configurations from being reached in the first place. To
avoid reaching a singular configuration, the manipulability of the end-effector
can be monitored through manipulability indices like Yoshikawa’s
q
det
J
b
(q)J
b
(q)
T
, (5.21)
which is proportional to the volume of the velocity ellipsoid. When the robot
comes close to a singular configuration, the manipulability index approaches
zero, indicating that the robot is unable to move in some directions. At this
point, the robot can try to move in a direction that would increase the ma-
nipulability index.
5.1.3 Hessian
In (5.11), the time-derivative of the Jacobian is used to map joint-space ac-
celerations to task-space accelerations. The Hessian tensor H
s
(q) =
˙
J
s
(q) is
a three dimensional tensor of size (N × N × N ) where N is the number of
generalized coordinates (e.g., the number of joints in a robot). Each slice of
the Hessian describes
J
s
(q)
q
i
, the Jacobian changes for an infinitesimal change
in a given generalized coordinate. Hence, the Hessian is defined as
H
s
(q) =
˙
J
s
(q) =
h
J
s
(q)
q
1
,
J
s
(q)
q
2
, ··· ,
J
s
(q)
q
n
i
. (5.22)
If H
s
(q)
a,b,c
denotes the element of the Hessian in the a-th slice, b-th row,
and c-th column, then H
s
(q)
i,1:6,j
is the j-th column of the i-th slice of the
Hessian. For serial manipulators, the Hessian is symmetric, and can be built
from the Jacobian with
H
s
(q)
i,1:6,j
= H
s
(q)
j,1:6,i
=
""
J
s
(q)
3:6,j
×
J
s
(q)
1:3,i
J
s
(q)
3:6,j
×
J
s
(q)
3:6,i
#
j {i, . . . , N}
#
i {1, . . . , N},
(5.23)
where J
s
(q)
a:b,i
denotes the vector built from the a-th to b-th rows inclusively
of the i-th column of the Jacobian.
88 CHAPTER 5. MANIPULATOR’S DYNAMICS
5.1.4 Virtual Displacement and Virtual Work
An infinitesimal deviation from a system’s trajectory while still respecting all
constraints is called a virtual displacement δr (the keyword virtual empha-
sizes the fact that the displacement is hypothetical) and is given by the total
differential
δr =
X
i
r
q
i
δq
i
(5.24)
=
h
r
q
1
r
q
2
···
r
q
n
i
δq
1
, δq
2
, ··· , δq
n
T
(5.25)
= J
s
(q)δq, (5.26)
where J
s
(q) =
h
r
q
1
r
q
2
···
r
q
n
i
is the space Jacobian of the system,
which maps motions in the configuration space to motions in the task space.
Starting from
δr = J
s
(q)δq (5.27)
and differentiating with respect to time, we get
dr
dt
= J
s
(q)
dq
dt
(5.28)
=
h
r
q
1
r
q
2
···
r
q
n
i
˙q
1
, ˙q
2
, ··· , ˙q
n
T
(5.29)
w
˙
p
b
= J
s
(q)
˙
q (5.30)
since J
s
(q) is constant for a given configuration.
As outline in (4.60), work is produced by applying a force along a distance.
The virtual work δW produced by applying a force along a virtual displacement
is therefore defined as
δW = f · δr (5.31)
= f ·
X
i
r
q
i
δq
i
(5.32)
=
X
i
f ·
r
q
i
δq
i
(5.33)
=
X
i
r
q
i
T
f
| {z }
Q
i
δq
i
(5.34)
= Q
T
δq (5.35)
= Q · δq, (5.36)
5.1. LAGRANGIAN MECHANICS 89
where the distributivity of the dot product, and where a ·b = a
T
b = b
T
a were
used. From the above equations, we can say that the generalized forces Q
produce work when performed over the distance δq. Combining (5.24) with
(5.31) and leveraging the fact that work is a scalar (which is equal to its own
transpose), we can state
δW = Q
T
δq = f · δr (5.37)
= f · (J
s
(q)δq) (5.38)
= f
T
J
s
(q)δq (5.39)
Q
T
= f
T
J
s
(q) (5.40)
Q = J
s
(q)
T
f (5.41)
where the transpose of the Jacobian J
s
(q) is used to map from task-space
forces f to configuration space forces Q.
5.1.5 D’Alembert Principle
For a particle to perform zero virtual work along some virtual displacement,
the equation
f · δr = 0 (5.42)
must hold. If the virtual displacement itself cannot be zero, then f must be.
With
w
f
b
being the sum of all external forces acting on the particle, we have
from Newton’s second law that
w
f
b
= m
w
a
c
(5.43)
w
f
b
m
w
a
c
= 0, (5.44)
which provide us with an expression where the total force (including the inertial
force that is due to the motion of the point mass) acting on the particle, in an
inertial frame, is zero. We can therefore rewrite (5.42) as
(
w
f
b
m
w
a
b
) · δr = 0 (5.45)
since F
b
= F
c
for a point mass. Equation (5.46) is called D’Alembert Principle
that can be stated more generally as
X
f
dE
dt
· δr = 0 (5.46)
w
f
b
· δr =
d
w
E
b
dt
· δr (5.47)
expressing that the sum of all external forces along the virtual displacement
must be equal to the time derivative of the total momentum along the virtual
displacement.
90 CHAPTER 5. MANIPULATOR’S DYNAMICS
5.1.6 Lagrange’s Equation Of Motion
Starting from the D’Alembert Principle, we get
(
w
f
b
m
w
a
b
) · δr = 0 (5.48)
w
f
b
· δr = m
w
a
b
· δr (5.49)
= m
d
w
v
b
dt
· δr (5.50)
= m
d
w
v
b
dt
·
X
i
r
q
i
δq
i
!
(5.51)
=
X
i
m
d
w
v
b
dt
·
r
q
i
δq
i
(5.52)
by using the distributivity of the dot product. Furthermore, we note that since
the Jacobian J
s
(q) appears in both (5.24) and (5.30),
w
v
b
˙
q
i
=
r
q
i
, (5.53)
and since, from (5.1), the generalized coordinates are considered independent
of time,
d
dt
r
q
i
=
d
dt
r
q
i
=
w
v
b
q
i
, (5.54)
provides us with an expression for the time-derivative of the partial differential
of the displacement with respect to a generalized coordinate. Using the identity
d
dt
(a · b) = a ·
d
dt
(b) + b ·
d
dt
(a) (5.55)
we get
d
dt
m
w
v
b
·
r
q
i
= m
w
v
b
·
d
dt
r
q
i
+
r
q
i
·
d
dt
(m
w
v
b
) (5.56)
or equivalently
m
d
w
v
b
dt
·
r
q
i
=
d
dt
m
w
v
b
·
r
q
i
m
w
v
b
·
d
dt
r
q
i
(5.57)
=
d
dt
m
w
v
b
·
w
v
b
˙
q
i
m
w
v
b
·
w
v
b
q
i
, (5.58)
5.1. LAGRANGIAN MECHANICS 91
where (5.53) and (5.54) were used. Using the identity
a
(b · b) = b ·
b
a
+ b ·
b
a
= 2b ·
b
a
, (5.59)
the equation in (5.58) can be simplified into
m
d
w
v
b
dt
·
r
q
i
=
d
dt
m
w
v
b
·
w
v
b
˙
q
i
m
w
v
b
·
w
v
b
q
i
(5.60)
=
d
dt
˙
q
i
1
2
m
w
v
b
·
w
v
b
| {z }
w
K
b
q
i
1
2
m
w
v
b
·
w
v
b
| {z }
w
K
b
(5.61)
=
d
dt
˙
q
i
(
w
K
b
)
q
i
(
w
K
b
) , (5.62)
in which the kinetic energy defined in (4.46) can be identified. Rewriting (5.52)
using (5.62) yields
f · δr =
X
i
m
d
w
v
b
dt
·
r
q
i
δq
i
(5.63)
=
X
i
d
dt
˙
q
i
(
w
K
b
)
q
i
(
w
K
b
) δq
i
, (5.64)
where the total force acting on the point mass can be written as
f · δr = Q · δq (5.65)
=
X
i
Q
i
δq
i
(5.66)
to obtain
X
i
Q
i
δq
i
=
X
i
d
dt
˙
q
i
(
w
K
b
)
q
i
(
w
K
b
) δq
i
(5.67)
or equivalently
Q
i
=
d
dt
˙
q
i
(
w
K
b
)
q
i
(
w
K
b
) , (5.68)
which express an element of the generalized force vector as a function of the
kinetic energy. In the case where a potential field (e.g., gravity) also acts on
92 CHAPTER 5. MANIPULATOR’S DYNAMICS
the point mass (pretty much always the case), the total energy of the system
can be described by the Lagrangian function
L = K U, (5.69)
where U is the potential energy. In such a case, Lagrange’s equation of motion
becomes
Q
i
=
d
dt
L
˙
q
i
L
q
i
, (5.70)
which can be further simplified if the potential field is velocity independent
(like gravity is) into
Q
i
=
d
dt
K
˙
q
i
L
q
i
(5.71)
that is more convenient to use for robotics applications.
5.1.7 Serial Robot Joint-Space Dynamics in Matrix Form
For open chain robots with rigid links (i.e., serial robots), the equation of
motion in (5.71) can be conveniently written as
Q = M(q)
¨
q + C(q,
˙
q)
˙
q + g(q), (5.72)
where M(q) is the mass matrix, C(q,
˙
q) is the Coriolis matrix, and g(q) is
the gravity vector. In general, the mass matrix can be very tedious to derive
as it depends on the kinematics, dynamics and generalized coordinates of the
system. Fortunately, for a n degrees of freedom serial robot, the mass matrix
can be obtained with
M(q) =
n
X
i=1
i
w
J
i
c
(q)
T
i
i
c
I
i
i
w
J
i
c
(q)
, (5.73)
where
w
i
c
I
i
is the spatial inertia of the i-th link computed relative to its centre
of mass F
i
c
and expressed in the robot base frame F
w
. The Jacobian matrix
w
i
c
J
i
(q) is such that
i
w
ν
i
c
=
i
w
J
i
c
(q)
˙
q, (5.74)
and since the kinetic energy of a rigid link i is
w
K
i
=
1
2
i
w
ν
T
i
c
i
c
I
i
i
w
ν
i
c
, (5.75)
5.1. LAGRANGIAN MECHANICS 93
the total kinetic energy of the robot becomes
w
K =
n
X
i=1
1
2
i
w
ν
T
i
c
i
c
I
i
i
w
ν
i
c
(5.76)
=
n
X
i=1
1
2
i
w
J
i
c
(q)
˙
q
T
i
c
I
i
i
w
J
i
c
(q)
˙
q (5.77)
=
n
X
i=1
1
2
˙
q
T i
w
J
i
c
(q)
T
i
c
I
i
i
w
J
i
c
(q)
˙
q (5.78)
=
1
2
˙
q
T
M(q)
˙
q, (5.79)
where (5.73) was used.
The Coriolis matrix C(q,
˙
q) is a n × n matrix where the (i, j)-th element
is given by
C(q,
˙
q)
i,j
=
n
X
k=1
Γ
i,j,k
(q)
˙
q
k
(5.80)
with
Γ
i,j,k
(q) =
1
2
M(q)
i,j
q
k
+
M(q)
i,k
q
j
M(q)
j,k
q
i
, (5.81)
the n × n × n matrix of Christoffel symbols.
The gravity vector g(q) is a n × 1 vector that contains the components of
the generalized forces due to gravity with
g(q) =
U
q
(5.82)
g(q)
i
=
U
q
i
(5.83)
=
n
X
j=1
m
j
g
h
j
(q)
q
i
, (5.84)
where h
j
(q) is the height above the base of the robot of the j-th link centre of
mass, and g is the gravity constant. Determining the gravity vector requires
defining every h
j
(q) as a function of the joint coordinates, and then comput-
ing
h
j
(q)
q
i
for i = 1, ..., n. The gravity vector expresses the torques that are
required to hold the robot immobile in a given configuration.
94 CHAPTER 5. MANIPULATOR’S DYNAMICS
5.1.8 An Outlook on Lagrangian and Newtonian Me-
chanics
Comparing Lagrangian and Newtonian mechanics, a few noteworthy caracter-
istics can be pointed out to help a practitioner choose which framework is the
most adequate for the analysis of a given problem.
Lagrangian mechanics is advantageous as it implicitly respects motion con-
straints through the choice of generalized coordinates. With the Lagrangian
formulation, no need to explicitly enforce constraints as an additional step
(which needs to be done when using Newtonian mechanics). Furthermore, the
Lagrange equation is very short and self-contained, making some derivation
simpler than their Newtonian counterpart. Obviously, the dynamics described
by the equations is the same.
In many scenarios, the choice of generalized coordinates is far from ob-
vious, making the use of the Lagrangian formulation more difficult. Also,
the Lagrange-Euler equation requires to perform differentiation, which is not
required with the Newtonian formulation. Most importantly, and this is prob-
ably why Newtonian mechanics is predominantly used in robotics, performing
inverse dynamics on a regular 6-DoF manipulator with the Lagrangian formu-
lation is about 100 times more computationally expensive. Direct dynamics is
also more efficiently performed when using the Newtonian framework.
5.2 Inverse Dynamics for Control
Controlling a serial manipulator consists in applying torques at its joints such
that the robot reaches a specific configuration where each link is in a desired
pose. The Recursive Newton-Euler Algorithm (RNEA) computes the kine-
matics and dynamics of serial chains of rigid bodies connected with revolute
or prismatic joints in an iterative manner. The RNEA can be run for each
timestep of a robot position trajectory to get the sequence of torques that
needs to be applied by the motors to follow the trajectory. The algorithm
consists in two main steps: (1) computing the kinematics of the links starting
from the fixed base and following the chain up to the tip, and (2) computing
the forces and torques that each link is subject to, starting from the tip and
following the chain down to the fixed base. Each step is repeated i times for a
manipulator with i links but step (1) needs to be done for all links before step
(2) can be started for any link. The i-th link is assumed to be actuated by a
joint whose general coordinate is q
i
(it can be any type of joint but we will
restrict ourselves to revolute and prismatic joints) the RNEA also assumes
that
˙
q
i
and
¨
q
i
are known for each link.
5.2. INVERSE DYNAMICS FOR CONTROL 95
F
w
F
b
i
F
c
i
F
b
i+1
Figure 5.1: Reference frame F
b
i
is fixed on the i-th link with its origin located
on the actuation axis, which defines the Z direction. The point highlighted
with is the centre of mass of the i-th link whose frame F
c
i
is aligned with
F
b
i
. The frame F
w
is the inertial frame to which the base of the robot is
assumed to be rigidly attached. The i-th joint is actuated by q
i
,
˙
q
i
, and
¨
q
i
.
5.2.1 Kinematics Iterations
The kinematics of the base link (or 0-th link) is known, by definition, as the
base is assumed to be rigidly attached to an inertial frame F
w
. Consequently,
the iterative algorithm starts by computing the kinematics of the first link
based on the known kinematics of the base and the torque applied to the first
joint. The kinematics of the second link can then be computed from the one
of the first and the kinematics of the (i + 1)-th link can be computed from the
one of the i-th link. Specifically, the kinematics of each link’s centre of mass
F
c
i
is needed as it is used in the Newton-Euler equations (4.103) and (4.104),
which are used for the dynamics iterations.
The velocity of the 0-th link is assumed to be zero but could be set to some
other values if the robot was on a mobile base. The acceleration of the base
(or 0-th link) can be set to the opposite of the gravity acceleration to allow
the robot to compensate for the force of gravity, which is usually the desired
behaviour.
Table 5.1: Values of some kinematic variables depending on the type of joint
and assuming that the actuation axis is in the same direction as the Z axis of
F
b
i
.
b
i
b
i1
v
b
i
b
i
b
i1
ω
b
i
b
i
b
i1
a
b
i
b
i
b
i1
α
b
i
Revolute Joint 0
0 0
˙
q
i
T
0
0 0
¨
q
i
T
Prismatic Joint
0 0
˙
q
i
T
0
0 0
¨
q
i
T
0
The angular velocity of the link attached to a revolute joint computed
96 CHAPTER 5. MANIPULATOR’S DYNAMICS
relatively to the previous link will be non-zero while the linear velocity will be
zero. For a prismatic joint, its the opposite, as outlined in Table 5.1.
Using values from Table 5.1 depending on the type of joint, the kinematics
of the (i + 1)-th is given from the one of the i-th link by
c
i+1
w
ω
c
i+1
=
b
i+1
w
ω
b
i+1
=
b
i+1
R
b
i
b
i
w
ω
b
i
+
b
i+1
b
i
ω
b
i+1
| {z }
0 if Prismatic
(5.85)
b
i+1
w
v
b
i+1
=
b
i+1
R
b
i
b
i
w
v
b
i
+
b
i
w
ω
b
i
×
b
i
p
b
i+1
+
b
i+1
b
i
v
b
i+1
| {z }
0 if Revolute
(5.86)
c
i+1
w
v
c
i+1
=
b
i+1
w
v
b
i+1
+
c
i+1
w
ω
c
i+1
×
b
i+1
p
c
i+1
(5.87)
b
i+1
w
α
b
i+1
=
b
i+1
R
b
i
b
i
w
α
b
i
+
b
i
w
ω
b
i
×
b
i
R
b
i+1
b
i+1
b
i
ω
b
i+1
+
b
i+1
b
i
α
b
i+1
| {z }
0 if Prismatic
(5.88)
b
i+1
w
¨
p
b
i+1
=
b
i+1
R
b
i
b
i
w
¨
p
b
i
+
b
i
w
ω
b
i
×
b
i
w
ω
b
i
×
b
i
p
b
i+1

(5.89)
+
b
i+1
R
b
i
b
i
w
α
b
i
×
b
i
R
b
i+1
b
i+1
b
i
p
b
i+1
+
b
i+1
b
i
a
b
i+1
| {z }
0 if Revolute
c
i+1
w
¨
p
c
i+1
=
b
i+1
w
¨
p
b
i+1
+ 2
b
i+1
w
ω
b
i+1
×
b
i+1
b
i
v
b
i+1
(5.90)
+
b
i+1
w
ω
b
i+1
×
b
i+1
w
ω
b
i+1
×
b
i+1
b
i
p
c
i+1
+
b
i+1
R
b
i
b
i
w
α
b
i
+
b
i+1
b
i
α
b
i+1
×
b
i+1
p
c
i+1
which is derived from (3.30), (3.3), (3.20), and (3.4).
5.2.2 Dynamics Iterations
After having performed the kinematic analysis, the velocities and accelerations
of each link can be used to compute the forces and/or torques Q that need to
be applied in order to fight inertia and set the robot in motion. Since the robot
is assumed to be a serial chain of links, each link has exactly two neighboring
links except from the last link that has only a single one. The reaction force
on the last link depending only on its own inertia (and possibly the payload’s),
the process is performed iteratively starting from the link farthest from the
base.
With each iteration, the actuation force of the i-th joint is computed from
(4.115) and (4.116) based on the actuation force of the (i + 1)-th joint as
5.3. DIRECT DYNAMICS FOR SIMULATION 97
Table 5.2: Values of some dynamics variables depending on the type of joint
and assuming that the actuation axis is in the same direction as the Z axis of
F
b
i
.
c
i
c
i1
f
c
i
c
i
c
i1
τ
c
i
Revolute Joint 0
0 0 Q
i
T
Prismatic Joint
0 0 Q
i
T
0
follows:
c
i
c
i1
f
c
i
=
c
i
w
f
c
i
+
c
i
c
i
f
c
i+1
(5.91)
= m
i
c
i
w
¨
p
c
i
+
c
i
R
c
i+1
c
i+1
c
i
f
c
i+1
(5.92)
c
i
c
i1
τ
c
i
=
c
i
b
i
p
c
i
×
c
i
w
f
c
i
+
b
i
p
b
i+1
×
c
i
f
c
i+1
+
c
i
τ
c
i+1
+
c
i
w
τ
c
i
(5.93)
=
c
i
b
i
p
c
i
×
m
i
c
i
w
¨
p
c
i
+
b
i
p
b
i+1
×
c
i
R
c
i+1
c
i+1
c
i
f
c
i+1
+
c
i
τ
c
i+1
(5.94)
+
c
i
I
b
i
c
i
w
α
c
i
+
c
i
w
ω
c
i
×
c
i
I
b
i
c
i
w
ω
c
i
(5.95)
where m
i
is the mass of the i-th link and
c
i
I
b
i
is the inertia tensor of the i-th
link computed relative to its centre of mass and expressed in F
c
i
such that it
is independent of the configuration of the robot.
Friction in the joints can be taken into account with
Q
i
+ µ
s
sign(
˙
q
i
) + µ
v
˙
q
i
(5.96)
where µ
s
is the Coulomb static friction coefficient and µ
v
is the viscuous fric-
tion coefficient of the joint.
5.3 Direct Dynamics for Simulation
The direct dynamics problem is the one of finding the motion that would result
from applying a sequence of driving forces at the robot’s joints. In other words,
from the equation of motion in (5.72), the goal is to solve
M(q)
¨
q = Q (C(q,
˙
q)
˙
q + g(q)) (5.97)
for
¨
q when
˙
q and q are known. It is assumed that the initial configuration
and velocity are known. The mass matrix M(q) can be computed from (5.73)
and the generalized forces due to the term C(q,
˙
q)
˙
q + g(q) can be obtained
by computing the inverse dynamics with
¨
q = 0. Gaussian elimination, or
98 CHAPTER 5. MANIPULATOR’S DYNAMICS
any other method, can then be used to solve the systems of equations for the
acceleration vector
¨
q. A numerical integration scheme (e.g., Euler integration,
Runge-Kutta) can finally be used to obtain values for
˙
q and q at the next
timestep from the acceleration
¨
q. The newly computed
˙
q and q are used as
the initial condition for the subsequent iteration and this process is repeated
for every timestep of the trajectory.
5.4 Calibration and Identification
In Sec. 5.2 and Sec. 5.3, we showed how modeling a robot manipulator as a
series of actuated rigid links allows us to relate forces and torques applied at
the actuators to the motion of the links. This ubiquitous approach to robot
control is relatively simple, computationally efficient, and can be accurate in
practice. Nonetheless, when working with real robots (in contrast to com-
puter simulations), differences between our rigid body model and the actual
robot will inevitably arise. These modeling errors can be due to incorrect
model assumptions (e.g., assuming rigid links when the robot will slightly
bend) and incorrect model parameters (e.g., in the relative poses of the links).
While modeling assumptions will determine the equations describing the robot
model, coefficients appearing in the equations are called model parameters and
typically have to be identified through a calibration procedure.
As illustrated in Fig. 5.2, the calibration procedure is based on the idea
of forming a loop in the kinematic structure of the robot. Sometimes, closing
the loop requires taking a measurement with a sensor (e.g., a camera). For
instance, in Fig. 5.2, section #4 of the kinematic loop denoted by arrows repre-
sents an observation made with the camera mounted on the end-effector of the
robot. Without this observation, calibration would not be possible in Fig. 5.2
as the kinematic chain would be open. When the robot end-effector is moving
throughout the calibration procedure and a sensor is used to observe its pose
(like in Fig. 5.2), the calibration is called open-loop. In contrast, some calibra-
tion methods keep the end-effector fixed in a specific pose while the robot is
moved to different configurations, which is called closed-loop calibration. Since
closed-loop calibration does not require the use of a sensor (whose observations
are always noisy), it can result in a simpler setup and identity parameters more
accurately. However, closed-loop calibration can only be achieved with certain
types of robots, such as serial manipulators with more than 6 degrees of free-
dom, which allow links of the robot to move while the end-effector is fixed in
space. In contrast, open-loop calibration can be performed with any type of
robot, provided that a sensor is available to observe the end-effector pose.
Identifying all the parameters of a robot model is usually too laborious
5.4. CALIBRATION AND IDENTIFICATION 99
Base
End-effector
Camera
{w}
2
1
3
4
Figure 5.2: Serial manipulator equipped with a camera at its end-effector. The
robot model is split into four sections, each represented by an arrow. Forming
a loop in the kinematic structure enables the calibration procedure to identify
some parameters of the model.
due to the (typically) large number of parameters and the complexity of the
complete model. Instead, most calibration procedures assume that some pa-
rameters are known and focus on identifying a subset of parameters. While this
approach simplifies each step of the overall calibration procedure, it might also
require to iterate over the procedure several times (each time using the newest
set of parameters) to obtain a sufficiently accurate model due to the interde-
pendence of the parameters. For instance, calibrating the robot in Fig. 5.2
might require iterating between calibration section #2 (the robot arm) and
section #1 and #3 (respectively the pose of the base and the pose of the cam-
era relative to the end-effector). While calibrating #2 is usually called robot
kinematic calibration, determining #3 is termed hand-eye calibration (referring
to the camera as the eye and the gripper as the hand ). Sometimes, #1 and
#3 are jointly identified in a procedure called hand-eye-robot-world (HERW)
calibration.
In the following, we will first present a method for identifying the kine-
matic parameters of a serial manipulator, which requires finding a solution to
a non-linear optimization problem. Then, we will present a hand-eye-robot-
world calibration procedure that involves solving a linear system of equations.
Finally, we will go one step further and introduce inertial parameters identi-
fication, which is the process of determining some of the dynamic parameters
of the robot model.
100 CHAPTER 5. MANIPULATOR’S DYNAMICS
5.4.1 Robot Arm Kinematic Calibration
Calibrating a manipulator is crucial to ensure that the robot follows prescribed
trajectories as accurately as possible. In turn, following trajectories accurately
is essential to avoid colliding with objects in the environment and to grasp or
place objects where they are intended to be. Due to the length of its links,
small differences between the robot model and the actual robot can result
in large end-effector positioning errors. These differences can be due to small
manufacturing defects or assembly errors, and are inevitable in practice. While
some robot manufacturers will perform calibration before shipping the robot,
all robot users should be on the lookout for inaccuracies in the robot model
and perform calibration if necessary.
A Primer on Iterative Least Squares Optimization
A manipulator’s forward kinematics is usually described as a non-linear func-
tion of the joint coordinates q and robot model parameters ϕ. For instance,
in Sec. 2.7.1, the forward kinematics of a serial manipulator is given by the
product of exponentials
w
T
ee
(θ) = e
[S
1
]
×
θ
1
e
[S
2
]
×
θ
2
. . . e
[S
n
]
×
θ
n
M, (5.98)
in which S
i
is the screw axis of the i-th joint, θ
i
is the joint coordinate of the
i-th joint, and M is the pose of the end-effector when all joint coordinates are
zero. In the product of exponentials, the parameters of the robot model define
screw axes and the end-effector zero configuration pose. Clearly, the pose of
the end-effector
w
T
ee
does not vary linearly with respect to the parameters.
Dealing with non-linear models is typically much more difficult than dealing
with linear models, which can usually be solved with linear algebra. A common
approach to identifying the parameters of a non-linear model relies on solving
a sequence of small linear sub-problems, hoping to converge to the solution
of the overarching non-linear problem. Assuming that we have a non-linear
function f(ϕ) representing a non-linear model parametrized by ϕ, the Taylor
series expansion of the model yields
y = f(ϕ + ϕ) (5.99)
= f(ϕ) +
f
ϕ
ϕ + . . . , (5.100)
where the ellipsis indicates higher order terms and where y is the output of
the model. Neglecting higher order terms (possibly a bold assumption), the
5.4. CALIBRATION AND IDENTIFICATION 101
model becomes
y = f(ϕ) +
f
ϕ
ϕ (5.101)
y f (ϕ)
| {z }
b
=
f
ϕ
|{z}
A
ϕ
|{z}
x
(5.102)
b = Ax, (5.103)
the familiar linear system of equations that can be solved for x with
x =
A
T
A
1
A
T
b. (5.104)
If the Jacobian matrix A directs the optimization process towards the solution,
the difference between f (ϕ + ϕ) (i.e., the model output) and the actual
output (e.g., the measured end-effector pose) should decrease. However, the
approximation made when neglecting higher order terms will usually result in
the parameter update ϕ + ϕ not being optimal and several iterations of the
linearization procedure will be required to converge sufficiently close to the
solution (with no guarantee of actually converging towards a good solution).
The process by which the parameters are iteratively updated by solving a
sequence of least squares problems is called iterative least squares optimization
and can be seen as a gradient descent method.
A Method Based on Screw Axes
The following kinematic calibration method is due to [1] and is based on the
idea of representing robot axes as unit screws. Unit screws are particularly
appealing in the context of kinematic calibration as they can seamlessly be used
to represent both revolute and prismatic joints. Perhaps more importantly,
screw axes can be parametrized with four parameters, three of which represent
the direction ˆs of the screw axis and one of which represents the pitch h that
relates linear and angular motion along the screw axis (see Sec. 2.5.2 for more
details about screw axes and twists). Hence, when identifying the parameters
of a robot model, a maximum of four distinct parameters can be identified for
each joint. When calibrating a robot, parameter redundancy (e.g., having more
than four parameters per joint) can result in increased difficulty in identifying
the parameters as the optimization procedure searches in a larger solution
space. The DH parametrization of a serial robot (see Sec. 2.7.2) also uses only
four parameters per joint, and has been proved to be minimal (in the sense
that no convention with fewer parameters exists). While the DH convention
102 CHAPTER 5. MANIPULATOR’S DYNAMICS
has been used in robot kinematic calibration, it can become discontinuous
under certain circumstances and is therefore more difficult to optimize over.
With serial robots, a maximum of 4R + 2T + 6 parameters can be identi-
fied, where R is the number of revolute joints, T is the number of prismatic
joints, when the end-effector pose is observed. When only the position of
the end-effector is observed, the number of identifiable parameters is reduced
to 4R + 2T + 3 as the orientation of the end-effector cannot be determined.
While observing the position provides three pieces of information, observing
the full pose provides six. Hence, prior to performing the calibration, at least
(4R + 2T + 6)/6 different pose measurements should be made to ensure the
identifiability of the parameters. In practice, due to sensor noise, it is recom-
mended to take many more measurements than the minimum number required
to achieve accurate identification.
On a per-joint basis, a set of four parameters are identified but, as described
in Sec. 2.5.2, screw axes lie in a six dimensional vector space. Hence, there is
a need to define a mapping between a set of four parameters and the screw
axis of a joint. For the i-th joint whose unit screw axis is
ˆ
S
i
=
ˆ
v
i
ˆ
ω
i
, (5.105)
the mapping can be defined as follow:
q
i
=
ˆ
v
i
×
ˆ
ω
i
, (5.106)
ˆ
ω
1
=
ˆ
ω
i
× (
ˆ
ω
i
+ 1) /
ˆ
ω
i
+ 1, (5.107)
ˆ
ω
2
=
ˆ
ω
i
×
ˆ
ω
1
(5.108)
B
i
=
ˆ
ω
1
ˆ
ω
2
q
i
×
ˆ
ω
1
q
i
×
ˆ
ω
2
0
3×1
0
3×1
ˆ
ω
1
ˆ
ω
2
. (5.109)
The matrix B
i
is a 6 × 4 matrix that maps the four parameters of the i-th
joint to a unit screw axis
ˆ
S
i
with
ˆ
S
i
= B
i
ϕ
i
, (5.110)
where ϕ
i
is the vector of parameters for the i-th joint. All B
i
matrices are
bundled in a large block-diagonal matrix
B =
B
1
0 . . . 0
0 B
2
. . . 0
.
.
.
.
.
.
.
.
.
.
.
.
0 0 . . . B
e
, (5.111)
5.4. CALIBRATION AND IDENTIFICATION 103
where B
e
is an identity matrix whose size is 3 × 3 if only the position of the
end-effector is observed, or 6 × 6 if the full pose is observed.
According to [1], a linear approximate of the end-effector pose difference
that is due to an error in the i-th joint is given by
Q
i
= Ad (
b
T
i1
) Ad (
b
T
i
) , (5.112)
where Ad (·) is the adoint representation of a pose, as defined in (2.99), and
b
T
i
is the pose of the i-th link relative to the robot base F
b
. The end-effector
pose difference that is due to an error in the zero configuration pose is simply
Q
e
= Ad (M) , (5.113)
where M =
b
T
ee
|
q=0
is the pose of the end-effector when all joint coordinates
are zero. As mentioned in Sec. 2.5.2, the adjoint representation can be used
to express a twist in a different coordinate system. Given that twists describe
rigid motions (the differential of a pose difference), it might not be surprising
that the adjoint representation appears in the relationship between end-effector
pose difference and screw axis error. The Jacobian matrix of the linearized
problem is then given by
Q =
Q
1
Q
2
. . . Q
J
Q
e
, (5.114)
where J is the number of joints of the robot, and where Q is a 6×6(J+1) matrix
mapping joint screw axes errors to end-effector twist errors. Mathematically,
logm
b
T
ee b
˜
T
1
ee
QBϕ
|{z}
ν
, (5.115)
where logm(·) is the matrix logarithm defined in (2.98) and
b
˜
T
ee
is the pose
of the end-effector as predicted by the robot model with parameters ϕ. If
end-effector positions are measured instead of full poses, the left-hand side of
(5.115) is replaced by the position difference
b
p
ee
b
˜
p
ee
.
The calibration process consists in solving (5.115) for the parameter update
ϕ with the method outlined in Sec. 5.4.1 where
A = QB, (5.116)
b = logm
b
T
ee b
˜
T
1
ee
or
b
p
ee
b
˜
p
ee
, (5.117)
x = ϕ. (5.118)
104 CHAPTER 5. MANIPULATOR’S DYNAMICS
At every iteration, the robot model is updated with
ˆ
S
i
= Ad
e
B
i
ϕ
i
ˆ
S
i
, (5.119)
M = e
B
e
ϕ
e
M, (5.120)
where
ˆ
S
i
is the screw axis of the i-th joint, ϕ
i
is the parameter update for
the i-th joint, and e
·
is the matrix exponential defined in (2.95).
5.4.2 Hand-Eye-Robot-World Calibration
This is a placeholder for the coming section on hand-eye-robot-world calibra-
tion.
5.4.3 Inertial Parameters Identification
Accurate model-based control of robot arm requires a precise knowledge of
the inertia that the robot will need to fight to accelerate the links of the arm.
Indeed, the direct and inverse dynamics algorithms rely on the knowledge
of the mass, centre of mass, and inertia tensor of each link. The inertial
parameters of the i-th link can be grouped into the vector
ϕ
i
=
m
i
, (5.121)
m
i
c
i
[x], m
i
c
i
[y], m
i
c
i
[z], (5.122)
b
i
I
i
[xx],
b
i
I
i
[xy],
b
i
I
i
[xz],
b
i
I
i
[yy],
b
i
I
i
[yz],
b
i
I
i
[zz]
(5.123)
in which the unique elements of the zero-th, first, and second moments of the
mass distribution are concatenated. Unfortunately, in general, not all inertial
parameters can be identified. Indeed, parameters that do not contribute to
the inertia fought by the robot when its joints are accelerating cannot be
dynamically identified and need to be obtained from CAD models. The set of
parameters that can be identified are called base parameters and can often only
be identified in linear combinations due the fact that the motion is governed
by the sum of the inertias.
For instance, only a single element of the inertial parameters of the first
link proximal to the base can possibly be identified since that link will only
ever experience acceleration about the axis of the first joint the motion of
the first link is limited. Furthermore, the sensing of the inertia of the first
link is usually only done through a joint torque sensor located as close as
possible to the rotor sensing is limited and the mass of the first link is never
measured. In contrast, a conventional 6-axes force-torque sensor attached to
5.4. CALIBRATION AND IDENTIFICATION 105
the end-effector of a 6-dof manipulator can be used to identify the full set of
inertial parameters of a load attached to the sensor. Indeed, the robot has
the capability to generate motions where the dynamics will depend on all the
parameters, and the sensor has the capability to measure all the forces and
torques experienced by the load.
One technique used to eliminate the parameters that are not base param-
eters, and therefore do no contribute to the dynamics, consists in running the
dynamics iterations of the inverse dynamics algorithm (from Sec. 5.2) sym-
bolically for a diverse set of robot configurations. It will become apparent
that some parameters are never used in the equations and that others only
appear in linear combinations. Another technique relies on a singular values
decomposition of the regressor matrix A that is defined below.
Setup Using Newtonian Mechanics
From (4.108), the equations of motion for the i-th link are
x
w
f
b
i
= m
x
w
a
b
i
+ m
x
w
ω
b
i
×
x
w
ω
b
i
×
x
b
i
p
c
i
+ m
x
w
α
b
i
×
x
b
i
p
c
i
(5.124)
x
w
τ
b
i
= m
x
b
i
p
c
i
×
x
w
a
b
i
+
x
b
i
I
i
x
w
α
b
i
+
x
w
ω
b
i
×
x
b
i
I
i
x
w
ω
b
i
(5.125)
and represent the forces due to the motion of the i-th link. Using skew-
symmetric matrices, the equations can be expressed as
w
f
b
i
w
τ
b
i
=
w
a
b
i
0
m
i
(5.126)
+
"
w
ω
b
i
×
w
ω
b
i
×
+
w
α
b
i
×
w
a
b
i
×
#
m
i
b
i
p
c
i
+
α
x
α
y
ω
x
ω
z
α
z
+ ω
x
ω
y
ω
y
ω
z
ω
2
y
ω
2
z
ω
y
ω
z
ω
x
ω
z
α
x
+ ω
y
ω
z
ω
2
z
ω
2
x
α
y
α
z
ω
x
ω
y
ω
x
ω
z
ω
x
ω
y
ω
2
x
ω
2
y
α
x
ω
y
ω
z
ω
x
ω
y
α
y
+ ω
x
ω
z
α
z
vech
b
i
I
i
where
b
i
p
c
i
= c
i
is the location of the centre of mass of link i relative to the
reference frame fixed in link i, and vech(·) is the vector-half operator which
extracts the unique elements of
b
i
I
i
in the order shown in (5.121). Concate-
nating the matrices that are pre-multiplying the inertial parameters in (5.126)
106 CHAPTER 5. MANIPULATOR’S DYNAMICS
such that
A
i
=
w
a
b
i
0
3×9
0
3×1
0
3×9
(5.127)
+
"
0
3×1
w
ω
b
i
×
w
ω
b
i
×
+
w
α
b
i
×
0
3×6
0
3×1
w
a
b
i
×
0
3×6
#
+
0
3×10
0
1×4
α
x
α
y
ω
x
ω
z
α
z
+ ω
x
ω
y
ω
y
ω
z
ω
2
y
ω
2
z
ω
y
ω
z
0
1×4
ω
x
ω
z
α
x
+ ω
y
ω
z
ω
2
z
ω
2
x
α
y
α
z
ω
x
ω
y
ω
x
ω
z
0
1×4
ω
x
ω
y
ω
2
x
ω
2
y
α
x
ω
y
ω
z
ω
x
ω
y
α
y
+ ω
x
ω
z
α
z
produce a data matrix that can be used in
"
b
i
w
f
b
i
b
i
w
τ
b
i
#
= A
i
ϕ
i
(5.128)
to compute the forces and torques that are due to the motion of the i-th link
given its inertial parameters in ϕ
i
.
For serial manipulators, a given joint has to fight the inertia of the links
that are between the joint and the end effector or load. Therefore, the torques
induced by the motion of the links further down the serial chain on the i-th
joint is
Q
i
=
X
j
0
1×5
1
Ad
b
i
T
b
j
T
A
j
ϕ
j
(5.129)
in which the torque sensor is assumed to be about the joint Z axis and where
the adjoint matrix Ad (·)
T
is used to express a wrench vector in another
frame, similarly to (3.16).
The equation in (5.129) is again linear in the inertial parameters such that
Q
1
··· Q
n
T
| {z }
Q
m
= K
m
ϕ
1
··· ϕ
n
T
| {z }
ϕ
(5.130)
where
K
m
ij
=
0
1×5
1
Ad
b
i
T
b
j
T
A
j
(5.131)
is the torque contribution on joint i from the inertia of link j from the m-th
observation. When multiple observations are obtained, the matrices Q and K
in (5.130) are stacked as
Q
1
··· Q
P
T
| {z }
Q
=
K
1
··· K
P
T
| {z }
K
ϕ (5.132)
5.4. CALIBRATION AND IDENTIFICATION 107
such that the whole problem is reduced to the linear relationship
Q = Kϕ. (5.133)
When the goal is to identify a load, and that a force-torque sensor at the
end-effector is available, all terms in the equations of motion should be com-
puted relative to the sensor frame such as to be compatible with the readings
from the sensor. The data matrix can be built directly without resorting to
any additional steps done for the robot link identification.
Note on Using the Lagrangian Formulation
Similar to the setup using Newtonian mechanics, the goal is to express the
generalized forces as a linear combination of the inertial parameters (as in
(5.133)). To do so, the elements in (5.72) that depend on the kinematics must
be separated from the ones that are function of the inertial parameters. Due
to the complicated structure of the equations in (5.73) and (5.80), it is far from
obvious to come up with a linear relationship between generalized velocities
and inertial parameters. An alternative is to perform the forward kinematics
from q,
˙
q,
¨
q to obtain the task-space kinematics of each link. Then, the
identification setup using Newtonian mechanics could be done.
Identification Procedure
When the regressor matrix has full rank, the solution to the ordinary least
squares problem
min
ϕ
||Kϕ Q||
2
(5.134)
is
ϕ =
K
T
K
1
K
T
Q . (5.135)
However, K
T
K is not invertible when K is not full-rank, which is usually the
case when either links motion or joints sensing is limited in that case the
regressor must be made full-rank by reducing the set of inertial parameters to
the base parameters.
A load fixed to a 6-axes force-torque sensor at the end-effector of a 6-dof
manipulator will produce a matrix K that has full-rank due to the fact that
motion and sensing is not limited in this case. Consequently, the inertial
parameters of the load can be estimated by solving (5.134). If a bias exists in
the force vector Q, for instance if the torques at the joints are used to compute
the load wrench, the identification trajectory can be performed without load
108 CHAPTER 5. MANIPULATOR’S DYNAMICS
(0) and then with the load (L), and the difference Q = Q
L
Q
0
can be used
in (5.134).
For a given trajectory, some parameters might be very poorly excited and
will hinder the identification of the other parameters. Sometimes, it is best
to eliminate those parameters to allow a more accurate identification of the
others. To do so, the columns of the regressor matrix K are first normalized
to unit length such that each parameter is scaled equally. Then, the singular
values decomposition (SVD) of the scaled regressor is performed with
SVD(K) = UΣV
T
(5.136)
where U and V are orthogonal matrices, and Σ is the diagonal matrix of
singular values. The condition number is then computed with
κ(K) =
σ
max
σ
min
(5.137)
where σ
max
is the largest singular value and σ
min
is the smallest. The condi-
tion number expresses the sensitivity of the estimate to noise in the regressor
matrix and in the observation vector. As a rule of thumb, a condition number
below (or on the order of) 100 implies that the regressor is well-conditioned,
while a condition number on the order of 1000 implies that the regressor will
be very sensitive to noise and that the estimate will be uncertain.
To attenuate the impact of the poor identifiability of some parameters on
the overall estimate, parameters associated with low singular values should
be iteratively eliminated until the condition number becomes more reasonable
(parameters associated with singular values that are zero are unidentifiable).
To do so, the column of V that is associated with σ
min
is inspected for an
element that would be significantly larger than the other elements. If such
an element exists, and is at the j-th position in the column, the associated
parameter ϕ
j
is eliminated and the procedure can be repeated.
An estimate for the uncertainty in the identified parameters
ˆ
ϕ can be
obtained by computing a covariance matrix
ˆ
S estimate through the sum of
squared residuals
χ
2
= (Kϕ Q)
T
(Kϕ Q) (5.138)
with
ˆ
S =
χ
2
ν
K
T
K
1
(5.139)
where ν is the number of statistical degrees of freedom, which is given by the
total number of observations (e.g. torques measurements) minus the number
of parameters to estimate.
5.5. KEY CONCEPTS 109
Maximizing the minimum singular value σ
min
, the condition number κ(K)
in (5.137), or the determinant of (K
T
K)
1
are all observability indices that
can be used to evaluate the quality of an identification trajectory.
5.5 Key Concepts
The minimal set of coordinates that can be used to describe the position
of all points on a robot are the generalized coordinates.
The space spanned by the generalized coordinates is the configuration
space. Each point in this space is a robot configuration.
Holonomic constraints applied to a robot reduce the number of gener-
alized coordinates for the robot. Holonomic constraints can depend on
the robot configuration and on time but not on the robot velocity or
acceleration.
The Jacobian matrix is a matrix of partial derivatives describing the
relationship between the generalized velocities and the task-space veloc-
ities.
While the space Jacobian expresses spatial velocities in the inertial frame,
the body Jacobian expresses spatial velocities in the body frame. The
adjoint representation relates the two Jacobians.
Each column of the space Jacobian describes the screw axis of the cor-
responding joint.
The transpose of the inverse of the space Jacobian maps joint-space forces
to task-space forces.
When the rank of the Jacobian is less than 6, the robot cannot generate
all task-space velocities.
At a singular configuration, the Jacobian becomes rank-deficient.
With over-actuated robots, the null-space of the Jacobian is not empty
and some robot motion can happen while the end-effector is stationary.
When a robot approaches a singular configuration, very large joint ve-
locity are required to make any progress. At this point, a manipulability
index can be used to move away from the singularity.
110 CHAPTER 5. MANIPULATOR’S DYNAMICS
The Hessian describes how the Jacobian changes with respect to the
generalized coordinates. It is used to map joint-space kinematics to
task-space accelerations.
The Lagrangian formulation of rigid-body dynamics relates changes in
energy levels to generalized forces.
Using the Lagrangian formulation can be advantageous when a system
must respect a set of constraints. Finding the set of generalized co-
ordinates respecting the constraints will result in equations of motions
implicitly respecting the constraints. In practice, the Newtonian formu-
lation is often preferred as it is faster to compute.
Appendix A
A Summary’s Summary
A.1 Geometry
A line vector has magnitude, direction, and a starting point, while a free
vector only has the first two.
A transformation is done on a column vector by pre-multiplying it by
the transformation.
p
x
2
p
y
2
p
z
2
1
= T
p
x
1
p
y
1
p
z
1
1
(A.1)
Vectors can be added together if they are expressed in the same reference
frame.
c
a
p
b
=
c
a
p
d
+
c
d
p
b
(A.2)
Any rotation can be expressed as a sequence of three principal rotations.
Passive rotations are compounded through post-multiplication and are ex-
pressed about the fixed frame. Active rotations are compounded through
pre-multiplication and are expressed about the moving frame.
A cartesian reference frame is defined from three unit vectors that are
orthogonal to each other.
F
a
·F
T
b
=
ˆa
x
ˆa
y
ˆa
z
·
ˆ
b
x
ˆ
b
y
ˆ
b
z
=
ˆa
x
·
ˆ
b
x
ˆa
x
·
ˆ
b
y
ˆa
x
·
ˆ
b
z
ˆa
y
·
ˆ
b
x
ˆa
y
·
ˆ
b
y
ˆa
y
·
ˆ
b
z
ˆa
z
·
ˆ
b
x
ˆa
z
·
ˆ
b
y
ˆa
z
·
ˆ
b
z
=
a
R
b
(A.3)
Element ij -th is the cosine of the angle between a
i
and b
i
. The rows of
a
R
b
express the direction of an axis in F
b
relative to axes in F
a
.
111
112 APPENDIX A. A SUMMARY’S SUMMARY
Rotations have nine elements but six constraints: three comes from the
orthogonality of the columns, and three comes from the normality of the
columns. A rotation is proper if the determinant is positive, meaning that
there is no reflection. The Special Orthogonal Group SO(3) is the group of
rotations.
SO(3) =
R
3×3
| R
T
R = 1
3×3
, det (R) = +1
(A.4)
A group is a set on which a binary operator O{} is defined, respecting four
axioms: closure (O{a, b} G), identity (O{a, I} = O{I, a} = a), inverse
(O{a, a
1
} = O{a
1
, a} = I), and associativity (O{c, O{a, b}} = O{a, O{b, c}}).
For rotation matrices, the group operation is matrix multiplication.
Euler’s rotation theorem states that any sequence of rotations can be
expressed as a single rotation θ about some axis ˆω. Axis-angle can be useful
to compute the rotation that brings ˆu onto ˆv with
ˆω =
ˆu × ˆv
ˆu × ˆv
(A.5)
θ = arccos (ˆu · ˆv) (A.6)
Rodrigues Formula transform an axis-angle into a rotation matrix and de-
fines the matrix exponential
R = e
[ˆω]
×
θ
= 1
3×3
+ sin(θ) [ˆω]
×
+ (1 cos(θ)) [ˆω]
2
×
(A.7)
The inverse operation can be done with the matrix logarithm that is singular
at R = 1 and nearly singular for small rotations.
Euler parameters introduce an additional parameter and constraint to
alleviate this problem.
e =
e
0
e
1
e
2
e
3
=
cos(θ/2) ˆω sin(θ/2)
(A.8)
e = 1 (A.9)
Euler parameters can be encoded in unit quaternions to operate on vec-
tors with
q
0, v
x
, v
y
, v
z
T
q
(A.10)
which corresponds to Rv. Quaternions rotate twice slower than rotations, so
two antipodal quaternions map to the same rotation. A random orienta-
tion can be obtained by sampling four numbers from a Gaussian distribution,
and normalizing three of them. Interpolating between quaternions can be
A.1. GEOMETRY 113
done by computing the rotation difference, getting the axis-angle, and inter-
polating.
δ = q
0
q
1
(A.11)
θ = atan(δ
v
w
) (A.12)
ˆω = δ
v
/ δ
v
(A.13)
q
t
= q
0
cos()
ˆω sin()
(A.14)
Its trivial to enforce a unit quaternion’s constraint while its much more
difficult to do the same with rotations.
The Chasles-Mozzi theorem states that any rigid transformation can
be expressed as a displacement over the thread of a screw. A screw is
defined by its unit axis ˆs, thread pitch h, and a point q on the axis. The pitch
is the ratio of linear to angular motion.
A twist is a motion about a screw , which can be considered as the co-
ordinate system the motion is defined relative to. A unit-screw S is expressed
from the twist components as
S =
"
h
ˆ
ω
ˆ
ω × q
ˆ
ω
#
if ω = 1
"
ˆ
v
0
#
if ω = 0 and v = 1
(A.15)
such that a rigid transformation can be defined as Sθ If the θ instead expresses
the rate of motion, the velocity twist is defined as
ν =
v
ω
=
hω ω × q
ˆsθ
(A.16)
where the linear velocity v is the sum of a component along the axis and a
component orthogonal to the axis (leading the thread towards and away from
the axis).
The adjoint representation of a rigid transformation can be used to
change the reference frame that a twist is expressed in with
Ad (T) =
R [p]
×
R
0
3×3
R
(A.17)
A pose can be reversed through the inverse only if it is expressed in the
114 APPENDIX A. A SUMMARY’S SUMMARY
same frame it is defined relative to.
b
T
c c
T
a
=
b
R
c c
R
a b
R
c
c
p
a
+
b
p
c
0 1
=
b
T
a
(A.18)
c
b
T
a
= (
c
a
T
b
)
1
(A.19)
(
a
T
b
)
1
=
b
T
a
(A.20)
Forward kinematics computes the end-effector pose from the joint posi-
tions.
w
T
ee
= FK(q) (A.21)
Unit-screws can be used to define every actuation axis of a robot in its zero
configuration. Prismatic joints are defined with ω = 0 and with v being the
axis expressed in the robot base frame.
S =
v 0
T
(A.22)
Revolute joints are defined with h = 0, with ω being the axis expressed in the
robot base frame, and q being any point on the screw axis.
S =
ω × q ω
T
(A.23)
With the pose of the end-effector being M =
w
T
ee
|
θ=0
the forward kinematics
is given by the products of exponentials formula
w
T
ee
(θ) = e
[S
1
]
×
θ
1
e
[S
2
]
×
θ
2
. . . e
[S
n
]
×
θ
n
M (A.24)
The structure of a serial robot can be defined from a sequence of homoge-
neous transformations, each describing the frame of a link relative to the frame
of the previous link. The Denavit-Hartenberg (DH) convention is a min-
imal parametrization that uses only four values per joint. Two constraints
are needed:
the ˆz
i
axis must coincide with the i-th joint actuation axis and direction,
the ˆx
i1
axis must be perpendicular to ˆz
i
.
After the frame are placed, the parameters can be extracted as
1. a
i1
is the distance along ˆx
i1
between ˆz
i1
and ˆz
i
,
2. α
i1
is the angle about ˆx
i1
that would bring ˆz
i1
to ˆz
i
if they shared
their origin,
A.2. KINEMATICS 115
3. d
i
is the distance along ˆz
i
between the intersection with ˆx
i1
and the
origin of the frame,
4. ϕ
i
is the angle about ˆz
i
that would bring ˆx
i1
to ˆx
i
if they shared their
origin.
such that the transformation
i1
T
i
= Tran(ˆx
i1
, a
i1
)Rot(ˆx
i1
, α
i1
)Tran(ˆz
i
, d
i
)Rot(ˆz
i
, ϕ
i
) (A.25)
is defined for each joint.
A.2 Kinematics
The derivative of vectors are also vectors, so the derivative of the position
vector is the velocity vector.
All points on a rigid body can have different kinematics but they all
share the same description of the kinematics. The velocity of all points
within rigid body can be describes with the linear and angular velocities. The
linear velocity can be thought as a measure of the flow of points passing
through the origin.
Angular velocities can be simply added
w
ω
o
=
w
ω
b
+
w
R
b b
ω
o
(A.26)
but the real velocity of a point is the product of linear and angular compo-
nents
x
w
˙
p
o
=
x
w
v
b
+
x
w
ω
b
×
x
b
p
o
+
x
b
˙
p
o
(A.27)
since
R (a × b) = (Ra) × (Rb) (A.28)
The time-derivative of a rotation is given by
w
˙
R
b
=
w
ω
b
×
w
R
b
(A.29)
such that the time-derivative of a rotated vector is
d
dt
(
w
R
b
b
p
o
) =
w
R
b
b
˙
p
o
+
w
ω
b
×
w
b
p
o
(A.30)
The adjoint of a transformation can be used to express velocity in a different
reference frame with
w
ν
b
=
w
v
b
w
ω
b
= Ad (
w
T
b
)
b
w
ν
b
(A.31)
116 APPENDIX A. A SUMMARY’S SUMMARY
which can also simplify the composition of velocities with
w
ν
o
=
w
ν
b
+ Ad (
w
T
b
)
b
ν
o
(A.32)
The acceleration of a point {o} that is defined relative to a rotating
reference frame F
b
is given by
w
¨
p
o
=
w
a
o
+ 2
w
ω
b
×
w
b
˙
p
o
+
w
ω
b
× (
w
ω
b
×
w
b
p
o
) +
w
α
b
×
w
b
p
o
(A.33)
A.3 Dynamics
Dynamics studies how forces influence the motion of a body.
An inertial frame is a frame that does not accelerate, implying that it
does not rotate since a change in the velocity direction would involve acceler-
ation. A practical point of view is that any frame in which Newton’s laws
are sufficiently accurate can be considered an inertial frame.
The N-th moment of a mass distribution is given by
Z
V
p
N
ρ(p)dV (A.34)
to produce the zero-th (mass), first (centre of mass), and second moment
(inertia tensor)
Z
V
p
0
ρ(p)dV =
Z
V
ρ(p)dV = m (A.35)
Z
V
p
1
ρ(p)dV = mc (A.36)
Z
V
p
2
ρ(p)dV =
Z
V
[p]
T
×
[p]
×
ρ(p)dV = I (A.37)
The inertia tensor is symmetric positive-definite (due to rotational ki-
netic energy being positive) where the ij-th element expressed how torque
applied about axis e
i
will produce angular acceleration around axis e
j
.
Equivalently, the ij-th element expressed how a rotation about e
i
will pro-
duce angular momentum around e
j
. The diagonal elements are the mo-
ments of inertia while the off-diagonal elements are the products of inertia.
Symmetries in the mass distribution will cancel products of inertia, which is
desired for a car wheel such that it does not wobble.
The parallel axis theorem can move the origin of the reference frame
b
a
I =
b
I m [
b
p
a
]
×
[
b
p
a
]
×
(A.38)
A.3. DYNAMICS 117
and a similarity transform can change the alignment of the reference axes
with
c
b
I =
c
R
d
d
b
I
c
R
T
d
(A.39)
The principal axes of inertia along which the mass is mostly distributed
strictly determine the motion of a rigid body about its centre of mass. A
singular values decomposition of the inertia tensor can produce
c
I =
c
R
p
p
c
I
c
R
T
p
(A.40)
in which the principal moments of inertia are the eigenvalues.
Like forces, inertia is additive.
The momentum defined as
c
b
E
a
= m
c
b
v
a
(A.41)
is a conserved quantity, it does not change over time in a closed system.
The angular momentum is the moment of the momentum and is defined
as
c
b
ε
a
|{z}
Real
= m
c
b
p
a
×
c
b
v
a
+
c
b
I
a
c
b
ω
a
| {z }
Intrinsic
(A.42)
where the intrinsic angular momentum is a vector that can be expressed in a
different frame with
w
R
b
b
I
b
ω
=
w
I
w
ω (A.43)
Konig’s theorem states that the angular momentum is the sum of a
component due to the motion of the centre of mass, and a component due to
the motion of the body about its centre of mass.
w
ε =
w
ε
c
+
w
c
ε
b
(A.44)
When the inertia tensor is computed relative to the principal axes of inertia,
the intrinsic angular momentum is
ε
i
= I
i
ω
i
(A.45)
Energy (in Joules) is a conserved quantity. “All phenomena depend
on the variation of energy and not on its absolute value” (Maxwell).
The kinetic energy of a body is defined as
w
K =
1
2
m
w
v
T
b
(
w
v
b
)
| {z }
Linear
+
w
ω
T
b
(
b
p
c
×
w
v
b
) +
1
2
w
ω
T
b
I
b w
ω
b
| {z }
Rotational
(A.46)
118 APPENDIX A. A SUMMARY’S SUMMARY
where the middle term cancels if the origin of F
b
is at the centre of mass {c}.
Work is done when applying a force on a mass along a displacement.
W =
Z
f(s) · dr (A.47)
Power is the amount of energy transferred per unit of time.
P =
W
t
= f ·
˙
p (A.48)
The system inertia matrix
I =
m1
3×3
m [c]
×
m [c]
×
I
(A.49)
relates momenta to velocities with
E = Iν (A.50)
which is, like the inertia matrix, symmetric and positive-definite.
The system inertia matrix can also be used to compute the kinetic energy
with
K =
1
2
ν
T
Iν (A.51)
making it a central piece of dynamics. Since the kinetic energy must be posi-
tive, the spatial inertia matrix must be symmetric positive-definite.
A.3.1 Newtonian Mechanics
Newton’s laws of motion:
1. A body will stay at rest unless a force is acted upon it inertia exists.
2. A force acting on a body will change the rate of its momentum
conservation of momentum.
3. Two interacting bodies will be subject to opposed forces.
In an inertial frame, Newton’s laws are observed as
w
f
c
=
d
w
E
c
dt
= m
d (
w
v
c
)
dt
= m
w
a
c
(A.52)
w
τ
c
=
d
w
ε
c
dt
=
d (
w
c
I
w
ω
c
)
dt
=
w
c
I
w
α
c
+
w
ω
c
×
w
c
I
w
ω
c
(A.53)
A.3. DYNAMICS 119
where the origin of F
b
is at the centre of mass and all quantities are observed
in the inertial frame.
When the origin of F
b
is at the centre of mass and its axes are aligned
with the principal axes of inertia, the angular momentum is
ε
i
= I
i
ω
i
(A.54)
such that the rotational kinetic energy is
K
rot
=
1
2
w
ω
T
b
I
b w
ω
b
=
1
2
I
x
ω
2
x
+ I
y
ω
2
y
+ I
z
ω
2
z
(A.55)
and Euler’s equations are simplified to
τ
x
= I
x
α
x
(I
y
I
z
)ω
y
ω
z
τ
y
= I
y
α
y
(I
z
I
x
)ω
z
ω
x
τ
z
= I
z
α
z
(I
x
I
y
)ω
x
ω
y
(A.56)
highlighting that the motion of a body only depends on its principal mo-
ments of inertia.
When the motion of a body is observed in a rotating/non-inertial reference
frame (always), fictitious forces are added to accurately depict the motion
with
w
f
b
= m
w
a
c
+ 2
w
ω
b
×
w
b
v
c
| {z }
Coriolis
+
w
ω
b
× (
w
ω
b
×
w
b
p
c
)
| {z }
centrif ugal
+
w
α
b
×
w
b
p
c
| {z }
Euler
(A.57)
w
τ
b
= m
w
b
p
c
×
w
a
b
+
w
b
I
w
α
b
+
w
ω
b
×
w
b
I
w
ω
b
(A.58)
It can be useful to express everything in F
b
such that inertia tensor and centre
of mass do not change over time.
A.3.2 Lagrangian Mechanics
The minimal set of coordinates q that can be used to fully describe the po-
sition of all particles in a system are the generalized coordinates, which
define the configuration. The number of generalized coordinates is given
by the number of degrees of freedom minus the number of holonomic con-
straints, which is a type of constraint that depends only on the configuration
and possibly on time (e.g. a point on a sphere). Conversely, non-holonomic
constraints are defined by configuration derivatives (like velocity), on the
120 APPENDIX A. A SUMMARY’S SUMMARY
path taken (e.g. rolling sphere), or have coordinates dependencies (e.g. point
in a cube).
The space Jacobian is defined as
J
s
(q) =
h
r
q
1
r
q
2
···
r
q
n
i
(A.59)
and maps generalized velocities to real velocities through
w
˙
p
b
= J
s
(q)
˙
q (A.60)
and generalized forces to real forces and torques through
Q = J
s
(q)
T
W (A.61)
The wrench can be expressed in a different reference frame with
W
w
= Ad (
w
T
b
)
T
W
b
(A.62)
If the Jacobian is not square and full rank, it cannot be inverted, and
the reverse mapping has either no solution or many solutions. For under-
actuated robots, some velocity directions are impossible, and the Jacobian
must be shrink to account for that. For over-actuated robots, many joint-space
velocities can achieve the desired task-space velocity and a criteria is needed to
choose how to move (e.g. minimal energy). In singular configurations, the
Jacobian loses rank and effectively maps generalized velocities to space with
less dimensions than the task-space. In this case, an approximate motion
can be performed by using the pseudo-inverse of the Jacobian
J
s
(q)
+
=
J
s
(q)
T
J
s
(q)
1
J
s
(q)
T
(A.63)
An infinitesimal deviation from the system’s trajectory while still respect-
ing all constraints is called a virtual displacement δr. Applying a force
along δr produces virtual work δW = f · δr = Q · δq.
D’Alembert principle states that
X
w
f
b
· δr =
d
w
E
b
dt
· δr (A.64)
from which Lagrange’s equation of motion
Q
i
=
d
dt
K
˙
q
i
L
q
i
(A.65)
can be derived, where L = K U is the total energy of the system.
A.3. DYNAMICS 121
For a serial robot, the equation of motion is written
Q = M(q)
|{z}
mass matrix
¨
q + C(q,
˙
q)
| {z }
Coriolis matrix
˙
q + g(q)
|{z}
gravity vector
(A.66)
where
M(q) =
n
X
i=1
i
w
J
i
c
(q)
T
i
i
c
I
i
i
w
J
i
c
(q)
(A.67)
C(q,
˙
q)
i,j
=
n
X
k=1
Γ
i,j,k
(q)
˙
q
k
(A.68)
Γ
i,j,k
(q) =
1
2
M(q)
i,j
q
k
+
M(q)
i,k
q
j
M(q)
j,k
q
i
(A.69)
g(q)
i
=
U
q
i
=
n
X
j=1
m
j
g
h
j
(q)
q
i
(A.70)
with the gravity vector expressing the torques that are required to hold the
robot immobile.
The total kinetic energy of the system is obtained with
w
K =
1
2
˙
q
T
M(q)
˙
q (A.71)
Lagrangian mechanics is advantageous as it implicitly respects motion
constraints and produce shorter derivations. However, it is often not obvious
to choose the right set of generalized coordinates. Also, getting the equations
of motion requires to differentiate. Most importantly, Newtonian mechanics
requires much less operations to perform inverse dynamics.
The inverse dynamics problem aims to find joint torques for an end-
effector trajectory. The Recursive Newton-Euler Algorithm (RNEA) can
be run for each time step of the robot end-effector trajectory to obtain a se-
quence of joint torques that can be applied such that the robot follows the tra-
jectory. The RNEA is done in two successive phases, (1) computing kinemat-
ics from the base, and (2) computing forces and torques from the end-effector.
The kinematics iterations start at the base, and with each iteration the
velocity and acceleration of the COM of a more distal link is computed from
the one of the proximal link. The acceleration of the base of the robot is set
to the opposite of gravity such that the robot compensates. The dynamics
iterations start at the last joint and, for each joint, compute the torque that
must be exerted as a reaction to the wrench exerted by the following joint,
122 APPENDIX A. A SUMMARY’S SUMMARY
and additionally provide the torque necessary to produce the intended motion
of the link between the two joints.
The direct dynamics aims to find the motion that would result from
applying a sequence of driving forces. To do so, the equation of motion is
solved for
¨
q and then numerical integration is performed to get
˙
q and q.
The wrench due to C(q,
˙
q)
˙
q + g(q) can be obtained by performing the inverse
dynamics with
¨
q = 0.
Appendix B
Useful Mathematical
Formulas
This section compiles a few formulas that can be handy when performing
derivations. It is in no way exhaustive, and does not cover the mathematics
necessary to understand most of the derivations in this book. For a succint
summary of concepts that are used in this book, the appendices in Peter
Corke’s Robotics, Vision and Control and the Linear Algebra Review in Ap-
pendix E of Modern Robotics (only in the online version) are recommended.
B.1 Exponentials and Logarithms
exp(x + y) = exp(x) exp(y) exp(x y) =
exp(x)
exp(y)
exp(x)
y
= exp(xy)
exp(x)
1
= exp(x) exp(x) exp(x) = 1 (a · b)
n
= a
n
b
n
(a/b)
n
= a
n
/b
n
exp(x) = lim
n→∞
1 +
x
n
n
ln(x) = log
e
(x)
log
a
(x) =
ln(x)
ln(a)
ln(m · n) = ln(m) + ln(n) ln(m
n
) = n ln(m)
e
jθ
= cos(θ) + j sin(theta) cos(θ) =
e
jθ
+e
jθ
2
sin(θ) =
e
jθ
e
jθ
2j
123
124 APPENDIX B. USEFUL MATHEMATICAL FORMULAS
tan =
sin
cos
cot =
cos
sin
sec =
1
cos
csc =
1
sin
sin
2
+ cos
2
= 1 sin(2x) = 2 sin(x) cos(x)
1 + tan
2
= sec
2
1 + cot = csc
2
cos(2x) = 1 2 sin
2
(x) cos(2x) = cos
2
(x) sin
2
(x)
sin
2
(x) =
1
2
(1 cos(2x)) cos
2
(x) =
1
2
(1 + cos(2x))
B.2 Trigonometric Identities
cos(x ± y) = cos(x) cos(y) sin(x) sin(y) (B.1)
sin(x ± y) = sin(x) cos(y) ± sin(y) cos(x) (B.2)
cos(x) cos(y) =
1
2
(cos(x y) + cos(x + y)) (B.3)
sin(x) sin(y) =
1
2
(cos(x y) cos(x + y)) (B.4)
B.3 Taylor Series Expansion
When done about a point a, the Taylor series expansion of a function f (x) is
given by
f(x) =
X
n=0
f
(n)
(a)
n!
(x a)
n
(B.5)
f(a) + f
(a)(x a) +
f
′′
(a)
2
(x a)
2
+
f
′′′
(a)
6
(x a)
3
+ . . . (B.6)
and for a multivariate function f (x), it is given by
f(x) =
X
n=0
1
n!
m
X
i=1
n
f
x
n
i
!
(x a)
n
(B.7)
f(a) +
m
X
i=1
f
x
i
(a)(x
i
a
i
) +
1
2
m
X
i=1
m
X
j=1
2
f
x
i
x
j
(a)(x
i
a
i
)(x
j
a
j
) + . . .
(B.8)
in which a is the point about which the expansion is done.
B.4. CALCULUS 125
f(x) f
(x) f(x) f
(x) f(x) f
(x)
a 0 au adu uv udv + vdu
u
v
vduudv
v
2
u
n
nu
n1
du e
u
e
u
du
a
u
a
u
ln(a)du ln(u)
1
u
du log
a
(u)
1
u ln(a)
du
sin(u) cos(u)du cos(u) sin(u)du z(y(x))
dz
dy
|
y(x)
dy
dx
|
x
B.4 Calculus
R
k = kx + c
R
x
k
=
x
k+1
k+1
+ c
R
1
x
= ln |x| + c
R
e
x
= e
x
+ c
R
a
x
=
a
x
ln(a)
+ c
R
sin(x) = cos(x) + c
R
cos(x) = sin(x) + c
R
sec(x) = ln |(sec x + tan x)| + c
R
csc x = ln(csc x cot x) + c
R
tan x = ln |sec x| + c
R
cot x = ln |sin x| + c
R
sec
2
x = tan x + c
R
csc
2
x = cot x + c
R
sec x tan x = sec x + c
R
csc x cot x = csc x + c
R
1
1x
2
= arcsin x + c
R
1
x
x
2
1
= asec |x| + c
R
1
1+x
2
= atan x + c
R
e
ax
=
e
a
x
a
+ c
R
xe
ax
=
e
ax
a
x
1
a
+ c
R
x
2
e
ax
=
e
ax
a
x
2
2x
a
+
2
a
2
+ c
R
ln(x) = x ln(x) x + c
R
x ln(x) =
1
2
x
2
ln(x)
1
2
+ c
R
sin(ax) =
cos(ax)
a
+ c
R
sin
2
(ax) =
x
2
sin(2ax)
4a
+ c
R
x sin(ax) =
sin(ax)
a
2
x cos(ax)
a
+ c
R
cos(ax) =
sin(ax)
a
+ c
R
cos
2
(ax) =
x
2
+
sin(2ax)
4a
+ c
R
x cos(ax) =
cos(ax)
a
2
+
x sin(ax)
a
+ c
R
e
ax
sin(bx) =
e
ax
(a sin(bx)b cos(bx))
a
2
+b
2
+ c
R
e
ax
cos(bx) =
e
ax
(a cos(bx)+b sin(bx))
a
2
+b
2
+ c
R
sin(ax) cos(ax) =
sin
2
(ax)
2a
+ c
R
cot(ax) =
1
a
ln |sin(ax)| + c
R
sec(ax) =
1
a
ln |sin(ax)| + c
R
csc(ax) =
1
a
ln |csc(ax) cot(ax)| + c
R
sec
2
(ax) =
1
a
tan(ax) + c
R
csc
2
(ax) =
1
a
cot(ax) + c
R
sec
n
(ax) tan(ax) =
1
na
sec
n
(ax) + c
R
csc
n
(ax) cot(ax) =
1
na
csc
n
(ax) + c
R
sin
n
x cos x =
1
n+1
sin
n+1
(x) + c
R
cos
n
x sin x =
1
n+1
cos
n+1
x + c
R
tan
n
x sec
2
x =
1
n+1
tan
n+1
x + c
R
1
a
2
+x
2
=
1
a
atan
x
a
+ c
R
1
x
2
a
2
=
1
2a
ln |
a+x
ax
| + c
R
1
a
2
x
2
=
1
2a
ln
a+x
ax
+ c
R
1
a
2
x
2
= arcsin
x
a
+ c
R
1
a
2
+x
2
= ln
x +
p
x
2
+ a
2
+ c
R
1
x
2
a
2
= ln
x +
p
x
2
a
2
+ c
126 APPENDIX B. USEFUL MATHEMATICAL FORMULAS
R
1
x
x
2
a
2
=
1
a
asec
x
a
+ c
R
1
x
a
2
+x
2
=
1
a
ln
a+
a
2
+x
2
x
+ c
R
1
x
a
2
x
2
=
1
a
ln
a+
a
2
x
2
x
+ c
Z
x
2
sin(ax) =
2x sin(ax)
a
2
+
2
a
3
x
2
a
!
cos(ax) + c (B.9)
Z
x
2
cos(ax) =
2x cos(ax)
a
2
+
x
2
a
2
a
3
!
sin(ax) + c (B.10)
Z
sin(ax) cos(bx) =
cos(a b)x
2(a b)
cos(a + b)x
2(a + b)
+ c (B.11)
Z
tan(ax) =
1
a
ln |sec(ax)| + c (B.12)
Z
q
x
2
± a
2
=
x
2
q
x
2
± a
2
±
a
2
2
ln
x +
q
x
2
± a
2
+ c (B.13)
Z
q
a
2
x
2
=
x
2
q
a
2
x
2
+
a
2
2
arcsin
x
a
+ c (B.14)
See the Matrix Cookbook by Petersen & Pedersen, from which the following
formulas were taken from, for more formulas and identities useful for matrix
calculus.
x
T
u
x
= u (B.15)
x
T
Ax
x
= (A + A
T
)x (B.16)
u
T
Xv
X
= uv
T
(B.17)
u
T
X
T
v
X
= vu
T
(B.18)
u
T
XA
T
Xv
X
= A
T
Xuv
T
+ AXvu
T
(B.19)
(Bx + u)
T
A (Cx + v)
x
= B
T
A (Cx + v) + C
T
A
T
(Bx + u) (B.20)
B.5. NORMS 127
B.5 Norms
x
p
=
n
X
i=1
|x
i
|
p
!
1/p
(B.21)
x
T
y
x
2
y
2
(B.22)
x + y
p
x
p
+ y
p
(B.23)
x
p
0 (B.24)
cx
p
= |c|x
p
(B.25)
x
p
= 0 x = 0 (B.26)
B.6 Matrix Properties
AB = BA A(B + C) = AB + AC
(B + C)A = BA + CA cA =
ca
11
ca
12
ca
21
ca
22
A
T
ij
=
A
T
ji
A
T
T
= A
(A + B)
T
= A
T
+ B
T
(AB)
T
= B
T
A
T
A
1
T
=
A
T
1
(cA)
T
= cA
T
det
A
T
= det (A)
T
= det (A) det
A
1
= det (A)
1
det (AB) = det (A) det (B) det (cA) = c
n
det (A)
det (1) = 1 det (A) =
Q
n
i=1
λ
i
A
1
1
= A (cA)
1
= c
1
A
1
(AB)
1
= B
1
A
1
A
T
1
=
A
1
T
A
1
=
adj(A)
det(A)
adj (A) = (cof (A))
T
A
+
=
A
T
A
1
A
T
A
+
A = 1 (left) A
+
= A
T
AA
T
1
AA
+
= 1 (right)
tr (A) =
P
n
i=1
a
ii
tr (A + B) = tr (A) + tr (B)
tr (cA) = ctr (A) tr (AB) = tr (BA) = tr (A) tr (B)
tr (A) = tr
A
T
tr
AB
T
= tr
A
T
B
=
P
i
P
j
a
ij
b
ij
tr (ABC) = tr (BCA) = tr (CAB) tr
B
1
AB
= tr (A)
tr (A) =
P
i
λ
i
, the eigenvalues u
T
v = tr
uv
T
128 APPENDIX B. USEFUL MATHEMATICAL FORMULAS
diag {a
1
, . . . , a
n
}
1
= diag
n
a
1
1
, . . . , a
1
n
o
(B.27)
diag {a
1
, . . . , a
n
}diag {b
1
, . . . , b
n
} = diag {a
1
b
1
, . . . , a
n
b
n
} (B.28)
det (diag {a
1
, . . . , a
n
}) =
n
Y
i=1
a
i
(B.29)
det

A B
C D

= det (D) det
A BD
1
C
(B.30)
= det (A) det
D CA
1
B
(B.31)
Appendix C
Skew-Symmetric Operator
The skew-symmetric operatior is defined as
[u]
×
= u × (u)
T
=
u
x
u
y
u
z
×
u
x
u
y
u
z
(C.1)
=
u
x
× u
x
u
y
× u
x
u
z
× u
x
u
x
× u
y
u
y
× u
y
u
z
× u
y
u
x
× u
z
u
y
× u
z
u
z
× u
z
=
0 u
z
u
y
u
z
0 u
x
u
y
u
x
0
(C.2)
such that
[u]
×
v = u × v (C.3)
with identities
[u]
×
= [u]
T
×
(C.4)
[u]
×
v = [v]
×
u (C.5)
[u + v]
×
= [u]
×
+ [v]
×
(C.6)
[u]
×
[v]
×
=
[v]
×
[u]
×
T
(C.7)
[u]
×
[v]
×
= vu
T
u
T
v
1 (C.8)
R [u]
×
v = [Ru]
×
Rv (C.9)
R [u]
×
R
T
= [Ru]
×
(C.10)
R [u]
×
[v]
×
R
T
= [Ru]
×
[Rv]
×
(C.11)
d
dt
[u]
×
v
=
du
dt
×
v + [u]
×
dv
dt
(C.12)
129
130 APPENDIX C. SKEW-SYMMETRIC OPERATOR
where (C.11) is derived in appendix C.1.
C.1 Similarity Transform over [u]x[v]x
Since we know that
[Ru]
×
= R [u]
×
R
T
(C.13)
then
[Ru]
×
[Rv]
×
= R [u]
×
R
T
R [v]
×
R
T
(C.14)
= R [u]
×
[v]
×
R
T
(C.15)
since R
T
= R
1
and R
1
R = 1 for R SO(3).
C.1.1 Longer Derivation
We begin by stating the known identity :
[u]
×
[v]
×
= vu
T
u
T
v
1. (C.16)
It follows that with R SO(3)
[Ru]
×
[Rv]
×
= Rv (Ru)
T
(Ru)
T
Rv
1 (C.17)
= Rvu
T
R
T
u
T
R
T
Rv
1 (C.18)
= Rvu
T
R
T
u
T
v
1 (C.19)
since R
T
= R
1
and R
1
R = 1. Applying a similarity transform to [u]
×
[v]
×
and reusing (C.16) we obtain
R [u]
×
[v]
×
R
T
= Rvu
T
R
T
R
u
T
v
1R
T
by linearity (C.20)
= Rvu
T
R
T
u
T
v
R1R
T
since u
T
v is scalar (C.21)
= Rvu
T
R
T
u
T
v
1 since R1R
T
= 1. (C.22)
Since (C.19) and (C.22) are equal, we can conclude that
R [u]
×
[v]
×
R
T
= [Ru]
×
[Rv]
×
(C.23)
for R SO(3).
Appendix D
Rotation Time Derivative
Assuming, just for this section that the coordinate system {b} in Fig. 3.1
rotates continuously but does not move linearly relative to {w}, and that {o}
is fixed relative to {b}. At all times, we have that
w
b
p
o
=
w
R
b
b
p
o
(D.1)
whose total time derivative is
d
dt
(
w
b
p
o
) =
d
dt
(
w
R
b
)
b
p
o
+
w
R
b
d
dt
(
b
p
o
) (D.2)
=
d
dt
(
w
R
b
)
b
p
o
(D.3)
where the second term is zero since the time derivative of the position vector
b
p
o
(i.e. the linear velocity) is assumed to be zero. Since the origin of {o} is
fixed relative to {b}, and assuming that
w
b
ω
o
is zero,
w
b
˙
p
o
=
w
b
v
o
+
w
ω
b
×
w
b
p
o
(D.4)
=
w
ω
b
×
w
b
p
o
(D.5)
gives the velocity of {o} relative to {b} due to the rotation of {b} about {w}
as in (3.5). Since (D.3) and (D.5) are both equal to
d
dt
(
w
b
p
o
), we can state
that
d
dt
(
w
R
b
)
b
p
o
=
w
ω
b
×
w
b
p
o
(D.6)
=
w
ω
b
×
w
R
b
b
p
o
(D.7)
131
132 APPENDIX D. ROTATION TIME DERIVATIVE
such that, by identification, we obtain the time derivative of a rotation matrix
(an important result) as
w
˙
R
b
=
w
ω
b
×
w
R
b
(D.8)
w
˙
R
b w
R
T
b
=
w
R
b w
˙
R
T
b
= [
w
ω
b
]
×
(D.9)
w
R
T
b w
˙
R
b
=
w
˙
R
T
b w
R
b
=
h
b
w
ω
b
i
×
(D.10)
where (C.4) was used. The total time derivative of a rotating vector is
d
dt
(
w
R
b
b
p
o
) =
w
R
b
b
˙
p
o
+
w
ω
b
×
w
b
p
o
(D.11)
where
w
ω
b
is the instantaneous angular velocity of {b} with respect to {w}
and expressed in the inertial/fixed frame {w}.
Appendix E
Inertia Tensor Derivation
The second moment of a point-mass about an axis n is
J = mp
2
(E.1)
where p
is the distance between the point-mass and the axis, given by the
component of p = [p
x
, p
y
, p
z
]
T
that is perpendicular to n = [n
x
, n
y
, n
z
]
T
. By
the additivity of vectors, we know that
p = p
+ p
. (E.2)
Also, the component of p that is parallel to n is given by the scaled projection
of p onto n with
p
=
p · n
n · n
n =
p
T
n
n
T
n
n (E.3)
where the denominator equals 1 in the case that n is a unit vector. By sub-
stituting (E.3) in (E.2), we obtain
p
= p
p
T
n
n
T
n
n (E.4)
that allows us to rewrite (E.1) into
J = mp
2
(E.5)
= m
p
T
p
(E.6)
= m
p
p
T
n
n
T
n
n
T
p
p
T
n
n
T
n
n
!
(E.7)
133
134 APPENDIX E. INERTIA TENSOR DERIVATION
If we assume that n is a unit vector and that n
T
n = 1 then
J = m
p
p
T
n
n
T
p
p
T
n
n
(E.8)
= m
p
T
p + p
T
p
T
n
n n
T
p
T
n
p + n
T
p
T
n
p
T
n
n
(E.9)
noting that p
T
n is a scalar, it can be placed in the front
= m
p
T
p +
p
T
n
p
T
n n
T
p
+
p
T
n
2
n
T
n
(E.10)
noting that p
T
n = n
T
p, the middle term can be cancelled
= m
p
T
p +
p
T
n
2
n
T
n
(E.11)
noting that n
T
n = 1, the last term can be simplified
= m
p
T
p +
p
T
n
2
(E.12)
and expanded into
= m
p
T
p + (p
T
n)(p
T
n)
(E.13)
using p
T
n = n
T
p to slightly reformulate into
= m
p
T
p + (n
T
p)(p
T
n)
(E.14)
= m
p
T
p + n
T
pp
T
n
(E.15)
We can once again rely on n
T
n = 1 and on the fact that p
T
p is a scalar to
reformulate the equation into
J = m
n
T
np
T
p + n
T
pp
T
n
(E.16)
= m
n
T
p
T
pn + n
T
pp
T
n
(E.17)
= mn
T
p
T
p1
3×3
+ pp
T
n (E.18)
which we can further simplify into
J = mn
T
[p]
×
[p]
×
n (E.19)
= mn
T
[p]
T
×
[p]
×
n (E.20)
by using identities (C.8) and (C.4) of skew-symmetric matrices. The value of
J can be interpreted as the moment of inertia about n when the point-mass
rotates around n. The vector about which the moment of inertia is computed
can be different from the one around which the point-mass rotates. Since a
Cartesian reference frame F
w
has three axes, there is a total of 3 × 3 = 9
moments that can be computed for a given point-mass with respect to F
w
.
These moments are regrouped into an inertia tensor whose ij-th element is
135
the moment of inertia about axis e
i
when the point-mass rotates around axis
e
j
. For p = [p
x
, p
y
, p
z
]
T
, we have the inertia tensor
I = m
p
2
y
+ p
2
z
p
x
p
y
p
x
p
z
p
y
p
x
p
2
x
+ p
2
z
p
y
p
z
p
z
p
x
p
z
p
y
p
2
x
+ p
2
y
(E.21)
in which the moment of inertia about axis e
i
when the point-mass rotates
around axis e
j
can be extracted with
J
ij
= e
i
· I · e
j
= e
T
i
Ie
j
. (E.22)
A change in reference frame can be performed by multiplying vectors e
i
and
e
j
by appropriate extrinsic rotation matrices such that
J
kl
= (e
i i
R
k
)
T
I(e
j j
R
l
) (E.23)
=
k
R
i
e
T
i
Ie
j
|{z}
J
ij
j
R
l
(E.24)
I
a
=
b
R
T
a
I
b b
R
a
(E.25)
where the inertia tensor I
b
computed in reference frame F
b
is related to I
a
that is computed in reference frame F
a
when F
b
=
b
R
a
F
a
. Note that (E.25)
assumes that the origin of F
a
and F
b
are coincident. For a more general
formula, see appendix F.
Since inertia is additive, the inertia tensor of a rigid body can be computed
as the sum of the inertia tensors of the point-masses that form the rigid body.
Therefore, for a rigid body of shape V R
3
with mass density ρ(p), the inertia
tensor is
I =
Z
V
[p]
T
×
[p]
×
ρ(p)dV (E.26)
whose elements depend on the choice of reference frame used in describing p.
136 APPENDIX E. INERTIA TENSOR DERIVATION
Appendix F
Expressing Inertia Tensors
in Any Frame
The inertia tensor of a rigid body expressed relative to F
c
can be computed
from the inertia tensor of the same rigid body expressed in another reference
frame F
a
, as pictured in Fig. F.1, from the equation derived in this section.
F
b
F
a
F
c
a
p
b
a
p
c
,
a
R
c
I
a
I
c
Figure F.1: Reference frame F
b
is fixed on the rigid body with the origin
located at the centre of mass. The inertia tensor expressed relative to F
c
(green) is computed from the known quantities in blue.
From (4.22) we have that
I
c
=
c
R
b
I
b b
R
c
m [
c
p
b
]
×
[
c
p
b
]
×
(F.1)
I
a
=
a
R
b
I
b b
R
a
m [
a
p
b
]
×
[
a
p
b
]
×
(F.2)
which implies that
I
b
=
b
R
a
I
a
+ m [
a
p
b
]
×
[
a
p
b
]
×
a
R
b
. (F.3)
137
138 APPENDIX F. EXPRESSING INERTIA TENSORS IN ANY FRAME
By substituting (F.3) in (F.1) we obtain
I
c
=
c
R
b
b
R
a
I
a
+ m [
a
p
b
]
×
[
a
p
b
]
×
a
R
b
b
R
c
m [
c
p
b
]
×
[
c
p
b
]
×
(F.4)
=
c
R
a
I
a
+ m [
a
p
b
]
×
[
a
p
b
]
×
a
R
c
m [
c
p
b
]
×
[
c
p
b
]
×
(F.5)
in which we can substitute
c
p
b
=
c
R
a
a
c
p
b
to get
I
c
=
c
R
a
I
a
+ m [
a
p
b
]
×
[
a
p
b
]
×
a
R
c
m [
c
R
a
a
c
p
b
]
×
[
c
R
a
a
c
p
b
]
×
. (F.6)
We then use identity (C.11) on the rightmost term to get
I
c
=
c
R
a
I
a
+ m [
a
p
b
]
×
[
a
p
b
]
×
a
R
c
m
c
R
a
[
a
c
p
b
]
×
[
a
c
p
b
]
×
a
R
c
(F.7)
which is simplified by the use of rotation’s linearity property into
I
c
=
c
R
a
I
a
+ m
[
a
p
b
]
×
[
a
p
b
]
×
[
a
c
p
b
]
×
[
a
c
p
b
]
×

a
R
c
(F.8)
in which we substitute
a
c
p
b
=
a
p
b
a
p
c
to get our final result
I
c
=
a
R
T
c
I
a
+ m
[
a
p
b
]
×
[
a
p
b
]
×
[
a
p
b
a
p
c
]
×
[
a
p
b
a
p
c
]
×

a
R
c
(F.9)
Bibliography
[1] Cheng Li, Yuanqing Wu, Harald owe, and Zexiang Li. Poe-based robot
kinematic calibration using axis configuration space and the adjoint error
model. IEEE Transactions on Robotics, 32(5):1264–1279, 2016.
139