Overview of Inverse Kinematics
Original Article: Overview of Inverse Kinematics
I highly suggest the above link for a high level overview of Inverse Kinematics. It goes over IK jargon, IK usage/applications, and high level descriptions of the forward kinematics and inverse kinematics.
What are the uses of IK?
IK can be used for a humanoid arm to reach for an object/target, as we’ve seen. IK can also be used for foot stepping, such that we tell the foot where to step and the IK figures out how to configure the leg joints. IK is not usually used as an animation itself (reaching for an object), but more as an animation tool. So, if you are implementing a walk cycle, you could position some of the key frames using the IK tool.
Another key point about IK is that your goal/target is not limited to position alone — your goal can be defined as a rotation. For example, if your feet need to rotate based on uneven terrain, your IK rotation goal can be defined based on the floor’s normal. This way your feet are inclined along the floor, such as when you are walking up an incline. Note that you can also use IK to have your head (or even eyes) look in a certain direction. If you want your head to follow an object, you can use IK to have the head follow the object around.
How do I implement joint limits?
I usually implement joint limits with a simple if-statement. For example, this would work for revolute joints.
if (limb.rotation > 45.0f) limb.rotation = 45.0f;
if (limb.rotation < -45.0f) limb.rotation = -45.0f;
It's a lot less mathematical than the Jacobian, and extremely easy to implement once you have the Jacobian working.