Kinematics from the Active Point of View

There are essentially two ways to keep track of a rigid body. In the passive view each rigid body carries a coordinate frame and the position and orientation of the body is specified by giving the transformation which relates coordinates in a standard reference frame to the local frame moving with the body. In the active view there is a single fixed coordinate frame. The position and orientation of a rigid body is specified by the transformation which moves the body from a standard (home) position to its current position.

The Denavit-Hartenberg parameters give an efficient way to specify the relative positions of lines in space, this was important in the early days when computer memory was a scarce resource. Today computer memory is cheap and so the active viewpoint outlined below is probably easier to learn and use. This method seem to date back to Gupta (Gupta 1986) but has been rediscovered many times, see for example (Selig 2006).
Many texts give rules for assigning coordinate frames to links but unfortunately there are many special cases and often these special cases coincide with the designs of commercially available machines. For example, in the PUMA robot studied below, the parameter d 3 is not an offset as defined in the text, since the joints 2 and 3 are parallel there is not a unique common perpendicular to measure the offset from. There is a common perpendicular between the first and second joint axes and between third and fourth joint axes. So the distance in the direction of the second or third axes from the point where the common perpendicular between J 1 and J 2 meets J 2 and the point where the common perpendicular between J 3 and J 4 meets J 3 is constant as the robot moves and this is labelled d 3 , see Fig. 2.
There are many more special cases, particularly if one or more of the joints are prismatic joints. Moreover, there are now several variants of the Denavit-Hartenberg method, that is several different ways to specify coordinate systems in the robot's links, see for example (Lipkin 2005) or (Waldron and Schmiedeler 2008). By contrast, the Plücker coordinates of a line are completely unambiguous, further if we give the matrix for rotations about the line or translations along the line or even helical motions about the line, then we don't even need to know about Plücker coordinates. However, for some reason this approach is still not common in robotics textbooks.

The Relation Between the Active and Passive Viewpoints
The connection between the active and passive viewpoints is that if the pose of the body, that is, its position and orientation, is given in the active view by a matrix X then in the passive view the coordinate transformation is given by the inverse matrix X −1 . To see this, let p be a point in space. If the rigid-body displacements are given by matrices in the 4 × 4 standard representation then we will have to used "extended" vectors to represent the points, that is 4-vectors of the form, In coordinate system A we can write the coordinates of the point as Ap . Now suppose we subject the point and the coordinate system to a rigid-body displacement A X. Let us call the displaced coordinate system B and the displaced point Ap = A X Ap .
The displaced point clearly has the same coordinates relative to the B-frame as the original point has relative to the A coordinate frame, Ap = Bp . Combining these equations gives, The pointp, or equivalentlyp , are arbitrary so given the coordinates of a point in the A-frame to get the coordinates of the same point referred to the B-frame we must multiply by A X −1 , The matrix A X −1 is the inverse of the matrix which actively moves the A-frame to the B-frame.
The notation A X is intended to signify that the components of the matrix are computed with respect to the coordinate frame A. Suppose we have a matrix A M given in the A coordinate frame how can it be expressed with respect to the B coordinates? As above, the effect of the matrix on an arbitrary point can be considered. Assume that the transformation maps a pointq toq . In the A frame the matrix is, The same points in the B frame have the coordinates Bq = A X −1 Aq and Bq = A X −1 Aq . Substituting in the previous equation gives, So we may conclude that in the B frame the matrix A M is given by the conjugation, where A X is the active displacement mapping the A frame to the B frame. This conjugation can also be thought of as changing the coordinates from the B frame to the A frame, applying the A-frame version of the matrix and then changing coordinates back from the A frame to the B frame. See chapter (Wang) for a more detailed account.

