Beruflich Dokumente
Kultur Dokumente
requirements as to orientation of the end-effector. Reachable space is not the same than
reachable with arbitrary orientation.
Robot kinematics therefore essentially is concerned with establishing the mathematical
link between these spaces, joint space and operational space. The portion of operational
space reachable by the full joint space will be the workspace.
Two basic mathematical relationships can be defined:
1) Given the joint variables, what are the operational variables? This
mathematical function is called forward kinematics (modle
gomtrique direct in French). Forward kinematics is, in short, the position
and orientation of the robot hand (or end-effector) in function of the joint
variables.
2) Given a set of task variables, what joint variables are needed to reach them?
This function (mathematically the inverse function of the previous one) is
called inverse kinematics (modle gomtrique indirect).
Kinematics is the basis for all that follows, the dynamic model of the robot (the equations
of motion) giving accelerations, forces and torques, the specifications of the mechanical
design, control and actuator implementation. Of all these tasks, kinematics is often
mathematically the most demanding, which is also why it occupies relatively large space
in within chapter 2 of this text. The topic is so complex that entire books or lectures could
be devoted to kinematics only.
One of the difficulties in describing kinematics is the need to use different coordinate
frames, moving ones fixed to robot links or to the endeffector, and fixed ones connected
to operational space. Such multiple coordinate frames, some moving and some fixed, are
responsible for the complex notations and calculations when setting up the equations of
motion. An elegant modern way to deal with these complexities is the use of 6-D algebra
(Featherstone) for the setup of rigid body dynamics. In this lecture, time does not allow to
introduce this method, but it is recommended to search the abundant literature on the
topic before solving complex modelling problems of rigid body dynamics.
In the classical methodology used here to introduce the basic mathematical modelling,
coordinate transforms will be necessary to move from one reference frame to the other. In
this context, there are two basic situations, always to be clearly distinguished:
1) Either the coordinate frame is changed, but the situation (the object, the physical
position vector) is unchanged. This is called passive transformation
2) Or, on the opposite, an object is moved with respect to a fixed coordinate frame.
This is called active transformation.
For the rest of chapter 2.1, we will essentially deal with active transformations, i.e. unless
otherwise stated, we will express vectors in a single fixed coordinate frame. This will
help to simplify significantly mathematical treatment, as we can do without all kinds of
indices and superscripts. We will also (in chapter 2.1) leave out the time dimension, i.e.
velocities and accelerations will only be introduced from chapter 2.2. (Dynamics) on.
y
v1
P (before)
t
C
v2
P
(after)
C
x
Let the coordinates of a material point P be given by a coordinate vector v1 . After
moving the object by a translation t , the point P will have the new coordinates v2 in the
fixed reference frame:
v2 = v1 + t
(1a)
This equation thus describes an active transformation, i.e. the object is moving in a
fixed frame. For any point P of the object, the same equation (1) is valid.
Passive transformation is just the opposite: The position of the object is fixed, but it is
described in a new coordinate frame displaced from the original one. In case of a
translation of the coordinate frame, the direction of the axes stays the same, but the origin
is shifted by a translation vector t:
P!
(after)!
v2!
y!
O2!
v1!
t!
O!
(before)!1
x!
It can be seen that in this case, the equation of transformation becomes the inverse
operation as compared to equation 1a), i.e. subtraction in place of addition.
v2 = v1 t
(1b)
Rotation is more complex: A rotation axis can be defined, each of its points
characterized by zero velocity. This rotation axis can run through the solid or it can be
completely disconnected from it.
Finally, the most general motion of a solid is a combination of the two, with a velocity
component in direction of the rotation axis. This is called a screw motion, obviously a
motion in 3-dimensional space, discussed in the next subchapter.
In this sub-chapter, we first analyse only plane motions. In this case, the rotation axis
perpendicular to the plane and no screw motion is possible. The intersection of the plane
and the rotation axis is called the (instantaneous) center of rotation. Mathematically a
translation within the plane is a limit case of a rotation with center of rotation at infinity.
Let us first limit ourselves to rotations about the origin 0 of a Cartesian coordinate
system. Again, let the coordinates of a material point P be given by a coordinate vector v1
After moving the object by a rotation of angle about the origin, the point P will have
the new coordinates v2 in the fixed reference frame. This time, the equations are a found
by a trick, transforming the Cartesian coordinates into polar coordinates:
P
y
(after)
v2
x
r cos #
v1 = ! 1 # = !
" y1 $ " r sin $
x
r cos( + ) #
v2 = ! 2 # = !
y
" 2 $ " r sin( + ) $
v1
(2)
P
(before)
(3)
" cos
!
!
v2 = Rv1 where R = $
# sin
sin %
'
cos &
(5)
Exercise 1)
1a)
R(= 0) = ?
1b)
R() = ?
1c)
R()1 = ?
(6)
1d)
(7)
The rotation matrix can be interpreted as the expression of the unit vectors of the rotated
system (x2, y2) in components of the fixed system (x1, y1), in an active transformation
situation:
y1
y2
x2
x1
!
!" x 2 , y #$ = & cos
2
" sin
!
sin # & x 2 x1
'=
cos $ & x 2 y1
"
y 2 x1 #
'
y 2 y1 '
$
(8)
"
"R t % $cos
$# 0 1 '& = $ sin
# 0
sin
cos
0
tx % "c s tx %
ty ' = $ s c ty '
' $
'
1 & #0 0 1 &
(9)
with the 2x2 rotation matrix R as before and the translation vector t augmented by the
scale factor 1. The remaining two elements on the bottom left are filled with zeros.
You will immediately understand how this works by trying a pure translation of a
vector v = [vx , vy , 1]T . Remember, this is a 2-d vector with an additional scale factor 1.
This scale factor is NOT a spatial dimension (such as, later on, the z-coordinate). So, try a
pure translation (=0) by multiplying matrix (8) with vector v.
Example: Composition of translations and rotations:
Let v1 be a vector who is
1) rotated by angle 1
2) translated by t1
and then again
3) rotated bym angle 2
4) translated by t2
with the final result
giving v2 = R(1) v1 + t1
(9a)
Exercise 3a) Give the homogenous matrices for pure translation, pure rotation, identity.
3b) First translation, then rotation.
3c) Inverse motion of 3b), i.e. first rotation by then translation by t .
0%"1 0 p x %
'$
'
0'$0 1 p y ' =
1&'#$0 0 1 '&
" I p%"R 0%" I p% "R p Rp%
$
'$
'$
'=$
'
1 &
#0 1 &# 0 1� 1 & # 0
p x %"cos
'$
p y '$ sin
1 &'#$ 0
sin
cos
0
9c)
From this it can be seen, that a rotation about P can also be achieved by a rotation about
the origin and a subsequent translation by . Conversely, any combination of rotation and
translation can be expressed by a rotation about a certain point P.
Exercise
2.1.5
4a) Is the above statement entirely correct? (4b) to 4f), see exercises)
Together, this gives three parameters, two for the axis direction and one for the angle of
rotation around this axis.
Alternatively, we could consider the axis given by a vector v = [xa, ya, za]T i.e. three
parameters, defining the rotation axis and the angle of rotation around this axis. This
gives a total of four parameters. So there is an excess of one parameter: The excess
parameter is the length of the vector, which does not have any meaning for the definition
of our rotation. This length could be normalized ( ||v|| = xa2 + ya2 + za2 = 1 ), such an
additional constraint on the four parameters removes one freedom, so we are again at the
minimal number of three for the definition of a change in orientation.
Different ways to express a change of orientation in 3-D
We have just introduced a first kind of specifying change of orientation. Lets call it
Axis-Angle.
In practice many other ways to specify this information are used, so let us introduce them
here. In the context of flight dynamics, the three angles roll, pitch and yaw are used to
define orientation. They are sometimes also called Tait-Bryan angles or Bryan
Angles (George H Bryan, 1864-1928). These angles can also be used in robotics. In
French, the names of these same angles are have familiar names in the navigation
context: roulis, tangage, lacet, in German they are called Roll, Nick & Gier
Winkel. The particularity of this set of angles (again, three parameters to define an
orientation) is, that they are defined with respect to a direction of a vehicle motion, or, in
case of a robot, with respect to the approach direction.
Furthermore, they can either be defined with respect to a fixed direction independent of
the instantaneous vehicle orientation (e.g. in navigation), or with respect to body-fixed
axes (as in flight dynamics or robotics), this should be specified from the context. Be
careful not to confuse the two situations!
This leads us to a further generalization, which is linked to the work of Leonard Euler.
While Newton formulated the laws of motion for point masses, it is Leonard Euler who
clarified the dynamics of rigid bodies by generalizing the equations of motion for rigid
body dynamics. He thus had to describe the orientation of a rigid body in space. He
studied specifically the gyroscope and it is in this context that the three Euler Angles
were first introduced. They are: Precession, nutation and self-rotation. Euler being one
of the most prolific mathematician of all times, there is a large collection of Eulersomething. Orientation in space can also be represented by the Euler parameters,
which are NOT the Euler angles! We will define the Euler parameters in a short moment,
they are equivalent to the quaternions discussed a bit later. Let us first connect all this
to the 2-D rotations and give some examples.
Let us start with a straightforward generalization from 2-D (plane) kinematics to 3-D
kinematics. We have introduced previously rotation as a matrix used in the
transformation
#cos
R z = % sin
%$ 0
sin
cos
0
0&
0(
1('
Exercise 5: Give the rotation matrices Rz(), Rx() and Ry() for rotations about the z-,
x- and y- axis. Hint: Use the transform of the unit vectors ex , ey , ez as in equation (8)
with the direction cosines. It is more than useful to draw a figure for each case! Use the
direction cosine matrix as in equation (8) above.
Rx() = ?
Ry() = ?
Now for the core problem in this context. Try the following:
Exercise 6: Rotate an object a) 90 around the z-axis, then 90 around the y-axis
b) 90 around the y-axis, then 90 around the z-axis
This is done mathematically by composition of the rotations, i.e. by matrix
multiplications. What do you observe?
Exercise 7: Solve the previous question graphically, by rotating the object (a sheet with a
1 printed, to define orientation):
z!
z!
x!
y!
x!
z!
y!
x!
z!
y!
x!
y!
Can you identify the rotation axis and angle equivalent to the two rotations about the zand y-axis?
How can we find this axis in the matrix products resulting from 6a) and 6b)?
A point on the rotation axis will not be affected by the rotation. We therefore have the
identity Rv = v for any point v on the rotation axis. The rotation axis is therefore the
eigenvector of the rotation matrix corresponding to the eigenvalue 1. The angle can then
be found by projecting a transformed vector on the plane normal to the axis.
Example: Matlab command [V,d]=eig(A) gives eigenvectors in matrix V and eigenvalues
in d:
0
0 1
0.05 - 0.57i
0.05 + 0.57i
0.57
0.5 + .86i
A = 1
0 0
V = 0.47 + 0.32i
0.47 - 0.32i
0.57
d= 0
1 0
0.52 + 0.24i
0.52 - 0.24i
0.57
0.5 0.86i
0
0
1.0
! a d
#
R =# b e
# c f
"
g $
&
h &
i &
%
1
cos( ) = (tr(R) 1)
2
1
sin( ) =
( f h)2 + (g c)2 + (b d)2
2
where the trace operator tr(R) is defined as the sum of the diagonal elements of R.
" f h %
'
1 $
The rotation axis is given by
$ gc '
2sin( ) $
'
# bd &
(10)
Note that this formula breaks down for rotation angle zero! Worse, this means that
numerical condition will deteriorate as the angle approaches zero, which is physically a
completely normal situation. This behavior is undesirable for the control of robots. It will
be a strong incentive to find other representations for change of orientation than
angle/axis.
Exercise 8a): Find the direction cosine matrix (the rotation matrix) for a rotation about an
angle around the axis [0, sin(), cos()]T
Hint: Use composition of rotations around known coordinate axes.
Of course, this could be done more easily by an inverse of formula (10), i.e. by finding a
formula rotating directly a vector when rotation axis and angle are given.
Let us assume that the rotation axis k is given as a vector of length one: k=[x,y,z]T and let
the rotation angle be . Any vector v may then be transformed by decomposing it into a
component parallel to the rotation axis and a component perpendicular to it. While the
parallel component remains unchanged, the rotated perpendicular component can be
found by a combination of vector cross-product and trigonometric functions. The final
result is
! !
! !!
!
!
vrot = v cos + (k v)sin + k (kv)(1 cos )
This formula was first published by Benjamin Olinde Rodrigues, a French
mathematician who lived from 1795 to 1851. By applying this formula to the base
vectors of a coordinate system, one obtains the matrix form of the Rodriguez equation,
which gives the rotation matrix (direction cosines) from an angle-axis
representation.
Given axis k = [x,y,z]T with || k || = x2+ y2 + z2 = 1 & angle of rotation about k:
" xx
$
R = (1 cos )$ xy
$ xz
#
" 0 z y %
" 1 0 0 %
xy xz %
'
$
'
$
'
yy yz ' + cos $ 0 1 0 ' + sin $ z 0 x '
$ y x 0 '
$ 0 0 1 '
yz zz '&
#
&
#
&
(11)
with x2+ y2 + z2 = 1.
With rotation matrices we use 9 parameters for the change of orientation which are
interconnected for the three degrees of freedom of orientation. With the angle-axis
representation as introduced above, we run into problems for small rotation angles. This
why mathematicians in early 19th century where searching for a way to represent
orientation in 3-D space by an analogy of complex numbers, after Jean-Robert Argand
(1768-1822) from Geneva had popularized the complex plane allowing a very elegant
representation of plane rotation.
After many unsuccessful attempts to generalize the complex numbers with one real and
two imaginary components, William Rowan Hamilton famously succeeded in 1843 based
on work by Gauss and Euler, by introducing quaternions. It is worth noting that this work
was motivated by the representation of orientation in 3-D space.
Quaternions, Euler Parameters, Olinde-Rodriguez Parameters
While Euler Parameters (also called Rodriguez Parameters) are strictly concerned with
kinematics, quaternions have acquired a far greater significance as generalized complex
numbers. The trick in Hamiltons breakthrough is two-fold.
i2 = j2 = k2 = ijk = 1
(11a)
ij = k= ji
jk = i = kj
ki = j = ik
(11b)
(11c)
With this, we have all necessary algebraic definitions. In modern notation, the three
imaginary parts are often grouped as a 3x1 vector = [1, 2, 3]:
Q = { 0 , 1, 2, 3} ={ 0 , }
How is spatial orientation coded in quaternions?
This is where the four Euler Parameters introduced in the 18th century by Euler are used:
0 = cos(/2)
(11d)
The direction of the rotation axis is given by the vector part = [1, 2, 3]
As we use four parameters for three degrees of freedom, we may introduce a constraint. It
is essential. The constraint is that the modulus (the absolute value) of the quaternion is
equal to one (unitary quaternion):
02 + 12+ 22+ 2 = 1
(11e)
leading to
|| Q || = 1
(11f)
These rules lead to the following composition of quaternions (and therefore of rotations):
QMQL = { 0 , } { 0 , } = { 00 T ,
0 + 0 + }
(11g)
With this, we can now solve problems such as exercises 6, 7 or 8a) much more easily.
Exercise 8b) Find the rotation axes of 6 & 7 with the help of quaternions.
Finally, it is useful to have equations translating from direction cosines to quaternions
and vice-versa.
Direction cosines given in terms of the quaternion (from Sciavicco & Siciliano,
Modelling and Control of Robot Manipulators, Springer, 2000):
# 2(20 + 21) 1 2(1 2 0 3) 2(1 3 + 02)&
%
(
R = %2(12 + 03) 2(20 + 22) 1 2(2 3 01)(
%$2(13 0 2) 2( 2 3 + 01) 2(20 + 23) 1 ('
(11h)
! r r
# 11 12
R = # r21 r22
#
#" r31 r32
r13 $
&
r23 &
&
r33 &%
"
$
1$
= $
2
$
$#
1
0 =
2
%
sgn(r32 r23 ) r11 r22 r33 +1 '
'
sgn(r13 r31 ) r22 r11 r33 +1 '
sgn(r21 r12 ) r33 r22 r11 +1 ''
&
r11 + r22 + r33 +1
(11i)
With the signs of the vector component as defined above, one has to take the positive
angle when computing it from (11d) = arccos(0)
0!"#
(12)
A rotation around an axis not through the origin is is given, again as before, by translating
the object from any point P on the axis to the origin (translation by p), then rotating
around the axis now through the origin and finally translating back:
(13)
The most general motion in 3-D is not, as before, rotation around a give center. There can
also be a translational motion in the direction of the rotation axis. Therefore the general
motion in 3-D is a screw (sometimes called a twist).