Elements of Robotics pp 267291  Cite as
Kinematics of a Robotic Manipulator
Abstract
Robotic manipulators are widely used in industry. They are simpler than mobile robots in that they perform tasks in a fixed and known environment. They are more complex than mobile robots because they move in the three spatial dimensions and in the three dimensions of rotation. Using a simplified planar model of a robotic arm, the two central problems of manipulators are presented. Forward kinematics asks where the end effector of the arm will be following a sequence of rotations of the joints of the arm. Inverse kinematics asks what rotations of the joints will bring the end effector to a specified position. A rotation of a robotic manipulator is described by a rotation matrix whose elements are trigonometric functions of the angle of rotation. The rotation matrix for a planar rotation is derived followed by an overview of threedimensional rotations.
Our presentation has focused on mobile robots. Most educational robots are mobile robots and you may have encountered commercial mobile robots such as robotic vacuum cleaners. You probably have not encountered robotic manipulators, but you have seen pictures of factories that assemble electronic circuits or weld frames of cars (Fig. 1.3). The most important difference between mobile and fixed robots is the environment in which they work. A mobile robot moves within an environment that has obstacles and uneven ground, so the environment is not fully known in advance. A robotic vacuum cleaner does not ask you to give it a map of your apartment with the location of each piece of furniture, nor do you have to reprogram it whenever you move a sofa. Instead, the robot autonomously senses the layout of the apartment: the rooms and the position of the furniture. While maps and odometry are helpful in moving a robot to an approximate position, sensors must be used to precisely locate the robot within its environment.
A robotic manipulator in a factory is fixed to a stable concrete floor and its construction is robust: repeatedly issuing the same commands will move the manipulator to precisely the same position. In this chapter we present algorithms for the kinematics of manipulators: how the commands to a manipulator and the robot’s motion are related. The presentation will be in terms of an arm with two links in a plane whose joints can rotate.
Kinematic computations are performed in terms of coordinate frames. A frame is attached to each joint of the manipulator and motion is described as transformations from one frame to another by rotations and translations. Transformation of coordinate frames in twodimensions is presented in Sects. 16.3 and 16.4. Most robots manipulators are threedimensional. The mathematical treatment of 3D motion is beyond the scope of this book, but we hope to entice you to study this subject by presenting a taste of 3D rotations in Sects. 16.5 and 16.6.
16.1 Forward Kinematics
We develop the kinematics of a twodimensional robotic arm with two links, two joints and an end effector such as a gripper, a welder or a paint sprayer (Fig. 16.1). The first joint can rotate but it is mounted on a base that is fixed to a table or the floor. Link \(l_1\) connects this joint to a second joint that can move and rotate; a second link \(l_2\) connects this joint to the fixed end effector.
A twodimensional coordinate system is assigned with the first joint at (0, 0). The lengths of the two links are \(l_1\) and \(l_2\). Rotate the first joint by \(\alpha \) to move the end of the first link with the second joint to \((x',y')\). Now rotate the second joint by \(\beta \). What are the coordinates (x, y) of the end of the arm, in terms of the two constants \(l_1,l_2\) and the two parameters \(\alpha ,\beta \)?
Activity 16.1:

Program your robot so that it traces the path of the arm in Fig. 16.1: turn left \(60^{\circ }\), move forward one unit (1m or some other convenient distance), turn right \(30^{\circ }\), move forward one unit.

Measure the x and ydistances of the robot from the origin and compare them to the values computed by the equations for forward kinematics.
16.2 Inverse Kinematics
Under the assumption that \(l_2<l_1\), no sequence of rotations can position the end of the arm closer to the origin that \(l_1l_2\) and no position at a distance greater than \(l_1+l_2\) from the origin is accessible. From the figure we learn that a problem in inverse kinematics—finding commands to reach a specified point—can have zero, one or many solutions.
Suppose now that we are given a point (x, y) and we want values for \(\alpha ,\beta \) (if any exist) which will bring the arm to that point. Figure 16.5 similar to Fig. 16.2 except that the specific values are replaced by arbitrary angles and lengths.
In this simple case, it is possible to solve the forward kinematics equation to obtain formulas for the inverse kinematics. In general this is not possible so approximate numerical solutions are used.
Activity 16.2:

