Chains of frames, and the way back
A camera on a wrist on an elbow on a shoulder sees a bolt. To grab it, the robot must know where the bolt is in the room. How many matrices is that?
About 35 min · 3 goals · Checked by automated tests
1.Why should I care?
Robots are trees of frames. To get from any frame to any other, you multiply along the chain going one way and use inverses coming back. Once this clicks, forward kinematics, camera calibration and sensor fusion all become the same bookkeeping: write down the chain, multiply in order.
- ◇ Chain transforms by multiplication: T_WB = T_WA · T_AB.
- ◇ Invert a rigid transform without a general matrix inverse.
- ◇ Move a point in both directions along a chain of frames.
2.Discover
Set A = 30°, shift (1, 0.5) and B = 45°, shift (2, 0) inside A, with p = (1, 0.5). Check p_A = T_AB·p and p_W = T_WA·p_A by hand for one coordinate. Then read the 'going back' line: the inverse returns p's B coordinates. What is the inverse's rotation?
Loading the interactive…
Can't use the interactive? Read a description instead
The frame-chain viewer lets you set frame A in the world, frame B inside A and a point in B. Its readout walks the point from B to A to the world, prints T_WA, T_AB and T_WB = T_WA·T_AB, and shows that applying the inverse of T_WB to the world point returns its original B coordinates.
3.Checkpoint: guided practice
Check what you just discovered before going on. Hints appear after a wrong answer.
Practice 1
Which is T_W←tool for the chain world → base → link → tool?
4.Predict
T_WA puts frame A in the world, and T_AB puts frame B in A. Which gives a point from B in world coordinates?
Guess first. Being wrong here is how the surprise works.
5.Understand
Chaining: labels like dominoes
T_WB = T_WA · T_AB: the A's in the middle 'cancel'. For a longer chain, T_W←tool = T_W←base · T_base←1 · T_1←2 · T_2←tool. Multiply left to right in the order of the chain; the point goes in on the right. In 2D, the angles of a chain simply add, and the translations combine through the rotations.
Inverting a rigid transform
To go the other way (W → A), use T_AW = T_WA⁻¹. For a rigid transform no general inverse is needed: T⁻¹ = [Rᵀ −Rᵀt; 0 0 1]. Rotate back by −θ, and the new translation is the old one, rotated back and negated. Check: T⁻¹·T = I.
Up and down the tree
To get a camera's measurement into the gripper frame you might go up from camera to world and back down to gripper: T_gripper←camera = T_W←gripper⁻¹ · T_W←camera. Every arrow you traverse backwards needs an inverse. Writing the subscripts carefully is the whole skill.
Explain it another way
Think of giving directions through a building: 'from the lift, the office is the second door; from the office, the desk is by the window'. Chaining is following the directions in order; inverting is walking them backwards, turning the opposite way at each step.
SE(2) is closed under composition and inversion. With T = (R, t): T₁T₂ = (R₁R₂, R₁t₂ + t₁) and T⁻¹ = (Rᵀ, −Rᵀt). These avoid numerical matrix inversion entirely.
A = (30°, (1, 0.5)), B = (45°, (2, 0)). T_WB rotation = 75°; origin = R(30°)(2, 0) + (1, 0.5) = (1.732, 1) + (1, 0.5) = (2.732, 1.5).
Robot frameworks keep every link and sensor transform in a tree and answer queries like 'where is the camera relative to the gripper right now?' by multiplying the transforms (and inverses) along the path between the two frames.
Worked example 1
T_WA has θ = 90°, t = (2, 1). Find T_AW and use it to express the world point (2, 3) in A.
Rᵀ = R(−90°). −Rᵀt: Rᵀ(2, 1) = (1, −2), negated (−1, 2). So T_AW = (−90°, (−1, 2)). Point: R(−90°)(2, 3) + (−1, 2) = (3, −2) + (−1, 2) = (2, 0). Check: T_WA·(2, 0) = (0, 2) + (2, 1) = (2, 3). ✓
Common mix-ups
- The inverse of a transform just negates the angle and the translation.
✓ The angle negates, but the new translation is −Rᵀt: the old shift, rotated back, then negated. - Transforms can be multiplied in any order as long as all of them are included.
✓ Only the order that chains the frame labels gives the right answer.
6.Practice on your own
Practice, not a test. Wrong answers get a hint and another try.
Practice 2
In a planar chain, frame A is rotated 40° in the world, B is rotated −15° in A and C is rotated 70° in B. What is C's rotation in the world, in degrees?
Practice 3 · a fresh version every time
A gripper frame has its origin at (−1, 1) in the world and is rotated 150°. A sensor sits at (1, 0) in the gripper frame. What is its world x coordinate? (3 decimal places)
Practice 4
T has θ = 0° and t = (3, −2). What is the x translation of T⁻¹?
Practice 5 · a fresh version every time
A = [2 0; −3 1] and B = [0 0; 0 −2]. What is the entry in row 1, column 1 of the product A·B?
7.Apply it
A camera frame C sits on a gripper G: T_GC = (180°, (0.05, 0)). The gripper is at T_WG = (90°, (0.4, 0.6)) in the world. The camera sees a bolt at (0.1, 0.02) m. Find the bolt in the world, then check by building the same chain in the frame-chain viewer (scale ×10 to fit).
8.Reflect
9.Go further
- Rigid transformation (Wikipedia) ↗Properties of transformations that keep distances.
Concepts: Coordinate frames and transforms · Forward kinematics