A-Matrices
It is quite straightforward to write down the matrices representing rotations about joints. These matrices are usually referred to as A-matrices. For example it is simple to see that a rotation by an angle θ about the z-axis is given by the 4 × 4 matrix, This is simple to verify since it is clear that points on the z axis are unchanged under the application of this matrix. Matrices corresponding to rotations about other lines in space can be found by conjugations. For example, suppose we wanted to find the matrix representing a rotation about a line parallel to the z-axis but displaced a distance d in the y-direction. Notice that there is a point on this displaced axis given by p = (0, d, 0) T . The A-matrix we seek can be found by translating the line so that p coincides with the origin, rotating about the z-axis and then translating the origin back to the point p, that is, Note that in the active viewpoint the first transformation performed is written on the extreme right.
More generally, suppose that R v (θ ) is the 3 × 3 rotation matrix representing a rotation by θ about a line through the origin with direction v then the A-matrix representing a rotation about an axis parallel to v but passing through a point p will be given by, Hence, to find the A-matrix for a particular revolute joint in a robot all that is required is the direction of the axis and any point on the axis. A-matrices for prismatic joints are even simpler. Translations only require a direction not an axis, so a translation in the direction v can be parametrised as, where λ is the joint parameter. For a prismatic joint the joint parameter is a length giving the extension of the joint from its home configuration. This formalism can also deal with helical or screw joints, although these are rarely used for practical robots. The A-matrix for a helical joint of pitch h screwing about an axis with direction v through a point p is given by, The kinematics for a 6-joint serial robot arm can now be given simply as the matrix product, (1) The matrix K(θ 1 , . . . , θ 6 ) here represents the active displacement of the robot's end-effector from its home configuration, where all the joint angles are 0 to the configuration where the joint angles are set to θ 1 , . . . , θ 6 . Notice the order of the A-matrices here. This order corresponds to rotating the last joint θ 6 about its joint axis in the home position, followed by rotating the fifth joint about its axis in the home position, and so on down to rotating the first joint about its axis in the home position by θ 1 . Performing the operations in this order, distal to proximal, means that the joints nearer the base are not disturbed until the joint is set.
All matrices here are given with respect to the fixed coordinate frame chosen at the beginning of the procedure.
Finally here, notice that each A-matrix is a parametrised matrix. It is not too difficult to see that each A-matrix determines a one parameter subgroup of the group of rigid-body displacements SE(3) and hence can be represented by an exponential. This leads immediately to the product of exponentials formula, see chapter (Chirikjian).

Denavit-Hartenberg Parameters and Method
In the active view, the design of a robot is specified by giving the home position of all joints. That is, by giving the directions of the joint axis and a point on the axis. However, the more common way to specify the design is in terms of Denavit-Hartenberg parameters. The two methods are essentially equivalent. For a planar mechanism with hinge joints, only the lengths of the links are needed to specify the design. For spatial systems the situation is a bit more complicated.
To make things as simple as possible we will concentrate on systems of revolute joints. There are three kinds of design parameters. To begin with, consider just two revolute joints, see Fig. 1. Each joint determines a line in space. Between any pair of lines there is a unique shortest distance, along the line perpendicular to both. This length is called the link length. If the lines happen to intersect then the link length is zero. A problem might arise here if the lines are parallel. Then there are many common perpendiculars. However, the distance between the lines along any common perpendicular is always the same, so no ambiguity arises. Now looking along the common perpendicular the lines will appear to cross. The angle at which they cross is called the twist angle. Another way to think of this is as the angle between the direction vectors along the lines. There are two possible choices for the direction of the line, differing by π radians. The twist angle α, can be chosen to be in the range − π 2 < α ≤ π 2 . Alternatively we could fix the direction of the lines and then use the right-hand rule to determine the twist angle.
The final design parameter is the joint offset. This is only relevant if we have three or more joints, see Fig. 1. The line perpendicular to joint 1 and joint 2 meets the axis of joint 2 at some point. Likewise, the common perpendicular to the second and third joints meets the axis of the second joint. The distance between these two points is the joint offset. The joint offset is positive when measured along the direction of the axis. A possible ambiguity can arise here, if two consecutive axes are parallel; then, as mentioned above, the joint offset cannot be defined.
By considering Fig. 2 a table of the design parameters for the PUMA robot can be prepared: These design parameters are also sometimes called the Denavit- Hartenberg parameters. If prismatic joints are included, the offset for such a joint is now a variable. The joint angle, that is the angle between the common perpendiculars, is now fixed, and hence is the new design parameter.
The Denavit-Hartenberg method is a method for writing down the kinematics of the robot by assigning a coordinate frame in each link of the robot aligned with one of the joints in the link. There are several different methods to do this but a key point is that the z-direction of the coordinate system is always aligned with the axis of the joint. Rather than worry about the detail of the frame assignment we will look at how the method works in general. Suppose that X i is the matrix corresponding to the active displacement of the world frame to the frame assigned to the i-th link. The A-matrix written in the previous section for rotation about this joint could now be written using conjugation as, where the matrix A(θ i ) on the right is simply the matrix for rotation about the z-axis, As above, the kinematic map of the robot can be written, Substituting for the A-matrices then gives, Writing, B i = X i X −1 i+1 for 1 ≤ i ≤ 5 and with B 0 = X −1 1 this becomes, Notice that the B matrices can be interpreted as the active displacement taking the ith coordinate frame back to the (i − 1)th frame, in the home configuration of the robot. This is usually extended to include the tool frame as above. If we write B 6 = X 6 X −1 t then the active displacement of the world frame to the tool frame will be given by, Here B 6 can be interpreted as the active displacement from the tool frame to the frame fixed at the final joint, or the passive transformation from the frame at the final joint to the tool frame. Traditionally the Denavit-Hartenberg method is done rather differently. First coordinate frames are attached to each link. As mentioned above, there are several conventions for setting up and numbering these frames. In most common versions the axes of the frames are positioned so that the z-axis of the frame is aligned with a joint axis and the x-axis is positioned along the common perpendicular line between the joint and the next joint in the robot. Next, the transformation matrices i T k j are introduced, these represent the active transformation from the jth frame to the kth frame expressed in the ith frame. Notice, however, that they can also be thought of as representing the coordinate transformation from the kth frame to the jth frame. The matrices i T i+1 i are simple to write down. The active transformation from the ith to the (i + 1)th frame is given in the ith frame as screw displacement about the x-axis followed by a screw displacement about the z axis in the (i + 1) frame, where k is the direction of the z-axis of the i + 1th frame. To find the displacement about the z-axis in the i + 1 frame we can use a conjugations to move the axis back to the z-axis in the i frame screw about this axis and then move the axis back to where it was. That is, The transformation is then, Notice that in this method, the home configuration of the robot is implicit rather than explicit. It is given by the configuration where all of the joint angles θ 1 are zero. Also in contrast to the previous method, the rotation about the joint is coded into the matrix i T i+1 i . To deal with a robot with a prismatic joint all that is needed is to make the offset d i variable and fix the angle θ i as a design parameter of the robot.
Consider three coordinate frames, labelled i, j and k. The active transformation from frame i to frame k with respect to frame i can be split into a transformation from i to j followed by the transformation from j to k all expressed in frame i, From above, the transformations that are easy to compute have the form i T i+1 i . So we need to write transformations like i T k j in coordinates referred to the j frame. Recall from above that the a coordinate change for such matrices can be effected by a conjugation, Substituting this into the previous relation gives, Now the aim here is to find the transformation 0 T 6 0 , the coordinate change from frame 6, the tool frame, to frame 0 the world frame. So using the above relation we

