Robotics · Classroom Notes

Forward Kinematics
Two Worked Examples

2-Link Planar Arm — solved by hand

01
Example 1 Finding the End Effector Position
Setup & Given Values
Link lengths
L₁ = 1 m  ·  L₂ = 1 m
Joint angles
θ₁ = 45°  ·  θ₂ = 30°
Question
Where is the end effector (★) in the base frame?
x y θ₁=45° θ₂=30° Base Elbow ★ EE L₁=1m L₂=1m
The Formulas
x = L₁ · cos(θ₁) + L₂ · cos(θ₁ + θ₂)
y = L₁ · sin(θ₁) + L₂ · sin(θ₁ + θ₂)
Key insight: Link 2's angle in the world is θ₁ + θ₂ — rotations stack. Each link adds a vector; the EE position is the vector sum.
Step-by-Step Calculation
1
Combined angle of link 2
θ₁ + θ₂= 45° + 30° = 75°
2
Solve for x
x= 1 · cos(45°) + 1 · cos(75°)
= 0.707 + 0.259
≈ 0.966 m
3
Solve for y
y= 1 · sin(45°) + 1 · sin(75°)
= 0.707 + 0.966
≈ 1.673 m
End effector position: ( 0.966, 1.673 ) in the base frame
Classroom Exercises — Try These
Scenarioθ₁θ₂Expected insight
Arm fully stretched x = 2, y = 0 — maximum reach
Elbow folded back 45°−45° Link 2 partially cancels link 1
Elbow pointing up 90° EE is directly above the elbow
Your own choice ?? Guess first, then verify ← best exercise

02
Example 2 Base Frame → End Effector Frame Transform
Setup

Same arm, same configuration. A sensor on the end effector detects a bolt at position (0.2, 0) in the EE frame — 20 cm straight ahead of the tip. Where is the bolt in the base frame?

Known (from Example 1)
EE position: (0.966, 1.673)
EE tip angle: 75°
Bolt in EE frame
pEE = (0.2, 0)
20 cm straight ahead of tip
The Homogeneous Transform Matrix

A 3×3 matrix (2D case) encodes rotation + translation in one operation:

T =
cos75°−sin75°0.966
sin75° cos75°1.673
001
Top-left 2×2
Rotation matrix — encodes which way the tip is pointing (75°)
Right column
Translation — where the EE origin sits in the base frame
Step-by-Step Calculation
Bolt in homogeneous coordinates → (0.2, 0, 1)
0.259−0.9660.966
0.966 0.2591.673
001
×
0.2
0
1
=
?
?
1
1
Solve for x
x= (0.259 × 0.2) + (−0.966 × 0) + 0.966
= 0.052 + 0 + 0.966
≈ 1.018 m
2
Solve for y
y= (0.966 × 0.2) + (0.259 × 0) + 1.673
= 0.193 + 0 + 1.673
≈ 1.866 m
Bolt position in base frame: ( 1.018, 1.866 )
Sanity check: The bolt is 20 cm ahead of the tip, which is pointing at 75° (nearly vertical). So the shift is mostly in Y (+0.193) and a little in X (+0.052). That's exactly what we got. ✓
Why This Matters in Practice

This operation — sensor frame → base frame — is one of the most frequent computations in real robotics. Every time a wrist camera spots an object, the robot must transform that observation into world coordinates before planning any motion. The homogeneous transform matrix makes this systematic and scalable to any number of frames chained together.

Where These Examples Lead