Visual explainer
Forward and Inverse Kinematics
Predict end-effector positions with forward kinematics and solve multi-branch joint angles with analytical inverse kinematics.
1. Forward vs Inverse Kinematics
Robotics hinges on the duality between joint and operational spaces. Forward Kinematics (FK) maps given joint angles to a unique end-effector pose . Inverse Kinematics (IK) solves the reverse problem: given a desired target pose in space, find the actuator angles needed to reach it. While forward kinematics is a direct trigonometric evaluation with a single solution, inverse kinematics is highly non-linear and yields multiple solutions—or none at all.
2. Forward Kinematics: Trigonometric Composition
For a two-link planar arm with link lengths and , the end-effector position is found by summing the Cartesian projections of each link. The elbow joint sits at . Link 2 rotates relative to Link 1 by , pointing at absolute world angle :
3. Target Feasibility and the Reach Triangle
Consider commanding the arm to grasp our labelled coffee mug positioned at . The distance from the shoulder base to the target is:
Before solving trigonometric equations, we test the triangle inequality: . Because , the target is physically reachable.
4. Solving the Elbow: Law of Cosines
The base, elbow, and mug form a triangle with side lengths , , and . By the Law of Cosines:
Taking the arccosine yields two valid solutions:
5. Elbow-Up vs Elbow-Down Configurations
The plus-or-minus sign in the arccosine reflects physical geometry:
- Elbow-Down (): The forearm bends counterclockwise relative to the upper arm.
- Elbow-Up (): The forearm bends clockwise relative to the upper arm.
Both configurations position the gripper at the exact coordinate .
6. Solving the Shoulder Angle
With established, we solve for shoulder angle . Let . The internal angle offset within the link triangle is . For the elbow-down solution ():
7. Forward Substitution Verification
We verify consistency by plugging back into the forward kinematics equations. The sum of the angles is :
The analytical inverse kinematics calculation recovers the exact target coordinates.
8. Branch Selection Criteria
When multiple mathematical solutions exist, how does the robot pick one?
- Obstacle Clearance: If a shelf sits on the table, the elbow-down posture collides, forcing the planner to choose elbow-up.
- Motion Continuity: The robot selects the configuration that minimizes angular displacement from its current posture ().
- Joint Limits: One branch may violate mechanical stops.
9. Differential Kinematics and the Jacobian
Controlling smooth motion requires mapping joint velocities to end-effector Cartesian velocities via the Jacobian matrix :
To generate a commanded tip velocity, the controller solves .
10. Where It Breaks
The inverse velocity mapping relies on an invertible Jacobian. The determinant of the planar arm Jacobian is:
When the arm straightens completely (), , so . The Jacobian drops rank and cannot be inverted. Attempting to command outward Cartesian velocity at or near this singularity requires division by zero (). Motors saturate, draw peak current, and trip hardware overcurrent shutoffs.
The Quick Version
- Forward kinematics maps joint angles to a unique end-effector coordinate.
- Inverse kinematics solves Cartesian coordinates back to joint motor angles.
- Consecutive link projections sum trigonometrically along the kinematic chain.
- Reachability requires the radial distance to satisfy the triangle inequality.
- The Law of Cosines computes the elbow angle, yielding two algebraic roots.
- Elbow-up and elbow-down configurations provide two distinct postures for one target.
- Shoulder angles decompose into line-of-sight elevation minus the internal triangle angle.
- Forward substitution proves analytical inverse calculations recover exact target coordinates.
- Planners select branches to clear obstacles and minimize joint travel distance.
- Boundary singularities reduce Jacobian rank, requiring infinite motor speeds to move radially.