© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2023
F. FrigeniIndustrial Robotics Controlhttps://doi.org/10.1007/978-1-4842-8989-1_2

2. Geometrical Framework

Fabrizio Frigeni1  
(1)
Shanghai, China
 

We present here the concept of frames and their operations. Frames are the geometrical foundation of robotic arms, and understanding how to handle them is an important step toward solving kinematic models. The framework we present has general validity, regardless of the robotic structure we need to solve.

Reference Frames

A frame is essentially a coordinate system with a specific position and orientation (see Figure 2-1). When describing the position of a generic point in space, we always need to do that relative to a specific frame. In other words, a point has different coordinates according to what frame we are using as reference.

A geometrical frame depicts the point F and point P. It has three axis x, y, z.

Figure 2-1

Generic frame F and point P

When working with robots, we can immediately identify a few fundamental reference frames.

The global coordinate system (or world coordinate system) defines the origin and orientation of our world. When your space includes several machines and robots, it is always important to define a unique global reference system, so that everyone understands the same global coordinates.

Each robot or machine will then have its own local coordinate system (or machine coordinate system). That is convenient when programming individual robots: other machines will not see this system and will not understand coordinates specified in this frame. Of course, if you work with only one robot, then you can let the global and local coordinate systems coincide.

An illustration of 3 robots represents the global system and the local coordinate system. It compares and differentiates with a marked line.

Figure 2-2

Global (red) vs. local (purple) reference frames

For example, the three robots in Figure 2-2 are all placed at the origin O = [0 0 0] of their local (purple) reference frames. But their positions in the global (red) frame are $$ {O}_1=left[2000kern0.5em 2000kern0.5em 0
ight] $$, $$ {O}_2=left[4000kern0.5em 2000kern0.5em 0
ight] $$, and $$ {O}_3=left[6000kern0.5em 2000kern0.5em 0
ight] $$, meaning that they are all spaced two meters apart from each other along the global X axis. We will explain later how to move from one frame to another.

The next important frame to consider is the tool coordinate system, whose origin is located at the TCP of the robot (shown in yellow in Figure 2-3). In this case, we have no tool attached to the robot, so the tool coordinate system is based at the mounting point on the sixth axis.

An illustration of a robot's tool coordinate system and the workpiece coordinate system. It compares and differentiates with a marked line.

Figure 2-3

Tool (yellow) and workpiece (blue) reference frames

Finally, the most meaningful frame for the operator is the workpiece coordinate system (shown in blue in Figure 2-3). This frame is what the robot’s operator sees and considers as the origin of its workspace: all the programmed points and movements refer to this system. It is often also called product coordinate system, and there are actually several of them in a normal working cell, because the robot performs tasks on a multitude of products, each of them having its own unique origin and orientation.

We now need to understand how to move from one frame to another one and how to transform coordinate points across different frames.

Frame Operations

Imagine we have two different observers, one based in frame F1, the other based in frame F2, and they are both looking at the same point in space. The first observer will measure the point with coordinates P1 and the second with coordinates P2 (see Figure 2-4).

Two geometric frames. It indicates F 1 and F 2, P 1 and P 2 mention x 1, y 1, z 1 and x 2 , y 2, z 2. It points out the same midpoint from two frames.

Figure 2-4

The same point seen from different frames

In the previous section, we learned that robotic applications express their target positions in several different coordinate systems. Therefore, a typical requirement is how do we find the position of that point from the perspective of frame F2 if we already know its position in frame F1?

In order to find a way to convert from P1 to P2, we need to know how the two original frames F1 and F2 are related to each other. This is where frame operations come into play.

We can translate a frame and rotate it, and we can also rotate and translate at the same time, as shown in Figure 2-5.

Two geometric frames. It indicate three axis x, y, z. It points out the curve arrow root translation of a frame.

Figure 2-5

Generic roto-translation of a frame

Frame Translations

Let’s start with translations, considering the example in Figure 2-6. We are based in frame F1 and observe the blue point. Its position from this perspective is $$ {P}_1=left[{x}_1kern0.5em {y}_1kern0.5em {z}_1
ight] $$. Let’s use some numeric values to make the understanding easier. Assume $$ {P}_1=left[1kern0.5em 1kern0.5em 0
ight] $$.