Use the formulas for the inverse kinematics to program your robot to move to a specified coordinate.

Measure the x and ydistances of the robot from the origin and compare them to the specified coordinates.

If your robot’s computer does not have the capability to compute the formulas, compute them offline and then input the commands to the robot.
16.3 Rotations
The motion of a robotic manipulator is described in terms of coordinate frames . Three frames are associated with the arm in Fig. 16.1: one frame is associated with the joint at the origin (which we assume is fixed to a table or the floor), a second frame is associated with the joint between the two links, and a third frame is associated with the end effector at the end of the second link.
In this section we describe how the rotational motion of a robotic arm can be mathematically modeled using rotation matrices. The links in robotic arms introduce translations: the second joint is offset by a linear distance of \(l_1\) from the first joint, and the end effector is offset by a linear distance of \(l_2\) from the second joint. The mathematical treatment of translations uses an extension of rotation matrices called homogeneous transforms.
Rotations can be confusing because a rotation matrix can have three interpretations that are described in the following subsections: rotating a vector, rotating a coordinate frame and transforming a vector from one coordinate frame to another.
16.3.1 Rotating a Vector
Activity 16.3:

Demonstrate the associativity of matrix multiplication by showing that the multiplication in Eq. 16.3 gives the same result as the multiplication in Eq. 16.2.

Compute the matrix for a rotation of \(30^{\circ }\) and show that multiplying this matrix by the matrix for a rotation of \(30^{\circ }\) gives the matrix for a rotation of \(0^{\circ }\).

Is this multiplication commutative?

Is multiplication of twodimensional rotational matrices commutative?
16.3.2 Rotating a Coordinate Frame
16.3.3 Transforming a Vector from One Coordinate Frame to Another
Suppose that the joint (with its coordinate frame) is rotated by the angle \(\theta \). The coordinates of the point relative to b remain the same, but the coordinate frame has moved so we ask: What are the coordinates \({^{a}}\!{p}{}=({^{a}}\!{x}{},{^{a}}\!{y}{})\) of the point in the coordinate frame before it was moved? In Fig. 16.8b the original frame b is shown rotated to a new position (and still shown in blue), while the coordinate frame a is in the old position of b and is shown as red dashed lines. In the previous section we asked how to transform one coordinate frame into another; here, we are asking how to transform the coordinates of a point in a frame to its coordinates in another frame.
In terms of the robotic arm: we know \(({^{b}}\!{x}{},{^{b}}\!{y}{})\), the coordinates of the tip of the end effector relative to the frame of the end effector, and we now ask for its coordinates \({^{a}}\!{p}{}=({^{a}}\!{x}{},{^{a}}\!{y}{})\) relative to the fixed base. This is important because if we know \({^{a}}\!{p}{}\), we can compute the distance and angle from the tip of the welder to the parts of the car it must now weld.
16.4 Rotating and Translating a Coordinate Frame
Activity 16.4:

Draw the diagram for a rotation of \(30^\circ \) followed by a translation of \((3,1)\).

Compute the homogeneous transform.
16.5 A Taste of ThreeDimensional Rotations
The concepts of coordinate transformations and kinematics in threedimensions are the same as in two dimensions, however, the mathematics is more complicated. Furthermore, many of us find it difficult to visualize threedimensional motion when all we are shown are twodimensional representations of threedimensional objects. In this section we give a taste of threedimensional robotics by looking at rotations in three dimensions.
16.5.1 Rotations Around the Three Axes
16.5.2 The RightHand Rule
Rotate from x to y around z,
Rotate from y to z around x,
Rotate from z to x around y.
16.5.3 Matrices for ThreeDimensional Rotations
16.5.4 Multiple Rotations
16.5.5 Euler Angles
An arbitrary rotation can be obtained by three individual rotations around the three axes, so the matrix for an arbitrary rotation can be obtained by multiplying the matrices for each single rotation. The angles of the rotations are called Euler angles. The formulas are somewhat complex and can be found in the references listed at the end of the chapter. Here we demonstrate Euler angles with an example.
Activity 16.5:

