Skip to content

ROS 2Units, Frames and Simulation

Chains of Transforms

A point in the camera's frame reaches the map through a chain: camera to base, base to map.

Not started Jump to practice

A camera on the robot's head sees a ball. Where is the ball on the map? It takes a chain of frames to answer.

Key idea

Each transform says how one frame sits in another: a rotation and a shift. To move a point from the camera frame to the map, apply camera β†’ base, then base β†’ map, working outward. In ROS 2 the tf2 library keeps this chain up to date over time.
A point seen in the robot's frame, placed on the map by rotate-then-shift.

Why it works

The order matters because rotating and shifting do not commute: rotate then shift is a different move from shift then rotate. Working outward from the frame where the point was measured always gives the right order.

Worked example: Base to map

Robot at (2, 3), heading 90Β°. Point $(1, 0)$ in the base frame.
  1. Rotate by 90Β°: $(0, 1)$.
  2. Shift: $(2, 4)$.

Answer: (2, 4) on the map.

Common mistake

Applying the transforms in the wrong order.

Practice

Pass with 3 right answers, the last 2 in a row. Each right answer earns 3 XP.

Loading practice…

Builds on

Leads to

This is one of the top rungs of ROS 2 and Simulation.

Sources and further reading