Home > General, Math > FITC Preview, Simple IK

FITC Preview, Simple IK

April 5, 2007

Continuing the preview of some of the topics I’ll discuss at FITC Toronto, several IK solvers will be covered. I will start with what is probably the simplest and most intuitive algorithm which was once jokingly called “Reverse Forward Kinematics” by my robotics professor in 1981. It seems RFK dates back to at least 1972, although I have been able to uncover an original attribution.

Some Flashers may recognize RFK as the algorithm discussed in the book Making Things Move. In reality, it is a variant of Cyclic Coordinate Descent [Wang and Chen, “A Combined Optimization Method for Solving the Inverse Kinematics Problem of Mechanical Manipulators,” IEEE Transactions on Robotics and Automation, Vol. 7, No. 4, August 1991, pp. 489-499]. Both RFK and traditional CCD treat the IK problem as a sequence of one-bone optimizations. Start at the end of the chain and perform a one-bone correction. Begin a new IK problem with a chain having one fewer links. Repeat the process until reaching the root bone of the chain. RFK uses different targets at each step, while traditional CCD uses a fixed target. RFK requires a second forward
pass to adjust each bone to its new orientation.

At the end of one full sweep, the end-effector should be closer to the target. In a production solver, a distance metric and iteration limit are used as stopping criteria for the process.

In MTM, the iterative nature of the process is hidden inside an onEnterFrame handler that is constantly trying to resolve the chain’s end-effector towards the mouse position. The actual iterations are easier to observe by using a fixed target such as a static MovieClip. Allow the chain to move from its initial (arbitrary) orientation to the fixed MC position.

Referring to the ch14_07 example, replace the onEnterFrame handler with a fixed iteration loop.

Following is a diagram showing the chain orientation after one, four, and ten iterations. After a small fraction of a second to settle ‘close’ to the mouse position, it takes fewer and fewer iterations to resolve the end effector exactly to the mouse position (providing such a solution exists).

The next diagram was created from one of the demos I will go through step by step in the talk,

The original chain orientation is shown at the top. The orange markers are generated one at a time showing the required orientation of each bone to orient its terminal point to the (virtual) initial point of the next bone in the chain. The end bone is oriented to exactly match the target. The forward sweep (hence the RFK designtation) moves each bone to match the generated orientation keeping the root bone pinned at all iterations. This is shown in the bottom part of the diagram.

The RFK algorithm is fast compared to most IK approaches, but has very strong bias towards the latter bones in the chain. It is also highly prone to ‘kinking’ in the chain. I will discuss damping and a couple other approaches that compensate for these tendencies, producing more realistic motion from the solution.

I will also discuss analytic solutions to the classic two-link chain (which is important in many Biped rigs) and practical issues such as joint limits, effector pinning, and dealing with other chains in a rig that are linked forward of the chain whose IK solution is sought.

Hope to see you in Toronto. If you have not already purchased tickets, use the code 2112fx to obtain a 10% discount on checkout.

Categories: General, Math
  1. April 6, 2007 at 4:33 am

    Looks like your session will be interresting and in depth…count me in!

  2. April 6, 2007 at 7:29 am

    Thanks – I’m hoping to keep it informative and not too geeky 🙂 There will be a lot of code as well.

    – jim

  1. No trackbacks yet.
Comments are closed.
%d bloggers like this: