ME3120 · Dynamic Modelling
Theme 4 · Robot geometry

Forward kinematics of the 2-link arm

The centrepiece of the course. From two joint angles we read off the elbow, the tip, and each link's centre of mass — the positions the energy method will need.

Source: course notes, Week 3; the planar 2-link arm (Spong, Lynch & Park).

Before you start

What you need first

  • Chaining transforms down an arm (Topic 17), and that rotations add.
  • \(\sin,\cos\) of a sum of angles.

What you'll be able to do

  • Set up the 2-link arm with the standard angle convention.
  • Write the positions of the elbow, tip, and centres of mass.
  • Sanity-check the formula at extreme poses.

Setup

The 2-link planar arm

  • Link 1: length \(L_1\), joint angle \(\theta_1\) measured from the \(x\)-axis.
  • Link 2: length \(L_2\), joint angle \(\theta_2\) measured relative to link 1.
  • Joints: shoulder at the base, elbow between the links, tip at the end.
  • Each link's centre of mass sits a distance \(\ell_i\) along it (\(\ell_i
Coordinates \(q=(\theta_1,\theta_2)\). Goal: the positions of the elbow, the tip, and each centre of mass — as functions of \(q\).
x θ₁ θ₂ L₁ L₂ ℓ₁ ℓ₂ tip shoulder
The 2-link arm: \(\theta_1\) from the \(x\)-axis, \(\theta_2\) relative to link 1. Purple dots are the centres of mass.

The absolute angle of link 2

\(\theta_2\) is measured relative to link 1. So link 2's angle from the ground \(x\)-axis is the sum:

$$\text{(link 2 absolute angle)} = \theta_1 + \theta_2$$
Watch this carefully: relative angles add as you go outward (we proved \(R(\theta_1)R(\theta_2)=R(\theta_1+\theta_2)\) last topic). A common slip is to use \(\theta_2\) alone where you need \(\theta_1+\theta_2\).

Derivation

Walk out from the base

1Elbow — the end of link 1, a single rod at angle \(\theta_1\):
$$x_1=L_1\cos\theta_1, \qquad y_1=L_1\sin\theta_1$$
2Tip — start at the elbow, then go out along link 2 (length \(L_2\), angle \(\theta_1+\theta_2\)):
$$x_e=L_1\cos\theta_1+L_2\cos(\theta_1+\theta_2), \quad y_e=L_1\sin\theta_1+L_2\sin(\theta_1+\theta_2)$$
3Centres of mass — the same walk, but stopping at \(\ell_i\) instead of \(L_i\):
$$x_{c1}=\ell_1\cos\theta_1,\quad x_{c2}=L_1\cos\theta_1+\ell_2\cos(\theta_1+\theta_2)$$

Forward-kinematics results

$$\begin{aligned} \text{elbow:}\;&\ x_1=L_1\cos\theta_1,\ \ y_1=L_1\sin\theta_1\\[3pt] \text{tip:}\;&\ x_e=L_1\cos\theta_1+L_2\cos(\theta_1+\theta_2)\\ &\ y_e=L_1\sin\theta_1+L_2\sin(\theta_1+\theta_2)\\[3pt] \text{CoM}_2:\;&\ x_{c2}=L_1\cos\theta_1+\ell_2\cos(\theta_1+\theta_2)\\ &\ y_{c2}=L_1\sin\theta_1+\ell_2\sin(\theta_1+\theta_2) \end{aligned}$$
where:
SymbolMeaningSI unit
\(L_1,L_2\)link lengths (full)m
\(\ell_1,\ell_2\)distance to each link's centre of massm
\(\theta_1,\theta_2\)joint angles (\(\theta_2\) relative to link 1)rad
🔭 Looking ahead: \(\text{CoM}_2\) is the one next theme's energy needs — differentiate it to get a velocity, square it for \(T=\tfrac12 mv^2\).

Sanity-check the tip formula

PoseAnglesTip should beFormula gives
Straight out along \(x\)\(\theta_1=0,\ \theta_2=0\)\((L_1+L_2,\ 0)\)\((L_1+L_2,\ 0)\) ✓
Folded back\(\theta_1=0,\ \theta_2=180^\circ\)\((L_1-L_2,\ 0)\)\((L_1-L_2,\ 0)\) ✓
Extreme poses give the answers we expect — so the formula is trustworthy. Always test a model this way (Topic 9).
📐 Worked example

Find the tip of a bent arm

For \(L_1=L_2=1\ \text{m}\), find the tip position when \(\theta_1=90^\circ\) and \(\theta_2=-90^\circ\).

x L₁=1 L₂=1 tip (1,1)
\(\theta_1=90^\circ\) (link 1 up), \(\theta_2=-90^\circ\) (link 2 bends back to horizontal).
1Link 2 absolute angle: \(\theta_1+\theta_2 = 90^\circ-90^\circ = 0^\circ\).
2Tip from the formula (\(\cos 90^\circ=0,\ \sin 90^\circ=1,\ \cos 0^\circ=1,\ \sin 0^\circ=0\)):
$$x_e=1(0)+1(1)=1, \qquad y_e=1(1)+1(0)=1$$
The tip is at \((1,1)\): link 1 goes straight up to \((0,1)\), then link 2 runs horizontally out to \((1,1)\) — matches the picture. ✓

✏️ Try it yourself

For \(L_1=2\ \text{m}\), \(L_2=1\ \text{m}\), find the tip position when \(\theta_1=0^\circ\) and \(\theta_2=90^\circ\).

Absolute angle. \(\theta_1+\theta_2 = 0^\circ+90^\circ = 90^\circ\) Tip. \(x_e=2\cos 0^\circ+1\cos 90^\circ=2+0=2\); \(y_e=2\sin 0^\circ+1\sin 90^\circ=0+1=1\) Read it. Tip \((2,1)\): link 1 along \(x\) to \((2,0)\), link 2 straight up to \((2,1)\). ✓

Common mistakes to avoid

MistakeFix
Using \(\theta_2\) for link 2's directionIt is \(\theta_1+\theta_2\) — relative angles add.
Forgetting to start link 2 at the elbowThe tip is elbow position plus the link-2 vector.
Putting the centre of mass at the jointThe mass acts at \(\ell\) along the link, not at its end \(L\).
Calculator in the wrong angle modeCheck deg/rad before evaluating \(\sin,\cos\).

Recap — the whole topic on one screen

$$x_e=L_1\cos\theta_1+L_2\cos(\theta_1+\theta_2), \quad y_e=L_1\sin\theta_1+L_2\sin(\theta_1+\theta_2)$$
IdeaWhat you own now
The convention\(\theta_1\) from \(x\); \(\theta_2\) relative; absolute = \(\theta_1+\theta_2\)
Walk outElbow, then add the link-2 vector for the tip
Centres of massSame walk, stopping at \(\ell_i\)
Sanity-checkExtreme poses give the expected tip

Next topic

Velocity kinematics & the Jacobian

We have where each link is. The energy needs how fast — so next we differentiate the centre-of-mass positions in time, meet the velocity of link 2's CoM, and see the Jacobian appear.

→ Velocity kinematics & the Jacobian