Forward Kinematics
Every motor on a robot arm has an encoder telling you its current joint angle. Forward Kinematics (FK) answers the everyday question: given those joint angles, where did the gripper actually end up in space?
Core ideas covered in this module
- Chaining joint transforms
- 2-link & 3-link planar arms
- Reachable workspace & end-effector pose
Two equivalent views: triangles vs. chained frames
For a simple 2-link arm in the plane, you don't even need matrices to see what's happening. Link 1 leans at angle θ₁, contributing (L₁ cos θ₁, L₁ sin θ₁). Link 2 attaches at the elbow and turns an extra θ₂, so its world angle is (θ₁ + θ₂) and it contributes (L₂ cos(θ₁ + θ₂), L₂ sin(θ₁ + θ₂)). Add the two triangles together and you have the gripper's position.
The neat part is that walking the TF tree from base to tool by multiplying T₀¹ · T₁² gives the exact same (x, y) numbers — except matrix multiplication scales effortlessly to 3-link arms, 6-DOF arms, and branched humanoids without drawing giant pages of triangles.
Interactive lab
Forward Kinematics & Point-of-View Frame Switcher
Canvas / SVG· LiveTry switching to Tool Frame and dragging θ₁, or toggle Triangle projections to see how each link contributes L·cos and L·sin.
T₀² = [ 0.97 0.24 1.74 ]
[ -0.24 0.97 0.41 ]
[ 0.00 0.00 1.00 ]Workspace envelopes and full pose
Toggle the Workspace overlay and adjust L₁ and L₂. When L₁ and L₂ are equal, the arm can fold all the way back onto its own shoulder, filling a solid disk of radius L₁ + L₂. When one link is longer than the other, a hollow dead-zone circle appears right around the base where the tip physically cannot reach.
Notice too that FK gives you more than just tip position (x, y) — it also gives you the gripper's orientation φ = θ₁ + θ₂ (+ θ₃). With only 2 links, reaching a specific (x, y) locks your orientation automatically. Add the 3rd link and suddenly you can hold the gripper horizontal while raising or lowering your elbow.
Planar 2-link forward kinematics
x = L₁ cos(θ₁) + L₂ cos(θ₁ + θ₂), y = L₁ sin(θ₁) + L₂ sin(θ₁ + θ₂), φ = θ₁ + θ₂
Forward kinematics is always unique and fast to compute: one set of joint angles produces exactly one end-effector pose.
A 2-link planar arm has link lengths L₁ = 1.2 m and L₂ = 0.5 m. What is the closest distance to its shoulder base that the tip can reach?
Simulators like MuJoCo and Isaac run forward kinematics on every single physics step to figure out where every link, collision capsule, and wrist camera sits in the world before checking contacts or rendering pixels.
Hands-On Python Notebook
04 · Forward Kinematics: Triangles vs. Chained SE(2)
Compare closed-form right-triangle trig against chained 3×3 homogeneous transforms for 2-link and 3-link arms, and plot joint-limited workspaces.
Try this on your own inside the notebook
- Sweep joint limits [-90°, 90°] to plot the clipped reachable workspace
- Extend fk_chain_se2() to a 4-link planar arm
In Google Colab, use File → Save a copy in Drive to keep your own edits and notes. Or download the files directly:
uvx marimo edit --sandbox notebooks/course-1/04_forward_kinematics.pyWrap up this module
Saved automatically in your browser profile so you can pick up right where you left off.