Multiply the three matrices to obtain a single matrix that directly transforms the coordinates from (1, 1, 1) to \((1,1,1)\).

Perform the same computation for other rotations, changing the sequence of the axes and the angles of rotation.
16.5.6 The Number of Distinct Euler Angle Rotations
There are three axes so there should be \(3^3=27\) sequences of Euler angles. However, there is no point in rotating around the same axis twice in succession because the same result can be obtained by rotating once by the sum of the angles, so there are only \(3\cdot 2\cdot 2=12\) different Euler angles sequences. The following activity asks you to explore different Euler angle sequences.
Activity 16.6:

To experiment with threedimensional rotations, it is helpful to construct a coordinate frame from three mutually perpendicular pencils or straws.

Draw the coordinate frames for a zyz Euler angle rotation, where each rotation is by \(90^\circ \).

What zyz rotation gives the same result at the zyx rotation shown in Fig. 16.18?

Experiment with other rotation sequences and with angles other than \(90^\circ \).
16.6 Advanced Topics in ThreeDimensional Transforms
Now that you have tasted threedimensional rotations, we survey the next steps in learning this topic which you can study in the textbooks listed in the references.
There are 12 Euler angles and the choice of which to use depends on the intended application. Furthermore, there is a different way of defining rotations. Euler angles are moving axes transforms, that is, each rotation is around the new position of the axis after the previous rotation. In Fig. 16.18, the second rotation is around the yaxis that now points left, not around the original yaxis that points up. It is also possible to define fixed axes rotations in which subsequent rotations are around the original axes of the coordinate system. In three dimensions, homogeneous transforms that include translations in addition to rotations can be efficiently represented as \(4\times 4\) matrices.
16.7 Summary
Kinematics is the description of the motion of a robot. In forward kinematics, we are given a set of commands for the robot and we need to compute its final position relative to its initial position. In inverse kinematics, we are given a desired final position and need to compute the commands that will bring the robot to that position. This chapter has demonstrated kinematic computations for a simple twodimensional robotic manipulator arm. In practice, manipulators move in threedimensions and the computations are more difficult. Exact solutions for computing inverse kinematics usually cannot be found and approximate numerical solutions are used.
There are many ways of defining and computing arbitrary rotations. We mentioned the Euler angles where an arbitrary rotation is obtained by a sequence of three rotations around the coordinate axes. Quaternions, a generalization of complex numbers, are often used in practice because they are computationally more efficient and robust.
16.8 Further Reading
Advanced textbooks on robotic kinematics and related topics are those by Craig [2] and Spong et al. [3]. See also Chap. 3 of Correll [1]. Appendix B of [2] contains the rotation matrices for all the Euler angle sequences. The video lectures by Angela Sodemann are very helpful:
https://www.youtube.com/user/asodemann3,
http://www.robogrok.com/Flowchart.html.
Although not a book on robotics, Vince’s monograph on quaternions [4] gives an excellent presentation of the mathematics of rotations.
Footnotes
 1.
The convention is to use uppercase letters for both the frame and the coordinates, but we use lowercase for clarity.
References
 1.Correll, N.: Introduction to Autonomous Robots. CreateSpace (2014). https://github.com/correll/IntroductiontoAutonomousRobots/releases/download/v1.9/book.pdf
 2.Craig, J.J.: Introduction to Robotics: Mechanics and Control, 3rd edn. Pearson, Boston (2005)Google Scholar
 3.Spong, M.W., Hutchinson, S., Vidyasagar, M.: Robot Modeling and Control. Wiley, New York (2005)Google Scholar
 4.Vince, J.: Quaternions for Computer Graphics. Springer, Berlin (2011)Google Scholar
Copyright information
This chapter is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits use, duplication, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made. The images or other third party material in this chapter are included in the work’s Creative Commons license, unless indicated otherwise in the credit line; if such material is not included in the work’s Creative Commons license and the respective action is not permitted by statutory regulation, users will need to obtain permission from the license holder to duplicate, adapt or reproduce the material.