2robotics KInematics
2robotics KInematics
This is the study of motion without regard to the forces that cause it. It refers to all
geometrical and time-based properties of motion.
Spatial Descriptions
Around a robot objects are normally
defined in terms of a frame (i.e. a set of right-
handed orthogonal coordinate axes)
known as the origin or “world frame”.
Usually, this frame coincides with the base of
one robot within a work-cell.
Positions are defined relative to the origin by using 3x1 position vectors.
To find the orientation of an object we need to consider the frame attached to the object.
16
Imagine that the object is the tip of the robot (i.e. the
tool). From the diagram opposite, a rotation of the
gripper about the ZB axis will not change the position of
the origin of the tool frame {B}. It will, however, cause
the robot fingers to rotate (i.e. the YB and XB axes will
point in different directions than those shown). Hence
an object held in the gripper will also rotate in the same
way.
So, finding the rotation of frame {B} relative to frame
{A}, this will give the orientation of frame {B} relative
to frame {A}.
Remember now that any vector v can be written in the generic form v = xi + yj + zk. So
A A A
applying this to each unit vector X B , YB , Z B , we derive at a 3x3 rotational matrix which
describes frame {B} relative to {A}. In terms of notation we have:
r11 r12 r13
A
BR =
A
A A
X B , YB , Z B r21 r22 r23
r31 r32 r33
This matrix relationship tells us what rotations we must apply so that, starting from frame
{A}, when all is done the orientation will be that of frame {B} (i.e. how we go from {A} to
{B})
Translations
Note: All we have done is to evaluate a different description of the point P in space. Nothing
else has changed in the system and certainly the point P has not moved.
17
This is a very important and is central to understanding the way translations work.
Rotations
Positive rotations about the Z, Y and X axes result in the respective rotational matrices:
:
𝑐 −𝑠 0 𝑐 0 𝑠 1 0 0
𝑅(𝑧) = [𝑠 𝑐 0] 𝑅(𝑦) = [ 0 1 0 ] 𝑅(𝑥) = [0 𝑐 −𝑠]
0 0 1 −𝑠 0 𝑐 0 𝑠 𝑐
These 3 rotations are commonly referred to as Yaw, Pitch, and Roll respectively.
First recall that the components of any vector are merely the projections of that vector onto
B
the unit vectors of its frame. Hence the problem is simply to express the vector P from
18
projections onto frame {B}, into projections onto frame {A}. This can be done using vector
dot product. Hence:
px XA P
A B B A
(i.e. the x projection of the P vector onto the {A} frame)
p y YA P
A B B A
(i.e. the y projection of the P vector onto the {A} frame)
pz ZA P
A B B A
(i.e. the z projection of the P vector onto the {A} frame)
In terms of matrix algebra this can be written in a more compact form as:
B XA
P = B YA . P
A B
B
ZA
or by using the notation we used earlier for rotational matrices we can rewrite the above
equation as:
A B T B
P = AR . P .......(1)
B T B
where A R is the transposed of the matrix A R .
From linear algebra it is known that the inverse of a matrix with orthonormal columns is
equal to its transposed. Hence:
B T B 1 A
AR = AR = BR .......(2)
Equation (2) merely states that if frame {A} is known relative to frame {B}, then frame {B}
is known relative to frame {A} through a simple rearrangement (transposition) of the
rotational matrix.
19
B
Thus we first express P in terms of the orientation of frame {A} and then we add the
A
translation vector PBorig i.e. the origin of the frame {B} relative to frame {A}. Hence:
A A A
P= B R .B P + PBorig ......(4)
Equation (4) can be written more compactly through the use of Homogeneous transforms.
The latter is a construction which enables the use of simple matrix operations to obtain the
results of equation (4) in one step. It arises out of the fact that equation (4) can be written as:
A P AB R A
PBorig B P
1 0 0 0 1 1
(5)
A A B
P = BT . P .......(6)
A B A
where P and P are the new augmented vectors, and BT is the 4x4 matrix above.
Compound Transformations
The diagram opposite indicates a case
where we know the position of P relative
to frame {C} and we require the position
of P relative to frame {A} (i.e. we need to
A
find P .
B B
C
P = CT . P ......(7)
B A
We can also transform P into P according to :
A A
P= B T.B P .......(8)
20
A A B
P= B T . CT . C P or
A A
P= C T.C P .......(9)
A
In terms of our notation so far, CT is given by the 4x4 matrix:
A
A R BR A
B R PCorig
B A
PBorig
T =B C
0 0 0
C
1
Inverse Transformations
It is often necessary to obtain inverse transformations (i.e. given that a frame {B} is known
relative to frame {A}, we may require a description of frame {A} relative to {B}). In such
cases we need to evaluate inverse transformations. One way of doing this is to compute the
inverse of a 4x4 homogeneous transform. Doing this however does not exploit the properties
of the transforms, and is computationally not simple.
A B B B
Suppose we know B T and we require to find AT . To do so we must compute A R and PAorig
A A
from B R and PBorig .
A B A A
In general we have: P = B R . P + PBorig . This is a general equation for any vector known
with respect to frame {B} and expressed in terms of frame {A}. We can use it to find the
vector of the point P which coincides with the origin of frame {B} relative to frame {B}. In
other words find the origin of frame {B} relative to itself.
B B A B
Hence PBorig = A R PBorig + PAorig
But of course the LHS of the above equation is 0. Hence the equation reduces to:
B A B
PAorig = - A R PBorig ......(10)
B A T
and since A R= BR .......(11),
B A T A
we finally have that: PAorig = - B R . PBorig .......(12)
B
BR B
PAorig
T = A
A
0 0 0 1
or, in view of (11) and (12)
B A
B RT BA R T A PBorig
A T= .......(13)
0 0 0 1
21
IMPORTANT POINT ON ROTATIONS
There are several ways to describe rotations. Typically rotations can be considered to occur
relative to stationary or fixed frames, or relative to non-stationary or moving frames.
By stationary frames we mean that all considered rotations take place about the same frame.
By contrast, in a moving frame situation, rotations are considered relative to its immediate
preceding frame in each case. In the case of stationary frames the overall result is obtained
through pre-multiplication of the individual rotational matrices, whilst in the moving frame
case the overall result is obtained through post-multiplication.
Note the order of multiplication of the above matrices (it is typical of rotations
about fixed frames, discussed later).
𝑐 0 𝑠 1 0 0
𝐵𝑅(, , ) 0 ] [0 𝑐 −𝑠]
𝐴
= [ 0 1
−𝑠 0 𝑐 0 𝑠 𝑐
𝑐 𝑠𝑠 𝑠𝑐
=[ 0 𝑐 −𝑠 ]
−𝑠 𝑐𝑠 𝑐𝑐
2. A frame {B} has been rotated relative to frame {A} about the Z axis through an angle
30 . Given that P = [0, 2, 0]T evaluate P .
0 B A
A
There is clearly no frame translation, hence PBorig = [0, 0, 0]T.
0 0
c = cos 30 = 0.866 and s = sin 30 = 0.5
22
As there are no more rotations to consider it follows that B R = R(Z, ) and we can
A
A A
use this matrix to construct BT and hence evaluate P as follows:
B A A
P = BT . P
A
It should be remembered that since BT is a 4x4 matrix, in the above equation both
A B
P and P will be in the augmented form (i.e. with an additional row of 1s), giving:
0.866 0.5 0 0 0 1
0.5 0.866 0 0 2 1732.
P 0
A
0 1 0 0 = 0
0 0 0 1 1 1
A
or P = [-1, 1.732, 0]T
3. A frame {B} is rotated relative to a frame {A} about the Z axis by = 30 and translated
0
A B
by 10 units along XA and 5 units along YA. Find P if P = [3, 7, 0]T.
Clearly,
c s 0 0.866 0.5 0
R = R(Z, ) s c 0 0.5 0.866 0
A T A
PBorig = [10, 5, 0] , and B
0 0 1 0 0 1
Hence:
0.866 0.5 0 10 3 9.098
0.5 0.866 0 5 7 12.562
P 0
A
0 1 0 0 = 0
0 0 0 1 1 1
A
or P = [9.098, 12.562, 0]T
4. A frame {B} is rotated relative to frame{A} about the Z axis by = 30 and translated by
0
B
4 units along XA and 3 units along YA. Find AT .
It is known that:
0 0
c = cos 30 = 0.866, s = sin 30 = 0.5, c= c= 0, s= s= 1.
0.866 0.5 0 4
0.5 0.866 0 3
BT
A
0 0 1 0
0 0 0 1
B
To evaluate AT we need to invert the above matrix. Following the rule we learned
on the inversion of homogeneous transforms we need to evaluate the following
result:
A RT B R . PBorig
A T A
T B
B
0, 0, 0
A
1
23
0.866 0.5 0 4.964
0.5 0.866 0 0.598
AT
B
Hence it can easily be verified that: 0 0 1 0
0 0 0 1
The result after each rotation is shown in each of the figures below:
ZB
YB XB
YB YB
XB ZB XB ZB
24
Z-Y-X Euler Angles Moving Frame arrangement.
Another possible description of a frame {B} relative to {A} is as follows:
𝑐 −𝑠 0 𝑐 0 𝑠 1 0 0
=[𝑠 𝑐 0] [ 0 1 0 ] [ 0 𝑐 −𝑠]
0 0 1 −𝑠 0 𝑐 0 𝑠 𝑐
𝑐𝑐 𝑐𝑠𝑠 − 𝑠𝑐 𝑐𝑠𝑐 + 𝑠𝑠
= [𝑠𝑐 𝑠𝑠𝑠 + 𝑐𝑐 𝑠𝑠𝑐 − 𝑐𝑠] ....... (15)
−𝑠 𝑐𝑠 𝑐𝑐
𝒁′𝑩
𝒀′𝑩 𝒀"𝑩
𝒁′′′ 𝒀′′′
𝑩
𝑩
𝑿′𝑩 𝒁"𝑩
𝑿"𝑩 𝑿′′′
𝑩
After 900 about ZB After 900 about 𝒀′𝑩 After 900 about 𝑿′′
𝑩
Note: Even though we started from the same initial position as in the previous case, the
rotations resulted in a completely different output. This is because the order of the rotations
is different. (Mathematically: matrices do not commute i.e. the order they appear is
important)
25
Z-Y-Z Euler Angle - moving frame arrangement
Another possible description of a frame {B} often used to position robots in space is the
following:
c s 0 c 0 s c s 0
s c 0 0 1 0 s c 0
0 0 1 s 0 c 0 0 1
ccc ss ccs sc cs
scc cs scs cc ss ....(16)
sc s s c
It is interesting that in this case the X axis is not used at all. Instead the Z axis takes up this
role in the description.
Even then there are nine equations and only three unknowns. So here is how it is done:
EXAMPLES
1. In the case of Z-Y-X rotation about fixed axes in equation (14), we can solve for angle
by finding the arctangent of r12 over r11 (also using equation 17). For the angle we
can find the arctangent of r32 over r33, provided cos0.
26
The angle can be found by first taking the square root of the sum of the squares of
r11 and r12 in order to find cos, and then finding the arc tangent of r13 over the
computed cosine. Thus:
Atan2 (-r12, r11)*
Atan2(-r23, r33)
Atan2(r13, √𝑟112 2
+ 𝑟12 )
In case = 90 then the solution degenerates and we can only evaluate the sum
0
or the difference of and . In such cases we normally set select 0 (or some
other known value).
= 90
0
Hence:
0
= Atan2(r32, r22).
2. The case for Z-Y-X Euler angles is similar but note that the rotations are performed
in different order and that they are also interpreted differently. In this case we do as
above but use equation (15) and the appropriate elements of the matrix which ensues.
3. To conclude the case we will also examine the situation for the Z-Y-Z Euler angle
using equation (16) in conjunction with the generic equation (17).
The last equation always provides a solution in the range of 0 180 .
0 0
Once again, when = 0 or 180 the solution degenerates and we can only evaluate
0
the sum or the difference of and . In such cases we normally set select 0 (or
some other known value). Hence:
= 0 = 180
0
0 0
= Atan2(-r12, r11) = Atan2(-r11, -r12)
*
Atan2(y/x) evaluates tan -1(y/x), but also uses the signs of x and y to evaluate the quadrant of the resulting
angle. For example Atan2(- 22 , - 22 ) = 135 , but Atan2( 2 2
0 0
27
ROTATIONS ABOUT ARBITRARY AXES
If a rotation is not performed about a principal axis (X, Y, or Z) but it is instead performed
about a generalised arbitrary axis r (also called the equivalent axis) through an angle we
need to find the equivalent rotational matrix.
In
engineering we often change the problem to one we already know how to solve.
To perform the rotation, we first align the arbitrary axis r with the principal z-axis, perform
the rotation , and return the arbitrary axis r back to its former position by reversing the
rotations. Hence looking at the diagram it is evident that in order to find the equivalent
rotational matrix needed to:
Overall, also using pre-multiplication since we have fixed axes, it can be shown that:
R( r , ) = R (x, -R(y, )R(z, )R(y, -),R(x, )
A
or,
rx2 v c rx ry v rz s rx rz v ry s
R( r , ) = rx ry v rz s ry2 v c ry rz v rx s
A
........(18)
rx rz v ry s ry rz v rx s rz v c
2
A
where v = 1 - cosand r = [rx, ry, rz]T
28
ROBOTS LINKS AND JOINTS
Robot arms are essentially made up of chains of links. In controlling robots we need to
know the positions of the links relative to one another. To do so we need to examine certain
parameters associated with the physical design of robots.
Kinematic Parameters
The position and orientation of two successive links is specified by two joint parameters.
k is the joint angle (or rotation). It is the
rotation needed (about the Zk-1 axis) to
make axis Xk-1 parallel to Xk. (Variable
for a revolute joint).
The position and orientation between two successive joints is specified by two link
parameters.
29
1. Number of joints from 1 to n starting with the base and ending with the robot tool (yaw,
pitch, and roll axes in this order).
2. Assign a right-handed frame {F0} to the base of the robot, aligning Z0 with the axis of
joint 1. Set k = 1.
4. Locate origin of {Fk} at the intersection of Zk and Zk-1 axes. If they do not intersect, use
the intersection of Zk with a common normal between Zk and Zk-1.
Select Xk to be orthogonal to both Zk and Zk-1. If Zk is parallel with Zk-1point Xk away
from Zk-1
7. Set the origin of {Fn} at the tool point. Align Zk with the vector pointing away from the
tool and in the same direction as the fingers. Select Yk and Xk to form a right-handed
orthogonal frame, (infinite number of solutions).
8. Find parameters dk, kk, k for 1 k n, and tabulate.
9. Evaluate the transformation matrices which link successive frames (i.e. how a frame is
positioned and oriented relative to another).
To find the transformation matrices we use a generic procedure which consists of two
rotations and two translations and involves the parameters of the links and joints that we have
seen so far. The result is a representation known as the Denavit-Hartenberg (D-H) - first
proposed in 1955.
c k s k 0 0 1 0 0 0 1 0 0 k 1 0 0 0
s c k 0 0 0 1 0 0 0 1 0 0 0 c k s k 0
= k
0 0 1 0 0 0 1 d k 0 0 1 0 0 s k c k 0
0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1
c k c k s k s k s k k c k
s c k c k s k c k k s k
= k (19)
0 s k c k dk
0 0 0 1
The order of multiplication of the matrices is indicative of how we progress from frame {Fk-
1
} to frame {Fk} (i.e the procedure describes frame {Fk} relative to {Fk-1}). The procedure
should be studied in conjunction with the preceding diagrams. The substitution of the
corresponding link and joint parameters produces the final results for successive co-ordinate
frames.
30
What does the D-H representation mean?
This representation contains all the information required for a robot arm to position and orient
itself in order to manipulate objects within its environment. Equation (19) may be written in
the following form:
c k c k s k s k s k k c k n x sx ax px
s c k c k s k c k k s k n y sy ay p y n s a p
k 1 k
p z 0 0 0 1
T = = =
0 s k c k d k n z
k
sz az
0 0 0 1 0 0 0 1
31
The matrix shows that:
1. The normal vector (first column) has only one component which is in the opposite
direction of the reference z0 axis (from the diagram the x6 axis points in the opposite
direction as the z0 axis). The x6 axis is the normal vector.
2. The sliding vector (middle column) has only one component which is in the opposite
direction of the reference x0 axis. The y6 is the sliding vector.
3. The approach vector a (third column) has only one component (two of the three elements
are 0) which is in the same direction as the reference y0 axis (from the diagram the z6 axis
points in the same direction as the y0 axis).
32
EXAMPLES
ALPHA II
Consider the ALPHA II robot shown in the diagram. The representation of its frames for all
the joints are also displayed.
33
We can now evaluate the transforms required to express the end-effector of the robot relative
to its base. To do this, we substitute the above values into equation (19) for each of the axes
of the robot. The result is as shown next:
c1 0 - s 1 0 c 2 - s 2 0 2 c 2
s 0 c1 0 s c 2 0 2 s 2
0
T = 1 , 1
T = 2 ,
1
0 -1 0 d1
2
0 0 1 0
0 0 0 1 0 0 0 1
Clearly then 5T 1T.2 T. 3T. 4 T. 5 T is the matrix that describes the position and orientation of
0 0 1 2 3 4
the end-effector (or tool) relative to the base. Such a matrix is also known as the arm matrix.
Note that:
3T 1T.2 T. 3 T is the matrix which describes the position and orientation of the wrist
0 0 1 2
T 4T. 5 T is the matrix which describes the position and orientation of the end-effector
3 3 4
5
relative to the wrist of the robot.
It is possible then, at any given time t, to evaluate the relative position of the links of the
robot if we know the variables d and .
In the general case distinction is not made between revolute and prismatic joints, and both
variables and d are represented by the variable q. When the joint happens to be revolute,
q represents , whilst in the case of a prismatic joint q will represent d.
34
RHINO XR3
Using the same procedure as for the previous example, the axes
can be assigned as shown in the diagram below.
This assignment enables the tabulation of the kinematic
parameters in the correct order. This, in turn, helps to find the
matrices needed to establish the relative position of the links.
35
c1 0 - s1 0 c 2 - s 2 0 2 c 2
s 0 c 0 s c 2 0 2s 2
0
T = 1 1 , 1
T = 2 ,
0 -1 0 d1 0 0
1 2
0 1
0 0 0 1 0 0 0 1
1) At time, t1, the robot angles , and are receptively 600, 300 and 450. Evaluate the
transform that describes the position of the wrist relative to the base (use the ALPHA II
parameters for your calculations).
Solution
The task requires to know 3T 1T.2 T. 3T. This is obtained as shown:
0 0 1 2
2) If the above relationship is given, find the value of 2 if 1 = 600 and = 450.
Solution
Known Required
2T, 2
0 0 2 1
3T, 1T, 3T
T 1T.2 T. 3T
0 0 1 2
It is known that: 3 .....(1)
1 0 1
Rearranging the equation we have: 1T . 3T. 3T 2T
0 2 1
.....(2)
but since 01T 1 10T and 23T 1 32T , (2) becomes:
T 0T. 3T. 2 T
1 1 0 3
2 .....(3)
36
Final substitution of the known values produces the result:
Finally from elements r11 and r21 of the matrix above it can be verified that θ2 = 300
3) The camera -robot arrangement shown in the diagram is set-up so that the camera can see
both the base of the robot and
the workspace (end-
effector and cuboid). A frame
of orthonormal axes have
been attached to the camera
as shown. The matrix T1
describes the robot’s
base as seen by the camera. If
the matrix T2 describes the
cuboid’s co-ordinate
system (attached to the centre
of the cuboid) as seen by the
camera, evaluate:
1 0 0 10 0 1 0 8
0 1 0 1 1 0 0 0.5
The two matrices are: T1 0 0 1 9 and T2 0 0 1 8
0 0 0 1 0 0 0 1
Solution
a) To find the matrix that relates the robot base to the cube, the method for compound
transformations can be used: cub T camT. cub T
r r cam
T
cam cam r r cam -1
It is known that cub T = T2 and that r T = T1 . Hence cub T. cub T = T1 . T2
cam
1 0 0 10 0 1 0 8 0 1 0 2
1 0 1 0 1 1 0 0 0.5 1 0 .
0 15
cubT = T1 . T2 0 9 0 0 1 8 0 0
r
0 1 1 1
0 0 0 1 0 0 0 1 0 0 0 1
37
The distance between the robot base and the cuboid co-ordinate frame is given as:
d = p 2x p 2y p 2z ( 2)2 (15
. ) (1) 2.693
2 2
i j k i j k -1
n = sx sy sz 0 1 0 = 0
ax ay a z 0 0 -1 0
For a two finger symmetrical gripper a sliding vector which is coincident and antiparallel to the y-axis of
the cuboid may also be chosen. In this case the sliding vector s would be s = [0,-1,0]T.
38
is obtained.
- 1 0 0 0
0 1 0 0
cub
T = hence,
0 0 1 0
tool
0 0 0 1
0 1 0 2 - 1 0 0 0 0 1 0 2
1 0 0 1. 5 0 1 0 0 1 0 0 1 .5
tool T = cubT. tool T
r r cub
0 0 1 1 0 0 1 0 0 0 1 1
0 0 0 1 0 0 0 1 0 0 0 1
As stated earlier, when the robot grasps the object, the robot must align its end-effector so
that the z-axis of the cuboid and the end-effector’s approach axis are coincident and
antiparallel. Also the sliding vector of the end-effector must be coincident with the y-axis of
the cuboid.
During grasping, the position of the tool frame must be the same as that of the cuboid frame.
Looking at the diagram, it should be obvious that all the above can be accomplished if:
The frame of the end-effector (originally assumed to have the same orientation as the
cuboid) is rotated by 1800 about the y-axis of the cuboid.
Which, in terms of the transformation matrix at the time of grasping, results in:
39
- 1 0 00
0 1 0 0
cub
toolT =
0 0 - 1 0
0 0 0 1
0 1 0 2 - 1 0 0 0 1 0 2
0
1 0 0 1.5 0 1 0 0 1 0 0 1.5
tool T = cubT. tool T
r r cub
0 0 1 1 0 0 1 0 0 0 1 1
0 0 0 1 0 0 0 1 0 0 0 1
40