← Back to curriculum

Frames & rigid motion

Coordinate frames and transforms

Right-handed frames, translation vectors, rotation matrices, and the rules for chaining transforms.

~50 min read + exercises

Coordinate frames and transforms

Robotics software is a zoo of frames: world, map, base, camera, tool. This lesson makes you fluent in transform composition so you never add rotations in the wrong order again.

Figure

A typical mobile-manipulator frame graph

A typical mobile manipulator frame graphEdges are 4×4 transforms. Compose them to express any point in any frame.T^w_b (slow / SLAM)T^b_t (FK)T^b_c (extrinsics)worldfixedbaserobot bodytoolend-effectorcameraoptical frame
World fixed, base moving, tool and camera attached relative to the base. Each edge is a 4×4 transform you can chain together.

Learning objectives

  • Draw a small graph of frames for a mobile manipulator and label parent/child relationships.
  • Multiply rotation matrices and translation vectors in the correct direction for point transforms.
  • Convert a point between frames using consistent notation (active vs passive awareness).

Prerequisites

  • Basic vectors and matrices.
  • Right-hand rule for cross products (optional refresher).

Step 1 — Why frames exist

A pose is always relative. The same physical point has different coordinates in different frames:

  • The warehouse world frame is stable for navigation.
  • The robot base frame moves with the robot.
  • The tool frame moves with the gripper.

Checkpoint: If someone says “the object is at (0.2, 0, 0.1),” what question must you ask immediately?


Step 2 — Rotation matrices preserve lengths and handedness

A proper rotation RSO(3)R \in SO(3) satisfies RR=IR^\top R = I and det(R)=+1\det(R) = +1.

  • Columns of RR are the axes of the child frame expressed in the parent frame (common convention).
  • Applying RR to a vector rotates that vector as if the vector turns when using the “columns are basis vectors” view — stay consistent with your textbook.

Exercise: If Rᵃ_b (rotation of frame b expressed relative to a) maps coordinates from frame b to frame a, write how to express a point pᵇ (coordinates in b) in frame a.


Step 3 — Translations are not commutative with rotations

If you rotate then translate vs translate then rotate, you generally get different results.

For rigid transforms, the cleanest algebra uses homogeneous transforms (next lesson preview) — but first feel the pain in 2D with a simple example on graph paper.

Checkpoint: Move a point on paper: rotate 90° around origin then translate by (1,0). Repeat with translate first. Same final point?


Step 4 — Composing transforms as a chain

Suppose you know Tᵃ_b (b relative to a) and Tᵇ_c (c relative to b). Then, in homogeneous form:

Tca=TbaTcbT^a_c = T^a_b \, T^b_c

Without homogeneous form, be extremely careful whether you apply rotations about world axes or body axes.

Figure

Composing transforms along the chain

Composing transforms: walk the chainT^a_c = T^a_b · T^b_c. The inner frame must match between matrices.frame aframe bframe cT^a_bT^b_cT^a_c = T^a_b · T^b_c
To express frame c in frame a, multiply T^a_b · T^b_c. The inner index b must match — if it doesn't, you have the wrong inverse somewhere.

Exercise: In words, explain why wrist motions “look different” in base coordinates vs tool coordinates.


Step 5 — Common conventions (REP-103 style intuition)

Many ROS systems follow REP-103: right-handed, x forward, y left, z up for base frames (domain-dependent).

Reality: CAD exports, URDF files, and camera optical frames disagree constantly. Your job is to verify frames with measured ground truth, not assumptions.


Check your understanding

  1. What is the difference between a static transform and a time-varying transform in software logs?
  2. Why is “just invert the matrix” a valid way to reverse a rigid rotation?
  3. Give one real bug caused by mixing camera optical frame (Z forward) with robotics base frame (X forward).

Lab-style stretch goal (optional)

Pick two coordinate frames in a simulator and print the 4×4 transform between them while moving one joint. Verify numerically that composing two transforms matches the long way around.