i
i
i
i
i
i
i
i
11.4. Inverse Kinematics 279
towards a goal for the end of the articulation and the termination criteria are
all the same. Where the 2D and 3D IK problems differ is in the specification
of the orientation of the links, the determination of the Jacobian and the
equations that tell us how to calculate the location of the joints between links.
Although the change from 2D to 3D involves an increase of only one
dimension, the complexity of the calculations increases to such an extent
that we cannot normally determine the coefficients of the Jacobian by differ-
entiation of analytic expressions. Instead, one extends t he idea of iteration
to write expressions which relate infinitesimal changes in linkage orienta-
tion to infinitesimal changes in the position of the end effector. By making
small changes and iterating to war ds a solution, it becomes possible to calcu-
late the Jacobian coefficients under the assumptions that the order of rotat-
ional transformation does not matter, and that in the coefficients, sin
→ 1
and cos → 1. We will not consider the details here; they can be found
in [1]. Instead, we will move on to look at a very simple algorithm for IK in
3D.
A Simple IK Algorithm for Use in Real Time
The Jacobian IK algorithm is well defined analytically and can be rigorously
analyzed and investig ated, but in practice it can sometimes fail to converge. In
fact, all iterative algorithms can sometimes fail to converge. However, when
the Jacobian method fails to converge, it goes wrong very obviously. It does
not just grind to a halt; it goes way over the top! Hence, for our VR work,
we need a simple algorithm that can be applied in real time and is stable and
robust.
A heuristic algorithm called the cyclic coordinate descent (CCD) method [3]
works well in practice. It is simple to implement and quick enough to use in
real time even though it doesn’t always give an optimal solution. It consists of
the five steps given in F i gure 11.9.
The algorithm is best explained with reference to the example given
in Figures 11.10 and 11.11. The steps are labeled (a) to (h), where (a) is
the starting configuration. A line joining pivot point 2 to the target shows
how the last link in the chain should be rotated about an axis perpendicular
to the plane in which links 1 and 2 lie. After this rotation, the linkage will
lie in the position shown in (b). Next, the linkage is rotated about point 1 so
that the end effector lies on the line joining point 1 to the target point. This
results in configuration (c), at which time a rotation about the base at point 0
is made to give configuration (d). This completes round 1 of the animation.
Figure 11.11 configuration (e) is the same as Figure 11.11(d), and a pivot