Skip to the content
FixTheRobot Explore Robotics / Manipulator Basics / Theory / 06

Manipulator Basics · Theory · Module 06 of 14

06 — Forward Kinematics

Forward kinematics multiplies the link transforms from the base to the tool. Work through it for four arms of increasing complexity, read position and orientation off the result, and see which joints move the tool the most.

  • Intermediate
  • About 6 minutes to read
  • 1 linked lab

FK is the one kinematics problem that always has a unique, exact answer. It runs inside every controller, simulator and collision checker, and every other algorithm in this section calls it.

Learning objectives

After this module you should be able to:

  • Compute the tool pose of 2R and 3R planar arms both from geometry and from the DH product.
  • Compute the position of a spatial 3-DOF arm and recognise its decoupled structure.
  • Evaluate the forward kinematics of a 6-DOF arm and extract position and orientation from the result.
  • Estimate how much a small joint error moves the tool, and explain why proximal joints matter most.

Conceptual explanation

Forward kinematics answers "given qq, where is the tool?" by multiplying, in order, the transforms of Module 05:

  1. start with the base transform (where the robot stands);
  2. multiply by each link transform Ai(qi)A_i(q_i), from joint 1 to joint n;
  3. multiply by the tool transform (the TCP relative to the flange).

The result is a 4×4 matrix. Its last column is the tool position; its upper-left 3×3 block is the tool orientation, whose columns are the tool's x, y and z axes in base coordinates. The intermediate products 0Ti{}^{0}T_{i} are the poses of every link frame: a simulator draws them, and a collision checker places link geometry with them.

Which joints matter most

A revolute joint turns everything beyond it about its axis. The tool moves by about (distance from the axis to the tool) × (angle change), so the joints nearest the base, which carry the longest lever arm, move the tool the most for a given angle error. A wrist joint near the tool barely moves the position but changes the orientation just as much. This is why encoder resolution and calibration matter most for the proximal joints.

Mathematical formulation

FK of an n-joint chain
BTE(q)=Tbase∏i=1nAi(qi)  Ttool=[R(q)p(q)01]{}^{B}T_{E}(q) = T_{\text{base}} \prod_{i=1}^{n} A_i(q_i)\; T_{\text{tool}} = \begin{bmatrix} R(q) & p(q) \\ 0 & 1 \end{bmatrix}

Planar 2R (closed form):

Planar 2R
x=L1c1+L2c12,y=L1s1+L2s12,ϕ=q1+q2,c12=cos⁡(q1+q2)x = L_1 c_1 + L_2 c_{12}, \quad y = L_1 s_1 + L_2 s_{12}, \quad \phi = q_1 + q_2, \qquad c_{12} = \cos(q_1+q_2)

Spatial 3-DOF (waist, shoulder, elbow): the waist turns a vertical plane; inside it the shoulder and elbow form a 2R arm of radius ρ\rho and height zz:

Spatial 3-DOF arm
ρ=a2c2+a3c23,z=d1+a2s2+a3s23,x=ρ c1,y=ρ s1\rho = a_2 c_2 + a_3 c_{23}, \quad z = d_1 + a_2 s_2 + a_3 s_{23}, \quad x = \rho\, c_1, \quad y = \rho\, s_1

Sensitivity: for a small joint change, the tool displacement is

First-order sensitivity
δp≈Jv(q) δq,∣δp∣≈ri ∣δqi∣ for a single revolute joint i\delta p \approx J_v(q)\,\delta q, \qquad |\delta p| \approx r_i\,|\delta q_i| \ \text{for a single revolute joint } i

where rir_i is the distance from axis i to the tool point. The full Jacobian is the subject of Module 08.

Diagrams

Forward kinematics as a chain of framesA 2R arm at q = (30°, 45°). Frame 0 sits at the base, frame 1 at the elbow, turned by q1, and the tool frame E at the end of link 2, turned by q1 + q2. Multiplying the link transforms gives the tool pose in frame 0.{0}{1}{E}q₁ = 30°q₂ = 45°L₁ = 0.40 mL₂ = 0.30 m(0.424, 0.490) m⁰T_E = ⁰T₁(q₁) · ¹T_E(q₂)each factor: rotate by qᵢ, move Lᵢ along new x
The 2R arm of Example 1 drawn to scale. Each joint adds one transform to the chain; the tool pose is their product. Orange arrows are x axes, green arrows y axes.

Worked examples

Example 1: planar 2R

Links L=(0.40,0.30)L = (0.40, 0.30) m, q=(30°,45°)q = (30°, 45°):

x=0.40cos⁡30°+0.30cos⁡75°=0.424,y=0.40sin⁡30°+0.30sin⁡75°=0.490 mx = 0.40\cos 30° + 0.30\cos 75° = 0.424, \quad y = 0.40\sin 30° + 0.30\sin 75° = 0.490\ \text{m}

The tool heading is 75°. The engine's DH product gives the same numbers.

Example 2: planar 3R

Links L=(0.40,0.30,0.15)L = (0.40, 0.30, 0.15) m, q=(0°,90°,−90°)q = (0°, 90°, -90°). The cumulative angles are 0°, 90° and 0°: the first link points along x, the second straight up, the third along x again. So

p=(0.40+0.15, 0.30)=(0.550,0.300) m,ϕ=0°p = (0.40 + 0.15,\ 0.30) = (0.550, 0.300)\ \text{m}, \qquad \phi = 0°

