Forward Kinematics
Given a configuration of the robot, expressed as coordinates in the parameterized configuration space, we need to be able to compute the locations of points on the robot in the physical world.
Example: planar 2R arm

Consider a simple planar 2R arm. The configuration is given by
. What is the location of the end effector? The location of the first joint is:

The location of the end effector is

It's annoying to write
, and what if we have five links?
We use a notational shorthand for sine

and have a similar notation for cosine.
With this notation, the location of the effector is:
(4)
In general, we write the forward kinematics in the form
(5)
is a vector-valued function of a vector: it takes
arguments (where
is the dimension of the configuration space), and gives
values (where
is the dimension of the point whose location we would like to know.)
Sometimes, a forward kinematics map might give information other than just the locations of points. Let's say we want to know the angle of the end effector, as well as its position. (The angle is probably important, since you can't pick something up with the back of your hand!) Write
to be the configuration of the end-effector system. (The end-effector system is a subset of the robot system!)

Forward kinematics using homogeneous coordinates
Consider the following example:

We know that frame 1 is rotated by some angle
from frame 0, frame 2 is displaced by a distance of
from frame 1, and rotated by an angle of
. We know that the red point is located at the coordinates
in frame 2. The forward kinematics problem can therefore be described as: given a sequence of frames and a point described with respect to one of those frames, find the location of that point with respect to the world frame (frame 0).
Let's say you have a world frame, called frame 0, and some other frame, called frame 1, that is rotated from the world frame by 30 degrees, translated a distance of 1 along the x axis, and a distance of .5 along the y axis. We could write a matrix using homogeneous coordinates that describes the location of frame 1 with respect to frame 0:
(7)![^0_1T = \left[ \begin{array}{ccc} \cos 30 & -\sin 30 & 1 \ \sin 30 & \cos 30 & .5 \ 0 & 0 & 1 \end{array} \right].](/local--math/eqs/ebffd4d2b8b73474c11ef9927de49440.png)
Let's say you have a point
described with respect to frame 1. Where is the point with respect to frame 0? The superscript before the vector or matrix means "described with respect to frame". That is, given the matrix and
, we want to solve for
.

Now let's say you have a point
, frame 1 is described with respect to frame 0, frame 2 is described with respect to frame 1, and frame 3 is described with respect to frame 2. What is
, the location of the point in the world frame? Let's first find the location of the point with respect to frame 2:

Once we have the point with respect to frame 2, we premultiply to move to frame 1, and then again to move to frame 0:
(10)
Notice how we can "cancel" superscripts and subscripts, and because matrix multiplication is associative (though not commutative!) we can premultiply matrices. So for example, the matrix that describes frame 3 with respect to frame 1 is
(11)
Inverse Kinematics
Forward kinematics tells us where a point on a robot arm is, assuming we know the angles at all the joints. This can be useful (especially for checking for things like collisions), but what we probably really want to know is what joint angles to set to reach some given point in space. The mapping from locations in the workspace to points in configuration space is called the "inverse kinematics" of the arm.
For serial manipulators, the inverse kinematics problem is typically much more challenging than the forward kinematics problem. Given a chain of homogeneous transform matrices, and the location of the point, we need to solve for the
values, and they are inside the sine and cosines.
Even for our simple 2R planar arm example, solving for
and
is going to take a little work:

Inverse kinematics for planar 2R arm, geometric approach
The trick is to draw a right triangle inscribing the arm as shown. Then compute the length of the hypotenuse for that triangle:
. Now we can use the law of cosines to compute the angle capital
, by looking at the triangle formed by the hypotenuse and the two links of the arm. We have

Solve for C using an inverse cosine, making sure to get the correct solution for the inverse cosine by inspection. Then
.

Now notice that we can solve for the angle B using the law of sines on the same triangle. Once we have
, notice that
, the two-argument arctangent of the initial point.
Solving transcendental equations by reduction to polynomial
How would you solve the inverse kinematics of a more complicated arm using the law of cosines approach? I would not want to. You could also take an algebraic approach and attempt to directly solve the kinematic equations, and for the 2R arm, such a solution requires only a fair amount of cleverness.
However, there is a nice systematic way to solve problems of this sort. The difficulty with solving transcendental equations is that for each variable
, both a sine and a cosine term may appear. There's also some issue with the summations inside the sines and cosines.
The summation issue is solved easily for planar arms: measure the angles from the horizontal, rather than with respect to the previous frame — at the end, we can just subtract to get the actual joint angles.
The sines and cosines can be eliminated by observing that if we let
, then

and
(15)
Craig's "Introduction to Robotics" text gives the example of solving the equation
(16)
Making the substitution and multiplying through by
, we get

which after collecting powers of u is
(18)
Solve for
with the quadratic formula, and take the inverse tangent to solve for
.
Inverse kinematics for more complicated arms
Inverse kinematics of complicated arms may need to be solved numerically, since general closed-form solutions are not known to find the roots of polynomials of greater than degree 4. However, certain special cases are known. For example, six-DOF arms are common, since six degrees of freedom allows full control over the pose of a rigid body in space. Work by Pieper solves the inverse kinematics in the special case where three of the joint axes intersect at a point, and in fact, this has influenced the design of real robot arms.
Parallel manipulators
In some sense, the forward kinematics for a serial manipulator are "easy", and the inverse kinematics are "hard". For a parallel manipulator, we expect the opposite to be true.





