🔍🔩 Parts bench
19 lessons

Forward Kinematics: Where Did the Hand Go?

An arm is trigonometry you can bolt together: each joint turns, each link carries the turn outward, and two lines of sine and cosine name the exact spot the hand ends up.

lesson 1 of 3 in this unit

Builds on: 1.2 Servos & Steppers: Position Without Guesswork

Same idea, other course:Vector: splitting vectors with sin and cos

Links, joints, frames

Strip a robot arm to geometry and it is a chain: rigid links of fixed length, joined by joints that each contribute one angle. The two-link arm — shoulder θ₁, elbow θ₂, link lengths L₁ and L₂ — is the fruit fly of arm robotics: small enough to solve on paper, rich enough to contain every important idea.

One subtlety carries most of the machinery: the elbow angle θ₂ is measured relative to the upper arm, not to the table. The elbow rides on the shoulder’s rotation — each link works in the coordinate frame its parent hands it. Chains of frames, each riding the last, is precisely how professional software describes robots of any size; the two-link arm just keeps the chain short.

The forward map

Walk the chain and add up where each link carries you:

x = L₁·cos θ₁ + L₂·cos(θ₁ + θ₂) · y = L₁·sin θ₁ + L₂·sin(θ₁ + θ₂)forward kinematics — angles in, hand position out; note the elbow’s angle stacking on the shoulder’s

That (θ₁ + θ₂) is the frame idea wearing algebra: the forearm’s direction is the shoulder’s turn plus its own. Forward kinematics — angles to position — is the easy direction: plug in, read off, no ambiguity, works for six joints as surely as two (just with more stacking).

The workspace: where the hand can ever be

Sweep both angles through everything they can do and the hand paints an annulus — a ring with outer radius L₁ + L₂ (arm straight) and inner radius |L₁ − L₂| (arm folded). Everything the arm will ever touch lives in that ring; no cleverness reaches past it. Drawing the workspace is the first honest act of arm design: it tells you before any code whether the shelf is reachable.

Your arm runs this, backwards

Close your eyes and touch your nose: your brain aimed the fingertip without solving cosines consciously — and aiming is the reverse problem, position to angles. That direction is genuinely harder (multiple answers, unreachable spots) and is exactly the next lesson.

⚗️ Lab — The Two-Link Sandbox

Shoulder and elbow sliders, live hand coordinates, and a trace that remembers where the hand has been.

  • Move only the shoulder: the whole arm sweeps, the elbow’s world moves with it — frames riding frames.
  • Straighten (θ₂ = 0) then fold the arm fully: you have just drawn the workspace ring’s outer and inner edges.
  • Sweep both sliders wildly and let the trace fill in the annulus. Anything unpainted is forever out of reach.
60°
45°
Forward kinematics
x = 32, y = 182
Formula
x = L₁cos θ₁ + L₂cos(θ₁+θ₂)
Workspace
ring from 20 to 200 px

Work it by hand — 0 / 2

No multiple choice here: compute the value and type it. Suffixes like 2.5k or 20m are understood; answers within ±2% count.

1. An arm has L₁ = 30 cm and L₂ = 20 cm, with θ₁ = 90° and θ₂ = 0° (straight up). What is the hand's height y, in cm?
2. For that same arm, what is the radius of the workspace's inner edge, in cm?

Check your understanding

1. In the two-link arm's forward kinematics, why does the second term use (θ₁ + θ₂)?

2. Forward kinematics answers which question?

3. A two-link arm's workspace is an annulus (a ring) because…

4. A target sits 55 cm away from the shoulder of an arm with L₁ = 30 cm, L₂ = 20 cm. Which is true?