# Joint state parameterization and forward kinematics

### Homogeneous Transforms

The first step in robotics is to start thinking about the coordinate frame’s which are attached to various parts of the robot, for example imagine a coordinate frame at the base of the robot and one at the tool tip of the robot. Notice that these two frames are separated by some translation and some rotation. The next step is to ask how a coordinate frame can be represented mathematically and how to transform a coordinate frame into another frame.

As it turns out, in robotics one popular method of representing a coordinate frame mathematically is to use a 4×4 matrix which consists of a 3×3 rotation matrix and a 3×1 position vector as follows:

The rotation matrix is nothing more than three unit vectors denoting the direction of the x,y and z axes. Now the nice thing about this 4×4 matrix structure is that if we multiply two such matrices

Then the transformation matrices combine to form a single matrix that represents the transformation from a to c.

So this means that if we were to connect three links in a serial manipulator as shown below

then the transformation from the base to the tool tip ` can be obtained simply by multiplying the transformation matrices of the individual links together.`

**Denavit-Hartenberg parametrization**

Now that we have a better idea of how transformation matrices can be used, we have to figure out how to actually parametrize a link into a transformation matrix. This is where the Denavit-Hartenberg(D-H) convention comes in.

This convention presents the rules for assigning the coordinate frames to joints as well as presenting the structure of the transformation matrix associated with transforming between the coordinate frames.

Some key point to keep in mind when assigning the coordinate frames according to D-H convention is that the Z axis always represents the axis of a joint actuation. In other words, for a rotational joint the Z axis is the axis of rotation while for a linear(Prismatic) joint the Z axis is in the direction that the joint moves.

Another point to keep in mind is that the X axis represents the forward direction for rotational joints.

Now the transformation matrix can be constructed as a set of translations and rotations as shown below. Here ` represents the rotation around the old Z axis and `

` represents the rotation around the new X axis.`

Now that we have done all this work and we have parametrized our links in terms of DH convention, it is easy to find the tool tip position ,x , as a function of the joint angles . This problem is called Forward Kinematics, it is the problem of finding the Cartesian tool tip position (or some other position) based on knowledge of the joint angles.

### Screw Parametrization

There is another, perhaps more slick way to do the parametrization which allows prismatic, revolute and helical joints to be handled easily. It follows based on something called a “Twist” parametrisation of the problem.

First, lets define the skew symmetric matrix which can be formed from a vector, as follows

Next lets define a 6×1 vector that first packs the the rotation axis and then displacement vector.

For example, for a revolute joint rotating around the z axis we would have v=[0 0 1] and p=[0 0 0], revolute roint around y axis would be v=[0 1 0] and p=[0 0 0], prismatic joint sliding along x axis would have v=[0 0 0] and p=[1 0 0] and a helical joint around the x axis would have v=[1 0 0] and p=[pitch 0 0] (where pitch is a self explanatory parameter for helical joints).

Then the rotation portion of the homogeneous transform can be found with the following formula

and the translation portion can be found with the following formula

This method of parametrisation makes it easy to deal with revolute, prismatic and helical joints but beware that the order of rotation and translation is different with this method compared to the DH parametrisation. In particular the DH method applies rotation first and then translation while this method is translation first then rotation. Robots usually need a virtual link somewhere along the chain, with DH parametrisation its usually the first joint while with this parametrisation it will be the last joint.

Next:Kinematic Jacobian

Previous: Introduction to robotics