Forward Kinematics of a Serial Robot
As a concrete example we will find the A-matrices for a PUMA style robot see Fig. 2. We first need to fix a convenient coordinate frame and home configuration for the robot. Since the first two joints meet at right-angles it is sensible to choose the origin of our coordinates at this meeting point and align two of the coordinate axes with the home positions of joints 1 and 2. We can draw up a short list of the directions of the joints in the home configuration and convenient points on the joint axes, see table 2.
Here i, j and k are unit vectors in the x, y and z-directions respectively. The fixed lengths a 2 , d 3 and d 4 are the design parameters of the robot. Notice that the parameter d 3 is not shown in Fig. 2, it is the perpendicular distance between the first and forth joints. Now it is a simple matter to find the A-matrices. The first one is simply a rotation about the z-axis, The second one is also simple, this time a rotation about the x-axis, For A 3 we need to know the term (I − R)p. The rotation is again about the x-axis.

Tool Frame Coordinates
It is common to use tool frame coordinates to specify the motion of the robot's endeffector. These are the coordinates for a coordinate frame that is rigidly attached to the final link of the robot, the tool or end-effector. Using the active viewpoint we have just one coordinate frame and it is fixed. This fixed coordinate frame is usually called the world frame.
Notice that the kinematic map of the robot, equation (1) above is the active transformation which takes the tool frame in the home configuration of the robot to the tool frame when the joint angles are set to θ 1 , . . . , θ 6 . To find the active transformation which maps the world frame to the current tool frame we can prepend the kinematic map with another transformation. This transformation must be the one which takes the world frame to the tool frame in its home configuration, K t (θ 1 , . . . , θ 6 ) = A 1 (θ 1 )A 2 (θ 2 )A 3 (θ 3 )A 4 (θ 4 )A 5 (θ 5 )A 6 (θ 6 )X −1 t .
For example, for the PUMA style robot studied in the previous section we could have, a pure translation. The reason for using the inverse will become apparent later. The passive viewpoint can be easily recovered by inverting the above. That is, the coordinate transformation that changes the coordinates of points given in the world frame to the coordinates in the current tool frame will be given by, K −1 t (θ 1 , . . . , θ 6 ) = X t A −1 6 (θ 6 )A −1 5 (θ 5 )A −1 4 (θ 4 )A −1 3 (θ 3 )A −1 2 (θ 2 )A −1 1 (θ 1 ).
The A-matrices are very easy to invert. In general, for a 4 × 4 matrix representing a rigid-body displacement we have, So, for a matrix representing a rotation about a line we have, and for a general screw displacement, Where v is the vector along the axis of R so that Rv = R T v = v.