Then we move our base to a new frame F2, which is translated by an offset $$ Delta  =left[{delta}_Xkern0.5em {delta}_Ykern0.5em {delta}_Z
ight] $$. The same blue point seen from this perspective has a different position, which we call $$ {P}_2=left[{x}_2kern0.5em {y}_2kern0.5em {z}_2
ight] $$. Make sure you understand the meaning of this operation here: the physical point in space (the blue point) is absolutely the same, regardless of the observation frame, and has not moved. However, our observation base has moved, so the point’s coordinates in our new frame (P2) are different than those in the old frame (P1).

Two geometric frames. It indicates F 1, F 2, and P1, P2 with three axes x, y, z. It points out the frame translation with a marked line delta.

Figure 2-6

Frame translation

Translation is a linear operation and the formula is very simple: P2 = ∆ + P1.

Keep in mind that we are now basing our observation point in frame F2, so the value of the offsetis also measured from the F2 frame’s perspective. In other words, the offset ∆ expresses how the old frame F1 is seen from the new frame F2. To continue our numerical example, let’s use $$ Delta  =left[0kern0.5em -10kern0.5em 0
ight] $$, i.e., a negative offset along the Y axis.

Intuitively, you can think as starting from the origin of F2, first moving back to the origin of F1, and then from there to P1.

