Skip to content

Forward Kinematics

Put numbers on the joints and the hand position follows. Forward kinematics is that calculation

1. The chain

The arm is a chain of two vectors. The first vector starts at the base and has length L1. Its direction is θ1. The second vector starts at the elbow, has length L2, and its direction is θ1 + θ2. The hand is the point at the end of the second vector. Forward kinematics is nothing more than adding those two vectors.

Vector chain

The order matters. Move the first joint and the whole arm swings, including the second link. Move the second joint and only the forearm swings. That is the physical meaning of the nested angle sum.

2. The second angle is relative

A common first mistake is to use θ2 as the absolute angle of the second link. It is not. The encoder at the elbow measures the angle between link 1 and link 2, not between link 2 and the x-axis. The absolute angle of the forearm is therefore θ1 + θ2.

  • If θ1 = 30° and θ2 = 60°, the forearm points at 90°.
  • If θ1 = 30° and θ2 = 0°, the arm is straight and the forearm points at 30°.
  • If θ1 = 30° and θ2 = −30°, the forearm points back along the x-axis.

3. The equations

Expand the two vectors into components. The result is the forward-kinematics map for a planar 2R arm. The orientation φ is the angle of the forearm, which is simply θ1 + θ2.

Forward kinematics of a planar 2R arm

The same map can be written with homogeneous transforms. A rotation and a translation are packed into one matrix, and the chain becomes a product of matrices. For two links that is overkill; for a six-axis arm it is the only sane bookkeeping. The matrix form also makes it obvious that forward kinematics is a composition: base to shoulder, shoulder to elbow, elbow to hand.

The same map as a transform product

4. Worked example

Take L1 = L2 = 1 m, θ1 = 30°, and θ2 = 60°. The forearm's absolute angle is 90°. Evaluate each component before adding them.

Example: L1 = L2 = 1 m, θ1 = 30°, θ2 = 60°

Link 1 contributes:

Link 2 contributes at the absolute angle 90°:

Add them:

The hand is 1.5 m above the base and 0.866 m to the right. The forearm points straight up even though neither joint angle is 90°; the angles add.

Check the result against the workspace from the previous lesson: L1 + L2 = 2 m, and r = √(0.866² + 1.5²) = 1.732 m, inside the disk. The arm is not fully extended, so the elbow still has room to move.

5. What forward kinematics cannot do

Forward kinematics answers “where is the hand?” It does not answer “which angles put the hand there?” The map is nonlinear: equal increments in a joint angle do not produce equal increments in the hand position. Near full extension, a small joint change moves the hand a lot; near a folded configuration, the same change can move it very little.

That nonlinearity is also why a robot program cannot simply interpolate from one hand position to another in joint space and expect a straight line in task space. The next lesson reverses the map; the lesson after that differentiates it.

6. Practice

Try it

L1 = L2 = 1 m. The arm is straight along the x-axis: θ1 = 0°, θ2 = 0°. Where is the hand?

Try it

L1 = 1 m, L2 = 0.5 m, θ1 = 90°, θ2 = −90°. Where is the hand, and which way does the forearm point?

Try it

Keep θ2 fixed and increase θ1 by 10°. Does the hand move by a constant vector, independent of where the arm started?

7. Resources

Open the arm playground and compare the two elbow branches at the same target. Both branches satisfy the same forward-kinematics equations; the difference is which side of the base-to-target line the elbow sits on. Then try the next lesson to solve for the angles instead of evaluating them.

Next: inverse kinematics →

Continue the track

Open the playground for this topic

Arm Playground →

Drag a target. The planar arm solves its own inverse kinematics, and you can switch elbows or change link lengths.

The mathematics behind this topic: Linear algebra.

Site soundtrack