Robotics terminology
Forward kinematics (two-link arm)
Also called: forward kinematics · FK · joint angles to position
Definition
Forward kinematics computes where the end-effector is from the joint angles and link lengths.
Picture it
Start at the base, walk along link 1 at angle θ1, then along link 2 at angle θ1 + θ2, because the second joint's angle is measured relative to the first link. Forward kinematics always has exactly one answer.
The maths
x = L1 cos θ1 + L2 cos(θ1 + θ2) y = L1 sin θ1 + L2 sin(θ1 + θ2)
| Quantity | Unit | Symbol |
|---|---|---|
| length | metre | m |
| angle | radian | rad |
| angle | degree | ° |
Worked example
L1 = 0.3 m, L2 = 0.2 m, θ1 = 30°, θ2 = 60°. Where is the tip?
- x = 0.3 cos 30° + 0.2 cos 90° = 0.2598 + 0 = 0.260 m
- y = 0.3 sin 30° + 0.2 sin 90° = 0.15 + 0.2 = 0.35 m
AnswerTip at about (0.260, 0.350) m.
✓ The 2 numbers in this answer are recomputed from scratch by an automated test.
SOH CAH TOA
Trig ratios on a rotating arm
sin θ = 0.5 · cos θ = 0.866 · tan θ = 0.577
Arm tip: x = 0.866 m, y = 0.5 m
Arm tip: x = 0.866 m, y = 0.5 m
The arm tip sits at (L cos θ, L sin θ). In code, convert degrees to radians first.
Common misconceptions
- Misconception: θ2 is relative to link 1, not to the ground; using it directly in cos θ2 is the most common bug.
- Misconception: Degrees into sin and cos in code without converting to radians.