Breaking up for each coordinate gives the system of linear equations:
$$ left{egin{array}{c}{x}_2={x}_1+{delta}_X\ {}{y}_2={y}_1+{delta}_Y\ {}{z}_2={z}_1+{delta}_Zend{array}
ight. $$
(2-1)

Numerically, if the original point was $$ {P}_1=left[1kern0.5em 1kern0.5em 0
ight] $$ and the translation offset is $$ Delta  =left[0kern0.5em -10kern0.5em 0
ight] $$, then we can calculate the new point coordinates as $$ {P}_2=left[1kern0.5em -9kern0.5em 0
ight] $$, which can be easily verified in Figure 2-6.

Frame Rotations

Rotations are a bit more complicated than translations: they are not linear operations.

Four geometric frames. It indicates three axes x, y, z. It points out the rotation of the original frame around axes with a marked arrow.

Figure 2-7

Rotating the original frame around its X, Y, and Z axes

In order to calculate the coordinates of a point after a rotation of the observation frame, we need to pre-multiply the original coordinates by a so-called rotation matrix R, which is built according to the axis around which the frame rotates, and the angle of rotation θ:
$$ {P}_2=Rleft(	heta 
ight){P}_1 $$
(2-2)
Let’s start with some simple examples shown in Figure 2-7. If we rotate around the X axis by an angle θ, the rotation matrix assumes the following form:
$$ {R}_Xleft(	heta 
ight)=left[egin{array}{ccc}1& 0& 0\ {}0& cos 	heta & -sin 	heta \ {}0& sin 	heta & cos 	heta end{array}
ight] $$
(2-3)

Note that we have cosines on the diagonal and sines outside of it. That is not a coincidence, because the rotation matrix reduces to the identity matrix when the angle of rotation is zero: the cosines on the diagonal are equal to 1, and the rest is 0. In other words, no rotation occurs, and clearly the final position is the same as where we started.

Similar matrices can be derived for rotations around the Y and Z axes:
$$ {R}_Yleft(	heta 
ight)=left[egin{array}{ccc}cos 	heta & 0& sin 	heta \ {}0& 1& 0\ {}-sin 	heta & 0& cos 	heta end{array}
ight] $$
(2-4)
$$ {R}_Zleft(	heta 
ight)=left[egin{array}{ccc}cos 	heta & -sin 	heta & 0\ {}sin 	heta & cos 	heta & 0\ {}0& 0& 1end{array}
ight] $$
(2-5)
In all cases, a rotation of zero degrees is equivalent to the identity matrix:
$$ Rleft(	heta =0
ight)=left[egin{array}{ccc}1& 0& 0\ {}0& 1& 0\ {}0& 0& 1end{array}
ight]equiv I $$
(2-6)
Another property we can immediately notice is that by transposing a rotation matrix, we find the same matrix but with an opposite rotation angle. Geometrically, that is equivalent to a rotation in the opposite direction.
$$ Rleft(-	heta 
ight)equiv {R}^T $$
(2-7)
The direction of the rotation angle can be positive or negative. In this book, we follow the right-hand rule: if we align our right thumb along the axis of rotation, the movement of the other fingers closing on the hand’s palm shows the positive direction of rotation (see Figure 2-8).

An illustration displays the right hand thumb sign with a marked arrow. It mentions the positive rotation angle.

Figure 2-8

We use the right-hand rule to define a positive rotation angle

Let’s look at the numerical example shown in Figure 2-9 to clarify. We start with a point P1 with coordinates $$ {P}_1=left[1kern0.5em 1kern0.5em 0
ight] $$ in frame F1. We then rotate the frame around the vertical Z axis by an angle of 90 degrees.

A geometric frame depicts a frame rotation of 90 degrees. It indicates F 1, F 2, P1 with three axes x, y, z. It mentions z from F 1 to F 2 with a marked arrows.

Figure 2-9

Frame rotation of 90 degrees around Z from F1 to F2

Note that the rotation angle expresses how the old frame is seen from the new frame. Just like we defined the offset in case of translations, we express the rotation angle in the new frame coordinates. Therefore, in this case, we actually have θ =  − 90.

The rotation matrix for rotations around the Z axis was shown in Equation (2-5). If we plug the −90 degrees ($$ -frac{pi }{2} $$ radians) rotation angle in that matrix and multiply it by the old position P1, we find the new P2:
$$ {P}_2={R}_Zleft(-frac{pi }{2}
ight){P}_1=left[egin{array}{ccc}mathit{cos}-frac{pi }{2}& -mathit{sin}-frac{pi }{2}& 0\ {}mathit{sin}-frac{pi }{2}& mathit{cos}-frac{pi }{2}& 0\ {}0& 0& 1end{array}
ight]left[egin{array}{c}1\ {}1\ {}0end{array}
ight]=left[egin{array}{ccc}0& 1& 0\ {}-1& 0& 0\ {}0& 0& 1end{array}
ight]left[egin{array}{c}1\ {}1\ {}0end{array}
ight]=left[egin{array}{c}1\ {}-1\ {}0end{array}
ight] $$
(2-8)

If you look at the blue point from the perspective of the green rotated frame in Figure 2-9, you can verify that the calculated values are correct. For example, the position along the Y axis is now negative.

Properties of a Rotation Matrix

A generic rotation matrix has some nice properties that are worth exploring here before we move on with frame operations.

Most and foremost the rotation matrix is an orthogonal matrix. We do not need to understand all the details of orthogonal matrices, but we can list here some important results:
  • Given an orthogonal matrix R, its transpose is equal to its inverse:

$$ {R}^T={R}^{-1} $$
(2-9)
We will see that this property simplifies some of our calculations tremendously, because transposing a matrix is an immediate operation, while inverting it can be a lot of work.
  • The determinant of an orthogonal matrix is always ±1.

$$ left|R
ight|=pm 1 $$
(2-10)
In particular, a rotation matrix is an orthogonal matrix with determinant equal to +1. This property makes convenient to check whether the matrix we are working with is a correct rotation matrix. If the determinant is not 1, then the matrix is not a rotational matrix and cannot be used to describe rotations. However, the opposite is not true: there are many other matrices with determinant equal to 1 that are also not rotational.
  • The product of two rotation matrices is still a rotation matrix. This property is very helpful when dealing with multiple rotations as we will see in the next section. For example, if we want to rotate around the X and Y axes, we simply multiply the two matrices RX and RY to find the matrix for the entire rotation:

$$ {R}_Y{R}_X={R}_{YX} $$
(2-11)
  • Products between rotation matrices are associative, so you can simplify your calculations grouping them as it fits best:

$$ {R}_{ZYX}={R}_Z{R}_Y{R}_X=left({R}_Z{R}_Y
ight){R}_X={R}_Zleft({R}_Y{R}_X
ight) $$
(2-12)
  • However, the product is not commutative! This is a very important property, and it physically means that rotating around Z first and then X is not the same as rotating around X first and then Z:

$$ {R}_{ZX}
e {R}_{XZ} $$
(2-13)

The rule is simple: adding a new rotation requires pre-multiplying the existing matrix by the new rotation matrix.

Composing Rotations: Euler Angles

So far, we have looked at rotations around a single axis. If we want to describe a more general rotation in space, we need to combine individual rotations into a multi-axis one.

Mathematically, the combination of two consecutive rotations can simply be expressed by the product of the two rotation matrices. In the most general case, a frame can be rotated in space around three axes, so we use the product between three individual matrices.

We pick the base X-Y-Z axes as references and generate a rotation matrix R as the product of the three individual rotations around the X-Y-Z axes by the angles A-B-C, respectively:
$$ R={R}_Z(C) {R}_Y(B) {R}_X(A) $$
(2-14)

That means, we first rotate of an angle A around the X axis, then by an angle B around Y, and finally by an angle C around Z. The angles [A, B, C] are called Euler angles.

If you think about it, we could have selected a different order or even different combinations of rotation axes: X-Z-Y, or Z-X-Z, or many others. Those are all different valid ways of expressing a generic rotation in space. They all represent the same rotation but using different values because of the different reference system.

The particular choice we made is probably the simplest to understand, especially for operators in factories who have to program the target poses for the robot: they see the fixed base coordinate system X-Y-Z and understand A-B-C rotations to be around those axes.

The angles A-B-C in the particular notation we chose (around the base X-Y-Z axes) are called improper Euler angles, also known as Cardan or RPY angles (from the roll-pitch-yaw angles used in aerospace).

What is important to understand is that no matter what notation we choose, Euler angles can always represent any rotation in space with only three values. That is a major advantage in terms of convenience.

Equivalently, given any rotation matrix, we can always decompose it in three Euler angles.

From a computational point of view, composing a generic rotation matrix given three Euler angles is a very straightforward multiplication as we saw in Equation (2-14). However, decomposing the matrix into individual Euler angles is not always so easy. We will see in the next section how to do that.

Decomposing a Rotation Matrix

Imagine we have a rotation matrix, which describes a specific rotation in space. We now want to find out the corresponding Euler angles required to achieve that rotation. This operation is calling decomposition of the matrix and is used often in the control software of a robot.

A typical application is finding the wrist axes of a six-axes robot when solving its inverse kinematic function.

Keep in mind that the result of the decomposition depends on the specific notation of angles we choose. In this paragraph, we continue with the choice of A-B-C Euler angles around the base X-Y-Z axes. The wrist joints of a six-axes robot rotate around a different set of axes (X-Y-X), so the choice of notation will be different in that case. The underlying concept is identical in all cases.

Given our chosen notation, a generic rotation in space is given by the product of the three generic rotation matrices around the base axes. We start with RX(A) (a rotation of an angle A around the X axis), then pre-multiply by RY(B), and finally by RZ(C):
$$ R={R}_Z(C) {R}_Y(B) {R}_X(A)=left[egin{array}{ccc}{c}_z{c}_y& {c}_z{s}_y{s}_x-{s}_z{c}_x& {s}_z{s}_x+{c}_z{s}_y{c}_x\ {}{s}_z{c}_y& {c}_z{c}_x+{s}_z{s}_y{s}_x& {s}_z{s}_y{c}_x-{c}_z{s}_x\ {}-{s}_y& {c}_y{s}_x& {c}_y{c}_xend{array}
ight] $$
(2-15)

The matrix looks complicated, and to simplify the notation, we expressed individual sines and cosines elements with more compact symbols. For example, sy is the sine of the rotation angle around the Y axis: that is, the sine of B, in our case.

To directly address each element of the matrix, we use the symbol Rij, where i and j are the row and column of the element.

Extracting the A-B-C angles from the rotation matrix works by small individual steps.

First, we look at the element in the third row and first column: R31 =  − sy. That is, the sine of B is already given, so we can quickly derive B. From a programming point of view, instead of taking the arcsine of that value, it is numerically more stable to use the arctangent function, which works well even for values of B close to zero.
$$ B= atan2left(-{R}_{31},pm sqrt{1-{left({R}_{31}
ight)}^2}
ight) $$
(2-16)

Note that we can choose two different values for the cosine of B, either positive or negative. This choice will give two possible results for the final tuple A-B-C. In other words, we can reach the same global rotation with different individual rotations around the base axes. Euler angles are not unique!

Once we know the value of B, we can find the rotation A around the X axis from the elements on the third row of the matrix:
$$ A= atan2left(pm {R}_{32},pm {R}_{33}
ight) $$
(2-17)
Similarly, we can use the elements on the first column to find the angle C of rotation around the Z axis:
$$ 	extrm{C}kern0.5em = atan2left(pm {R}_{21},pm {R}_{11}
ight) $$
(2-18)

Notice again how the final values of both A and C are affected by the choice of sign we initially made for B.

You might have noticed already the presence of a particular case: if B is ±90 degrees, its cosine becomes 0 and the matrix simplifies:
$$ R=left[egin{array}{ccc}0& pm {c}_z{s}_x-{s}_z{c}_x& {s}_z{s}_xpm {c}_z{c}_x\ {}0& {c}_z{c}_xpm {s}_z{s}_x& pm {s}_z{c}_x-{c}_z{s}_x\ {}mp 1& 0& 0end{array}
ight] $$
(2-19)
This special case actually complicates calculations, because A and C are not linearly independent any more. We are facing a so-called singularity, a particular configuration, for which an infinite number of solutions exist. We can only compute the sum or difference of A and C, but not their individual values.
$$ left{egin{array}{c}A-C= atan2left({R}_{12},{R}_{22}
ight)kern1em 	extsf{for} {s}_y=1\ {}A+C= atan2left({R}_{12},-{R}_{22}
ight)kern1em 	extsf{for} {s}_y=-1end{array}
ight. $$
(2-20)

The practical way to solve this system is fixing an arbitrary value for one of the two angles (e.g., A = 0) and then derive the other one.

The physical meaning of a singular rotation matrix is that we can select from an infinite number of possible rotations around the individual axes to reach the final desired orientation. The best solution to select is usually determined by the movement’s actual conditions, as we will see in Chapter 5 when studying path-planning.

Note that we decomposed a rotation matrix into the A-B-C angles of rotations around the X-Y-Z axes of the fixed base frame. In case you want to decompose the same matrix into other Euler angles notations, you proceed in a very similar way, but use a different initial composition of rotation matrices.

Column Vectors

Understanding the target rotation given a tuple of Euler angles can usually be done intuitively by visualizing the combination of the three individual rotations around the selected reference axes. On the other hand, a rotation matrix looks too abstract to visualize in practice.

That is actually not the case after we present an interesting property here: the column vectors of a rotation matrix represent the axes of the old frame (before the rotation) as seen from the new frame (after the rotation).

In order to demonstrate this property, we recall that the rotation between two frames can be expressed by pre-multiplying the old frame by the rotation matrix.

Two geometric frames. It indicates F 1, and F 2 with three axes. It points out the rotation from old frame to new frame and mentions that F 2 equals R F 1.

Figure 2-10

Rotation from the old frame F1 to the new frame F2. The X axis of F1 is highlighted in red

Let’s observe Figure 2-10 as reference. The X axis of the old frame F1 is highlighted in red. Its coordinates in the F1 frame are $$ X=left[1kern0.5em 0kern0.5em 0
ight] $$. Now, if we want to find out the coordinates of that same vector as seen from the new frame F2, we need to pre-multiply that vector by the rotation matrix R. It is easy to see that the result is exactly the first column vector of the rotation matrix itself.
$$ RX=left[egin{array}{ccc}{R}_{11}& {R}_{12}& {R}_{13}\ {}egin{array}{c}{R}_{21}\ {}{R}_{31}end{array}& egin{array}{c}{R}_{22}\ {}{R}_{32}end{array}& egin{array}{c}{R}_{23}\ {}{R}_{33}end{array}end{array}
ight]left[egin{array}{c}1\ {}0\ {}0end{array}
ight]=left[egin{array}{c}{R}_{11}\ {}{R}_{21}\ {}{R}_{31}end{array}
ight] $$
(2-21)

Similarly, we can proceed for the Y and Z axis and find the second and third columns of the matrix.

This property provides a very simple way to build a rotation matrix in practice, if we know the vector axes of a frame with respect to another one. A typical example is when a robot’s operator wants to find out what rotation a workpiece has with respect to the base of the robot: that is, the rotation between the workpiece coordinate system and the local coordinate system, as described in the Reference Frames Section. The operator can position the TCP of the robot on two points along each axis of the workpiece in order to let the system identify the axes vectors and from there immediately build the rotation matrix without any further calculation. The details are explained in Cell Calibration Section in Chapter 10 where we talk about calibrating frames in a working cell.

Expressing Rotations

So far, we have seen two alternative ways of expressing a general rotation in space: a 3x3 rotation matrix and a three-tuple of Euler angles. We have also seen how to convert back and forth from one representation to the other.

Both choices have their strengths and weaknesses:
  • Simplicity: Euler angles are very simple to understand because they can represent a generic rotation with only three angles. Rotation matrices are large and complicated: they need nine elements to represent a single rotation, and they are not at all intuitive. Not to mention that they are computationally much more expensive.

  • Uniqueness: Euler angles are not uniquely defined as there are 12 different kinds of possible notations. Also, they do not provide unique solutions: many combinations of Euler angles can represent the same rotation in space. In the worst case, an infinite number of solutions are possible, as we have seen when decomposing a rotation matrix around a singularity. All that can be confusing. Rotation matrices, on the other hand, are unique.

  • Interpolation: The operation of smoothly moving from one starting point to a final target point is called interpolation. We will describe the details in Chapter 5, but we anticipate here that Euler angles do not interpolate linearly. If our robot starts from a rotation and wants to reach another target rotation, we cannot simply take the Euler angles and linearly move them from start to end, like we would do for positions. The resulting movement could look totally random and wrong to an external observer. Rotation matrices are even worse: there is no practical way to interpolate between two matrices directly.

Actually, there is also other way to express rotations that we have not introduced yet: quaternions. We will present them in Chapter 5. Quaternions are somewhat in between Euler angles and rotation matrices, and they are actually the only choice when it comes to interpolations.

So, the question is which representation do we pick when developing our control software? Well, we need all of them really. Since Euler angles are simpler to understand, we normally use them for the interface to the operator (e.g., for visualization purposes). Internally, we use quaternions for interpolations (e.g., for path-planning operations) and rotation matrices for all frame operations (e.g., for kinematic transformations).

Combining Translations and Rotations

We have first studied translations of frames and then rotations, and now we need to put them together into one individual operation to derive the most generic transformation of a frame into another.

For that purpose, we introduce a tool called homogeneous matrix: a matrix T, which combines a rotation matrix R and a translation offset Δ into a single transformation. The resulting combination is a 4x4 matrix, filled with zeros under the rotation matrix and with a 1 under the translational offset.
$$ T=left[egin{array}{cc}oldsymbol{R}& Delta \ {}	extbf{0}& 1end{array}
ight]=left[egin{array}{cccc}{R}_{11}& {R}_{12}& {R}_{13}& {delta}_X\ {}{R}_{21}& {R}_{22}& {R}_{23}& {delta}_Y\ {}{R}_{31}& {R}_{32}& {R}_{33}& {delta}_Z\ {}0& 0& 0& 1end{array}
ight] $$
(2-22)

Joining the two operations together means that with a single matrix multiplication, we can perform both translation and rotation of a frame at the same time.

For example, if we want to rotate around the Z axis by θ and then translate along the Y axis by δY, we can use the following matrix:
$$ T=left[egin{array}{cccc}mathit{cos}	heta & -mathit{sin}	heta & 0& 0\ {}mathit{sin}	heta & mathit{cos}	heta & 0& {delta}_Y\ {}0& 0& 1& 0\ {}0& 0& 0& 1end{array}
ight] $$
(2-23)
It is critical to remember that the order is not commutative: when moving from the old frame to a new one, we first rotate and then translate. If we would first translate and then rotate, the result would be totally different (see Figure 2-11).

Three geometric frames. It indicates translate and rotate with three axes, X, Y, and Z. It points out the non commutative rotate and translate frame along with the marked line.

Figure 2-11

Roto-translations are not commutative!

Also critical is to remember that the values of the offset and rotation angles are to be expressed as seen from the new frame coordinates.

The homogeneous matrix is a powerful tool to express generic transformation between frames. Actually, as far as industrial robots are concerned, this tool is all we need to derive geometrical models of mechanical structures.

Using it in practice is very simple. The typical application is shown in Figure 2-12: we have a unique point in space described by the coordinates P1 in an old frame F1 and P2 in a new frame F2; we know the value of P1, and we know the transformation matrix T21 between F1 and F2; the question is how to find P2.

Two geometric frames. It indicates F 1, F 2, and P1, P2 with three axes. It points out the transformation T 2 1 with marked line.

Figure 2-12

Applying the homogeneous transformation T21

The answer is P2 = T21 P1. Just like we used to pre-multiply by a rotation matrix to account for a frame rotation, now we pre-multiply by the entire homogeneous matrix to account for a frame rotation and translation combined.

Moving from the old F1 to the new F2, we first rotate and then translate. The angle and offset values are measured as seen by the new frame F2.

Note that because the homogeneous matrix is a 4x4 matrix, while a Cartesian point only has three coordinates, we also need to express the point in homogeneous coordinates, by padding its vector with a 1 at the end.
$$ {P}_2={T}_{21} {P}_1=left[egin{array}{cccc}{R}_{11}& {R}_{12}& {R}_{13}& {delta}_X\ {}{R}_{21}& {R}_{22}& {R}_{23}& {delta}_Y\ {}{R}_{31}& {R}_{32}& {R}_{33}& {delta}_Z\ {}0& 0& 0& 1end{array}
ight]left[egin{array}{c}{x}_1\ {}{y}_1\ {}{z}_1\ {}1end{array}
ight] $$
(2-24)
Solving the product gives the following solution for P2:
$$ {P}_2=left{egin{array}{c}{x}_2={R}_{11}{x}_1+{R}_{12}{y}_1+{R}_{13}{z}_1+{delta}_X\ {}{y}_2={R}_{21}{x}_1+{R}_{22}{y}_1+{R}_{23}{z}_1+{delta}_Y\ {}{z}_2={R}_{31}{x}_1+{R}_{32}{y}_1+{R}_{33}{z}_1+{delta}_Zend{array}
ight. $$
(2-25)

It is easy to verify that if the two frames only have a translation and no rotation in between, the elements along the diagonal of the rotation part will all be 1s and the elements outside the diagonal will be 0s. Then we fall back to a simple linear offset addition for the translational effects.

Similarly, if the translation offset vector is 0, then we only have the rotation elements left.

Just like rotation matrices can be chained multiplied together to express a series of rotations, also homogeneous matrices can build up a chain of multiplication to describe a series of generic frame transformations. We will use this property when solving the direct kinematics of robots. As usual, the resulting product is associative but not commutative.

Example

Let’s look at a practical example to make things a bit clearer.

Imagine we have a very simple mechanical structure with one single rotating axis, as shown in Figure 2-13.

An illustration represents a structure of a rotating joint. It indicates the l and h with marked arrows.

Figure 2-13

Simple mechanical structure with one rotating joint

The position of the TCP is indicated by the blue dot, and it moves along the black curve when the rotating axis is turning. We now want to derive the actual position of the TCP referenced to the fixed robot base frame as a function of the rotating joint angle.

We start by providing some fixed geometrical parameters: the length of the arm l and its height h.

Then we identify two frames: the mobile frame F1 and the fixed base frame F0 (see Figure 2-14). The position of the TCP as seen from the mobile frame F1 (the robot’s moving link) is actually constant. We call it P1. The position of the TCP as seen from the fixed frame F0 (the robot’s base) is moving. We call it P0.

An illustration represents a structure of a rotating joint. It identifies the two geometric frames F 1, F 0 with the three axes x, y, z. It mentions P 1 and P 0 with marked lines.

Figure 2-14

Identifying the mobile frame F1 and the fixed frame F0

In order to find P0, we need to know P1 and the transformation matrix T01 that modifies the mobile frame F1 into the fixed frame F0. The solution will then be P0 = T01 P1.

P1 is simple: the TCP position in frame F1 is fixed at [l, 0, 0].

As for the homogeneous transformations, we first take into account a rotation by an angle θ around the Z axis and then a translation along the Z axis by an offset h. Note that both θ and h are positive as seen from the fixed frame F0. However, while h is always constant, the angle θ can change all the time because it is driven by the rotating joint of the robot.
$$ {T}_{01}=left[egin{array}{cccc}mathit{cos}	heta & -mathit{sin}	heta & 0& 0\ {}mathit{sin}	heta & mathit{cos}	heta & 0& 0\ {}0& 0& 1& h\ {}0& 0& 0& 1end{array}
ight] $$
(2-26)
We can now pre-multiply P1 by the matrix T01 to find P0:
$$ {P}_0={T}_{01} {P}_1=left[egin{array}{cccc}mathit{cos}	heta & -mathit{sin}	heta & 0& 0\ {}mathit{sin}	heta & mathit{cos}	heta & 0& 0\ {}0& 0& 1& h\ {}0& 0& 0& 1end{array}
ight]left[egin{array}{c}l\ {}0\ {}0\ {}1end{array}
ight]=left[egin{array}{c} lcos	heta \ {} lsin	heta \ {}h\ {}1end{array}
ight] $$
(2-27)

The solution is $$ {P}_0=left[ lcos	heta kern0.5em lsin	heta kern0.5em h
ight] $$. These are the coordinates of the TCP as seen by an observer fixed at the base of the robot.

In such a simple example, we could have easily derived the correct answer by mere geometrical considerations. However, solving a full six-axes robot is going to be much harder, and using the homogeneous transformations is certainly more convenient.

If you have understood this example, you are a good half-way through solving the kinematic model for the six-axes robot.

Inverted Transformation

Once you are able to transform points from one frame to another, you can also quickly learn how to perform the inverse operation. Essentially, instead of finding P1 = T10 P0, we want to find P0 = T01P1 = T10−1 P1. We know $$ {T}_{10}=left[egin{array}{cc}R& Delta  \ {}0& 1end{array}
ight] $$ but we do not know how to compose T10−1.

Inverting an individual translation is as easy as simply taking the same offset in the negative direction: ∆ →  − ∆.

Inverting an individual rotation is also easy by recalling one of the properties of rotation matrices that we presented earlier in this chapter: inverting a rotation matrix is the equivalent of taking its transpose, which is an elementary operation: R → R−1 = RT.

However, when translations and rotations are combined together into a homogeneous matrix, we need to take an extra step: the reason being that the order of rotation and translation is not commutative in a frame transformation, as already stressed earlier.

Intuitively, we can proceed with the following reasoning: A rotation angle is not modified by a translation, but the direction of a translation is modified by a rotation of the frame. Therefore, when doing the operation in reverse, we can safely inverse the rotation matrix, but we cannot simply take the same offset in the negative direction. The correct solution is to take a translation offset along the rotated frame, so −∆ actually becomes −RT∆.

For a simple proof, consider the following example. We first transform a point P1 in P0 by a rotation R and a translation ∆:
$$ {P}_0=R{P}_1+Delta $$
(2-28)
Then we derive P1 as a function of P0 and observe the resulting inverted values for rotation and translation (in bold):
$$ {RP}_1={P}_0-Delta $$
$$ {P}_1={R}^{-1}left({P}_0-Delta  
ight)={R}^{-1}{P}_0-{R}^{-1}Delta $$
(2-29)
The combined expression for the inverted transformation matrix is then as follows:
$$ {T_{10}}^{-1}=left[egin{array}{cc}{R}^T& -{R}^TDelta  \ {}0& 1end{array}
ight] $$
(2-30)

Summary

This was a heavy but fundamental chapter to lay the foundations for robotics control. You have now learned the geometrical tools needed to tackle all kinematic models, including the most generic six-axes manipulator that we are going to study in the next chapters. Make sure you understand well how to combine the translations and rotations of frames into a homogeneous matrix before moving forward.

After all, the whole process of solving robotics kinematics relies on finding the position of a point (the TCP) in different frames created by the mechanical structure of joints and links, where joints introduce angular rotations, while links add offset translations.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
35.170.81.33