Reasoning about cumulative angles like this is a quick sanity check on any planar FK.

Example 3: spatial 3-DOF arm

Waist, shoulder and elbow of the engine's 4-DOF arm: d1=0.30d_1 = 0.30, a2=0.32a_2 = 0.32, a3=0.28a_3 = 0.28 m. At q=(45°,30°,−60°)q = (45°, 30°, -60°):

ρ=0.32cos⁡30°+0.28cos⁡(−30°)=0.520,z=0.30+0.32sin⁡30°+0.28sin⁡(−30°)=0.320 m\rho = 0.32\cos 30° + 0.28\cos(-30°) = 0.520, \quad z = 0.30 + 0.32\sin 30° + 0.28\sin(-30°) = 0.320\ \text{m}
p=(ρcos⁡45°, ρsin⁡45°, z)=(0.367,0.367,0.320) mp = (\rho\cos 45°,\ \rho\sin 45°,\ z) = (0.367, 0.367, 0.320)\ \text{m}

The DH product gives the same point. The decoupling (waist sets the plane, shoulder and elbow set the point in the plane) is also what makes its IK easy.

Example 4: a 6-DOF arm

The engine's 6-DOF arm (DH table in Lab 03, a 0.10 m tool) at q=(30°,60°,−60°,0°,−45°,0°)q = (30°, 60°, -60°, 0°, -45°, 0°):

0TE=[0.6120.5000.6120.5000.354−0.8660.3540.2890.7070.000−0.7070.4630.0000.0000.0001.000]{}^{0}T_{E} = \begin{bmatrix}0.612 & 0.500 & 0.612 & 0.500 \\ 0.354 & -0.866 & 0.354 & 0.289 \\ 0.707 & 0.000 & -0.707 & 0.463 \\ 0.000 & 0.000 & 0.000 & 1.000\end{bmatrix}

The tool is at (0.500,0.289,0.463)(0.500, 0.289, 0.463) m. Its z axis (third column) is (0.612,0.354,−0.707)(0.612, 0.354, -0.707): the tool points outwards and down. As ZYX Euler angles the orientation is yaw 30.0°30.0°, pitch −45.0°-45.0°, roll 180.0°180.0°.

Example 5: which joint error moves the tool most?

Add a 0.1° error to one joint at a time of the 6-DOF arm in Example 4 and recompute FK exactly:

Tool position change caused by a 0.1° error in each joint.
Joint123456
Tool displacement (mm)1.011.030.780.220.310.00

The shoulder (joint 2) and waist (joint 1), with lever arms of several tenths of a metre, dominate. Joint 6 turns about the tool axis itself and does not move the tool point at all; it changes only the orientation. Try it yourself in Lab 04.

Interactive experiment

Interactive 2R forward kinematics (needs JavaScript).

Move q₁ and q₂ and the link lengths: the tool position, heading and the reachable ring update with every change.

Real-world applications

  • Controllers compute FK every cycle to report the tool pose, check safety zones and log what the robot did.
  • Simulation and digital twins animate the robot from logged or planned joint values.
  • Collision checking places every link's geometry with the intermediate transforms 0Ti{}^{0}T_{i} (Module 13).
  • ROS 2: robot_state_publisher computes FK from the URDF and joint states and publishes every link frame to TF2.

Common mistakes

Multiplying the link transforms in reverse order

FK is A₁A₂…Aₙ, base first. Reversing the order gives a different matrix, not just a transposed one.

Reading orientation from the wrong part of the matrix

The tool axes are the columns of the 3×3 block, not the rows. The rows are the base axes seen from the tool.

Mixing degrees and radians

Trigonometric functions take radians. A 90 passed as degrees is 90 rad, which is about 116.6° after wrapping.

Ignoring the tool transform

FK to the flange is not FK to the fingertips; with a 100 mm tool the error is up to 100 mm.

Key takeaways

  1. FK = base transform × link transforms in order × tool transform.
  2. The last column is position; the 3×3 block holds the tool axes as columns.
  3. Intermediate products give every link frame, used for drawing and collision checking.
  4. Proximal joints move the tool point the most per degree; the last joint often changes only orientation.

Knowledge check

Write an answer to each question, then reveal the explanation. Your answers stay in your browser.

Question 1

A 2R arm with L₁ = L₂ = 0.5 m is at q = (90°, −90°). Where is the tool?

Explanation

Link 1 points up to (0, 0.5); the cumulative angle of link 2 is 0°, so it points along x: the tool is at (0.5, 0.5) m.

Question 2

Why does an error in joint 1 usually move the tool more than the same error in joint 5?

Explanation

Displacement ≈ distance from the axis to the tool × angle error. Joint 1 is far from the tool; a wrist joint is close.

Question 3

Where in the 4×4 FK result do you find the direction the tool points?

Explanation

In the third column of the rotation block: the tool z axis expressed in the base frame.

Question 4

What is the intermediate product ⁰T₃ useful for?

Explanation

It is the pose of link 3: used to draw that link, place its collision geometry, or compute the Jacobian columns.

Practise it in the labs

Then test yourself in practice exercises and challenge mode.

References and further reading

  • M. W. Spong, S. Hutchinson and M. Vidyasagar, Robot Modeling and Control, 2nd ed., Wiley, 2020, chapter 3.
  • B. Siciliano, L. Sciavicco, L. Villani and G. Oriolo, Robotics: Modelling, Planning and Control, Springer, 2009, chapter 2.