ALearning Material
Everything in robotics has a position and orientation, and those are only meaningful relative to a reference frame: a chosen origin and set of axes. A lidar reports a point 'two metres ahead' in the lidar's frame; the robot is at some pose in the world frame; the wheel turns in the robot's frame. Robotics is, to a large extent, the discipline of keeping track of frames and converting between them, and most 'the robot thinks the obstacle is in the wrong place' bugs are really a frame mistake. This lesson establishes coordinate frames and frame transformations: the geometric backbone of the whole topic.
A coordinate frame is a reference: an origin (a point that is '(0,0,0)') and a set of axes (directions)
against which you measure position (where something is) and orientation (which way it faces). The insight is
that a position like '(2, 0)' is meaningless on its own. It's '(2, 0) in which frame?'. The same physical point
has different coordinates in different frames. So robots use several frames at once: a sensor frame (e.g. the
camera's), the robot/body frame (often called base_link, fixed to the robot), and the world/map frame (fixed
to the environment), and you constantly convert coordinates from one frame to another (a frame transformation)
to relate what a sensor sees to where the robot is in the world.
Everything is in some frame; robots juggle several and convert between them:
A FRAME = an ORIGIN (the (0,0,0) point) + AXES (directions) -> measures POSITION + ORIENTATION
KEY: a position '(2, 0)' is meaningless without a frame - '(2,0) in WHICH frame?' (same point, different coords per frame)
TYPICAL ROBOT FRAMES:
- SENSOR frame (e.g. camera/lidar) - where the sensor measures from
- ROBOT/BODY frame (base_link) - fixed to the robot (moves with it)
- WORLD/MAP frame - fixed to the environment (the robot moves within it)
LOCAL (body/sensor - moves with the robot) vs GLOBAL (world/map - fixed)
FRAME TRANSFORMATION: convert a point's coordinates from one frame to another (sensor -> robot -> world)
-> this is how 'the lidar sees a point 2 m ahead' becomes 'an obstacle at (x,y) on the map'
The disciplines. A frame is an origin plus axes measuring position and orientation; a coordinate is
meaningless without its frame (same point, different coordinates in different frames). Robots use a sensor frame,
a robot/body frame (base_link, moving with the robot), and a world/map frame (fixed to the environment):
distinguishing local frames (body/sensor, which move with the robot) from global frames (world/map, fixed). A
frame transformation converts a point's coordinates from one frame to another (sensor -> robot -> world), which
is how 'the lidar sees a point 2 m ahead' becomes 'an obstacle at (x, y) on the map'. The habits: always know which
frame a quantity is in, use the right frame for each job (sensor for measuring, robot for moving, world for
goals), and transform between frames to relate them. Frames are the geometric language of robotics.
Formulas & method. A frame transformation is one matrix multiply, and the notation is what keeps the direction straight:
Notation: is a point expressed in frame , and is the transform that takes a point from into :
2-D homogeneous transform, rotation by then translation :
A point becomes , so one matrix does both rotate and translate.
Chaining: ; the subscripts must meet in the middle.
Inverse: , and for a rigid transform and , which is cheaper and exact.
Method for "where is this in that frame?":
- Write the chain of frames between the two, in order.
- Check the inner subscripts cancel; if they do not, you need an inverse.
- Multiply right to left.
- Sanity-check one known point, such as the origin of the source frame.
The subscript cancellation rule is the whole discipline. is valid because the meets, and the result is . Multiplying two transforms whose subscripts do not meet is the single most common frame bug, and it produces a number rather than an error, which is why an obstacle ends up somewhere plausible but wrong. Checking the chain on paper before writing the code costs seconds and saves an afternoon.
Why it exists. A robot's sensors, body, and goals are each naturally described in their own reference frame, and to act sensibly the robot must relate them. Turn what a sensor measures (in the sensor's frame) into where that is in the world (in the world frame), and where to move (robot frame). Coordinate frames and the transformations between them are the precise machinery for this; without them, positions and orientations are ambiguous and the robot literally cannot know where anything is. So frames are the indispensable geometric foundation, which is why the topic establishes them before kinematics, perception, and navigation, all of which constantly use them.
Mental model. Frames are like giving directions relative to different landmarks. 'Two blocks north of me' (your frame) and 'two blocks north of the station' (the station's frame) describe different places even though the words are the same. The directions only mean something once you say what they're relative to. A robot is constantly translating between such viewpoints: 'the obstacle is 2 m ahead of my camera' must become 'the obstacle is at this spot on the map' before the robot can plan around it, exactly like translating 'left of me' into 'east of the station' so someone else can use it. Knowing the relationship between the landmarks (frames) is what lets you convert.
Common misunderstandings.
- "A position is just a set of numbers." A position is numbers plus a frame: '(2, 0)' alone is ambiguous ('in which frame?'); the same physical point has different coordinates in different frames. Always state (or know) which frame a position/orientation is in. A 'frameless' coordinate is a bug waiting to happen.
- "There's one coordinate system for the whole robot." Robots use many frames at once (each sensor, the body, the world) because each thing is naturally measured in its own frame. The work is converting between them (transformations), not forcing everything into one.
- "Local and global frames are interchangeable." A local frame (body/sensor) moves with the robot; a global frame (world/map) is fixed. They answer different questions ('where relative to me?' vs 'where in the world?') and you must transform between them. Confusing them puts obstacles or goals in the wrong place.
Connections. Frames are the backbone of the topic: the transform tree (map -> odom -> base_link -> sensor) in
localization (the Nav2 SLAM lesson) is exactly these frames and their transformations (and ROS 2 tf2 is the
tool that manages them); rotations & homogeneous transformations (next lesson) are the math of converting between
frames; odometry estimates the robot frame's pose in the world frame; perception turns sensor-frame measurements
into the world/map frame to build costmaps (the perception/costmaps lesson); and 'always know your frame' is the single habit
that prevents the most common navigation bugs.
BImmediate Active Recall
QUERYWhat is a coordinate frame, and why is a position meaningless without one?
REVEAL
A coordinate frame is a reference: an origin (the point that counts as '(0,0,0)') plus a set of axes (directions), against which you measure position (where something is) and orientation (which way it faces). A position is meaningless without a frame because a coordinate like '(2, 0)' only says 'two along the first axis, zero along the second', but from which origin, along whose axes? The same physical point has different coordinates in different frames (2 m ahead of the camera is a different '(2,0)' than 2 m from the world origin). So a coordinate is really 'numbers in a particular frame'. State the frame or it's ambiguous.
QUERYWhat frames does a typical robot use, and what's the difference between local and global frames?
REVEAL
Typically a sensor frame (e.g. the camera's or lidar's, where that sensor measures from), a robot/body frame (base_link, fixed to the robot, moving with it), and a world/map frame (fixed to the environment, which the robot moves within). Local vs global: a local frame (body or sensor) moves with the robot. It answers 'where is this relative to me/my sensor?'; a global frame (world/map) is fixed. It answers 'where is this in the world?'. Both are needed (measuring and moving happen in local frames; goals and maps live in the global frame), and you transform between them.
QUERYWhat is a frame transformation, and why does a robot need them?
REVEAL
A frame transformation converts a point's (or pose's) coordinates from one frame to another, e.g. taking a point measured in the sensor frame and expressing it in the robot frame, then in the world/map frame (sensor -> robot -> world). A robot needs them because its sensors, body, and goals are each in their own frame, and to act it must relate them: 'the lidar sees a point 2 m ahead' (sensor frame) must become 'an obstacle at (x, y) on the map' (world frame) before the robot can plan around it. Transformations are the machinery that ties the frames together so measurements, motion, and goals can be combined.
QUERYWhy is 'always know which frame a quantity is in' such an important habit?
REVEAL
Because a quantity in the wrong frame is wrong, and silently so. If you treat a sensor-frame measurement as if it were in the world frame (or mix up local and global), the robot places the obstacle or goal in the wrong spot, and it looks like a perception or planning bug when it's really a frame mistake. Since the same point has different coordinates in different frames, every position/orientation only makes sense paired with its frame, so knowing (and converting) frames correctly is what keeps the robot's picture of the world consistent. 'Which frame is this in?' is the first question to ask of any robotics coordinate, and it prevents the most common navigation bugs.
CConceptual Questions
Answer each in your own words in the box, then reveal the model answer to compare. These ask why, not how, and your answers are saved.
Why is the idea that 'every position and orientation is relative to a frame' so fundamental to robotics, and why must a robot use several frames at once rather than one global coordinate system?
REVEAL MODEL ANSWER
The idea that every position and orientation is relative to a frame is fundamental to robotics because spatial quantities have no meaning in the absolute. A position is always a position relative to some origin and axes, and getting this relationship right is the entire basis of a robot knowing where anything is. Consider what a coordinate actually is: '(2, 0)' means 'two units along the first axis and zero along the second, starting from the origin'. But that is only meaningful once you specify which origin and which axes. That is, which frame. The very same physical point in space has different coordinates in different frames: a chair might be at (2, 0) relative to the robot's camera, at (1.5, 0.3) relative to the robot's body, and at (7.2, 4.1) relative to the world origin, three different coordinate triples, all describing the one chair. So a coordinate without a frame is genuinely meaningless (or worse, ambiguous: it looks like a definite location but isn't). This is why 'relative to a frame' is foundational: it's not a technicality, it's what makes spatial data mean anything. A robot's entire grasp of space (where it is, where obstacles are, where its goal is, which way it's facing) rests on coordinates, and every one of those coordinates is only correct in a particular frame. Get the frame wrong and the number, however precise, points to the wrong place. A robot must use several frames at once, rather than one global coordinate system, because each thing it deals with is naturally described in its own frame, and forcing everything into a single frame would be both unnatural and impossible to maintain directly. A sensor measures in its own frame: a camera or lidar inherently reports where things are relative to itself (it has no direct knowledge of the world origin): 'a point 2 m ahead of me'. The robot's body has its own frame (base_link) in which its motion, its wheels, and its parts are naturally described. The robot moves and turns, so 'forward' and 'left' are most naturally expressed relative to the body. And the world/map has a fixed frame in which the map, goals, and global positions live, because you want the map and destination to stay put as the robot moves. These frames are moving relative to each other: as the robot drives, its body frame and sensor frames move continuously within the fixed world frame. You cannot just pick one global frame and put everything in it directly, because the sensor physically measures in its own frame and the robot physically moves in its body frame. The data is born in those local frames. What you can do (and must) is know the relationships between the frames, the transformations, and convert as needed: take the sensor's measurement (in the sensor frame), transform it through the body frame into the world frame to place the obstacle on the map; take the goal (in the world frame), transform it into the body frame to decide how to drive toward it. So robotics uses many frames because the sensors, the body, and the world are each intrinsically their own frame, and the robot's job is to relate them by transformation, which is exactly why frames and frame transformations are the geometric backbone of everything: kinematics (relating wheel/joint motion in the body frame to motion in the world), perception (sensor frame to map frame), localization (tracking the body frame's pose in the world frame), and navigation (goals in the world frame, control in the body frame) are all about expressing and converting spatial quantities between the right frames. Mastering 'everything is relative to a frame, and we convert between frames' is mastering the language in which all of robotics is spoken.
Why are most 'the robot thinks the obstacle/goal is in the wrong place' problems actually frame errors, and what does this reveal about the discipline frames impose?
REVEAL MODEL ANSWER
Most 'the robot thinks the obstacle or goal is in the wrong place' problems are actually frame errors because placing something in space requires both a measurement and the correct frame relationship to express that measurement in the frame you're reasoning in, and since the measurement itself is often fine, the thing that silently goes wrong is the frame conversion. Think about how an obstacle gets onto the robot's map: the lidar correctly measures a point '2 m ahead' in the lidar frame; to put it on the map, that point must be transformed from the lidar frame, through the robot body frame, into the world/map frame, using the current relationships between those frames (where the lidar is mounted on the body, and where the body currently is in the world). If any of those frame relationships is wrong: the lidar's mounting transform is mis-specified, the robot's pose in the world is stale or wrong, an axis is flipped, units or angle conventions differ, or the wrong frame is assumed, then the correctly measured point gets placed at the wrong world location. The obstacle appears somewhere it isn't (a 'phantom' obstacle), or the real obstacle is mapped to the wrong spot, or the goal (specified in the world frame) is interpreted as if in the body frame and the robot drives to the wrong place. The sensor was working and the number was right. The error is purely in which frame the number was treated as being in, or how it was converted. That's why these bugs are so often frame errors: the spatial data pipeline is a chain of frame transformations, and a mistake anywhere in that chain corrupts the final position while leaving the raw measurement looking correct, so it presents as a perception or planning fault ('the robot sees an obstacle that isn't there', 'the robot goes to the wrong place') but its cause is a frame mistake. What this reveals about the discipline frames impose is that spatial correctness is a bookkeeping discipline: you must, rigorously and always, know which frame every quantity is in, know the (current) relationships between your frames, and convert correctly and consistently between them. The frame framework is unforgiving in that a single inconsistency (a flipped axis, a wrong or stale transform, an assumed frame) doesn't throw an error. It just yields a confidently-wrong location. So frames impose the habit captured in the lesson: the first question to ask of any robotics coordinate is 'which frame is this in?', and the first thing to check when something is mis-located is the chain of transforms, not the sensor or the planner. This is also why robotics builds explicit machinery to manage frames rigorously. The transform tree and tools like ROS 2's tf2, which track all the frame relationships over time so conversions are done consistently and correctly. The deeper lesson is that because every spatial quantity is frame-relative and conversions are silent when wrong, robotics demands disciplined frame bookkeeping as the foundation of spatial reasoning, and that internalising 'always know and convert frames correctly' prevents the single largest class of navigation and perception bugs, because those bugs are, more often than not, frames being wrong while the sensors and algorithms are blamed.
DPractice Problems
P1 (easy). A lidar is mounted 0.20 m forward and 0.05 m left of the base origin, yawed +15 degrees. The robot is at (3.00, 2.00) in the map, heading +30 degrees. The lidar returns a hit at range 2.50 m, bearing +20 degrees.
Write the two homogeneous transforms, convert the hit to Cartesian lidar coordinates, and push it through to the map frame, showing the base-frame intermediate. Give all coordinates to four decimals, and state the subscript chain that justifies the multiplication order.
P2 (medium). Using the same setup, produce the inverse transform from without inverting a matrix numerically, using and .
Give the resulting matrix, compute where the map origin sits in the lidar frame, verify the round trip on the hit from the previous problem, and state the two things this inverse is used for in a real stack. Then explain why the transpose shortcut is not merely faster.
P3 (harder). Three frame bugs are made constantly. Using the same lidar hit, compute where the obstacle appears to be, and the error in metres, for each:
- the mounting transform is applied inverted,
- the two transforms are multiplied in the wrong order,
- the mounting transform is omitted (the lidar is assumed to be at the base origin).
Produce the table. Then explain why none of these raises an error, and write the four-item checklist that catches all three before the code runs.
Solutionsclick to reveal
P1. The chain, written before any arithmetic.
We want , and we have :
Check where they meet: ends at base and starts there, so the chain is valid, and the outer pair gives , which is what we wanted.
Do this first, every time. If the inner subscripts do not meet, one of the transforms needs inverting, and no amount of checking the arithmetic afterwards will reveal it.
The transforms.
: rotation +15 degrees, translation :
: rotation +30 degrees, translation :
The measurement, in Cartesian lidar coordinates.
Step one, into the base frame.
Step two, into the map frame.
The one-shot version, which is what production code does.
Note the rotation is 45 degrees, which is 30 + 15, exactly as it must be. And
the same answer.
Composing once and reusing the product is both faster and safer: one matrix instead of two multiplies per point, and the chain is written down once where it can be checked rather than open-coded at every call site.
Two sanity checks worth doing every time, both of which take seconds.
Check the rotation block against the angles you expect. , and is sitting in the matrix. If that number had come out as 15 degrees, the order was wrong.
Push the source frame's origin through. should land on the lidar's actual position in the map, which is the translation column: (3.1482, 2.1433). That is 0.2 m forward and 0.05 m left of (3, 2), rotated by the robot's 30 degree heading, which is exactly where the sensor is bolted. A transform that puts the sensor in the wrong place will put every measurement in the wrong place, and the origin test finds it before any data does.
P2. The rule.
Why it holds. A rigid transform rotates then translates, so undoing it means un-translating then un-rotating: . Reading that as a matrix gives the form above.
Applying it.
The map origin, seen from the lidar.
3.74 m behind the sensor and 0.71 m to its left, which is the sensible answer for a robot that has driven out to (3, 2) and turned 45 degrees away from the map's x-axis.
The round trip.
Exactly the lidar coordinates the previous problem started from. That is the check to run whenever a transform is new: push a point out and back, and require the original to within floating-point noise. It catches a transposed rotation, a sign error in the translation, and a swapped subscript order, all of which produce plausible-looking wrong numbers in the forward direction alone.
What the inverse is for.
Asking where a known map feature is in sensor coordinates. "The charging dock is at (1.0, 5.0) in the map; where should the camera be looking?" That is , and it is how a robot points a sensor at something it knows about, how it decides whether a landmark is inside the field of view, and how a detection is associated with a map feature.
Reversing a chain you only have one direction of. A URDF gives you , because that is how the robot is built, but localisation gives you . To put a map feature into the sensor frame you need , which only exists as an inverse. Every real stack inverts transforms constantly, which is why the operation has to be cheap and exact.
Why the transpose shortcut is not merely faster.
It is exact. A general 3x3 matrix inverse divides by the determinant, and for a nearly singular matrix that division amplifies floating-point error. A transpose moves numbers; it introduces no error at all, ever.
It preserves rigidity. A general numerical inverse of a rotation matrix returns something that is only approximately a rotation: its columns drift from unit length as errors accumulate over a long chain, and the result quietly starts scaling the points it transforms. is orthonormal by construction if was, so the property is preserved through any number of compositions.
It cannot be applied to the wrong kind of matrix without noticing. The shortcut is only valid when the rotation block really is orthonormal. Checking and is two lines and it catches a transform that has picked up a scale factor, which is a genuine bug (usually from normalising a quaternion badly) and which a general inverse would silently accept.
And it is about six times fewer operations, which matters when a perception pipeline does it for every point in a 100,000-point cloud, thirty times a second. But the exactness is the reason to insist on it: speed is a bonus, and correctness under composition is the point.
P3. The correct answer, for reference: .
The three bugs.
| Bug | What was computed | Apparent position | Error |
|---|---|---|---|
| 1. Inverted mounting transform | (4.8676, 3.3339) | 1.263 m | |
| 2. Wrong multiplication order | (3.6367, 5.0241) | 0.837 m | |
| 3. Mounting transform omitted | (4.6070, 3.9151) | 0.637 m |
Every one of them is between half a metre and one and a quarter metres wrong, which on a robot in a 1.2 m aisle is the difference between passing a rack and hitting it.
Why none of them raises an error.
Because all three are valid matrix multiplications. A 3x3 times a 3x3 is a 3x3; a 3x3 times a 3x1 is a 3x1. The shapes agree in every case, so numpy, Eigen and every other library will happily compute all three. The subscripts are in your head and in the comments, not in the types.
And the outputs are plausible. The obstacle appears somewhere in the room, a few metres from the robot, at a sensible bearing. Nothing about (4.8676, 3.3339) looks wrong; it is only wrong relative to an answer nobody computed independently.
Worse, bug 3 is invisible near the origin. With the lidar mounted 0.2 m from the base, the error from omitting the mount is bounded by that mounting offset plus its rotation effect, so it is small at short range and grows with the bearing angle. A bug whose size depends on the geometry is a bug that passes the first test and fails in the aisle.
The four-item checklist.
1. Write the subscript chain before writing any code, and check that the inner subscripts meet.
The two inner subscripts (in bold) must match.
Bug 2 fails here immediately: base_lidar x map_base has lidar meeting map, which is meaningless. Thirty seconds on paper, and the most common bug is gone.
2. Name every variable with both frames, and let the names do the checking.
p_map = T_map_base @ T_base_lidar @ p_lidar # reads as its own proof
p_map = T_map_base @ T_lidar_base @ p_lidar # the mismatch is now VISIBLE
and T2 are how bug 1 survives review. T_base_lidar and T_lidar_base differ by four characters and the difference is exactly the bug.
3. Transform a known point and check it by hand.
The source frame's origin is the best one: must come out at the lidar's physical position, (3.1482, 2.1433), which you can verify against the robot's pose and the tape measure on the mounting bracket. All three bugs fail this test. Bug 3 puts the sensor at (3.0000, 2.0000), the base origin, which is visibly not where it is bolted.
4. Round-trip it.
assert np.allclose(inv(T_map_lidar) @ (T_map_lidar @ p), p)
Cheap, mechanical, and it belongs in the unit tests rather than in your memory.
And the one habit that makes all four unnecessary most of the time: use a transform library and let it manage the tree.
point_map = tf_buffer.transform(point_lidar, "map") # ROS 2 tf2
tf2 stores the frames as a tree, works out the chain itself, inverts what needs inverting, and refuses with an exception when no path exists between two frames or when the transform is too old. That last property is the one hand-written chains never have: a stale transform is a fourth bug of the same family, using a robot pose from 300 ms ago, and at 1.5 m/s that is 45 cm of error from code that is otherwise perfectly correct.
EFeynman Exercise
Explain to a beginner, using the analogy of giving directions relative to different landmarks ('two blocks north of me' vs 'two blocks north of the station'): (1) why a position is meaningless until you say what it's relative to (the frame), (2) why a robot naturally uses several frames (its sensors, its body, and the world) each measuring from its own viewpoint, and (3) why converting between frames (a transformation) is how 'the obstacle is 2 m ahead of my camera' becomes 'the obstacle is at this spot on the map'.
REVEAL MODEL ANSWER
Coordinate frames are best understood through giving directions relative to different landmarks. First, a position is meaningless until you say what it's relative to. If I say 'it's two blocks north of me' and you say 'it's two blocks north of the station', we've used the same words but pointed at different places, because 'two blocks north' only means something once you say what it's relative to (me, or the station). It's the same with a robot: a position like '(2, 0)' is just numbers until you say which origin and which directions they're measured from. That reference is the frame, and the same spot has different numbers depending on which frame you use. Second, a robot naturally uses several frames: its sensors, its body, and the world: each measuring from its own viewpoint. A camera or lidar inherently reports where things are relative to itself ('2 m ahead of me'): that's the sensor frame. The robot's body has its own frame (forward, left, relative to the robot, which moves as the robot moves). And the world/map has a fixed frame, where the map and the goal stay put no matter how the robot drives. Each thing is naturally described from its own landmark: the sensor sees from the sensor, the robot moves relative to its body, the map is fixed to the world, so the robot juggles all of them. Third, converting between frames is how 'the obstacle is 2 m ahead of my camera' becomes 'the obstacle is at this spot on the map'. Just as you have to translate 'left of me' into 'east of the station' before someone else can use your directions, the robot has to translate the obstacle's position from the camera's frame into the map's frame before it can plan around it, and to do that it needs to know how the frames relate (where the camera is on the robot, where the robot is in the world). That translation is a frame transformation. So: every position is relative to a frame (a landmark), a robot sees and moves and plans using several frames at once, and it constantly converts between them, and 'which frame is this in?' is the first question to ask, because most 'the robot put the obstacle in the wrong place' problems are really a frame mix-up, not a broken sensor.
FError Analysis Framework
- Treating a coordinate as a location without specifying its frame. Why: it's a precise number. Recognise: the same point has different coordinates in different frames. A frameless coordinate is ambiguous. Avoid: always pair a position/orientation with its frame ('which frame is this in?').
- Trying to force everything into one global coordinate system. Why: one frame seems simpler. Recognise: sensors measure in their own frame and the body moves in its frame, data is born local. Avoid: use several frames and convert between them (sensor -> body -> world) via transformations.
- Confusing a local (body/sensor) frame with a global (world/map) frame. Why: they're both coordinate systems. Recognise: local frames move with the robot; the global frame is fixed. They answer different questions. Avoid: transform between them; never treat a body/sensor-frame quantity as world-frame.
- Blaming the sensor or planner when an obstacle/goal is mislocated. Why: the obstacle appears in the wrong place. Recognise: the measurement is often right; a wrong/stale transform put it there. Avoid: check the chain of frame transforms first (frame errors are silent and the commonest cause).
GMini Challenge
Explain coordinate frames for a new roboticist: what a frame is, why a position is meaningless without one, the sensor/robot/world frames (local vs global), and frame transformations. Explaining why a robot uses several frames and why 'always know your frame' prevents the most common navigation bugs.
REVEAL MODEL ANSWER
What a frame is, and why a position needs one: a coordinate frame is a reference (an origin (the '(0,0,0)' point) plus axes (directions)) against which you measure position and orientation. A position is meaningless without a frame: '(2, 0)' is 'two along axis 1, zero along axis 2', but from which origin, whose axes? The same physical point has different coordinates in different frames, so a coordinate is really 'numbers in a particular frame' (state the frame or it's ambiguous).
The sensor/robot/world frames (local vs global): a robot uses a sensor frame (where a sensor measures from), a
robot/body frame (base_link, fixed to the robot: moves with it), and a world/map frame (fixed to the
environment). Local frames (body/sensor) move with the robot ('where relative to me?'); the global frame
(world/map) is fixed ('where in the world?'). Both are needed. Measuring and moving happen in local frames; maps
and goals live in the global frame.
Frame transformations: a transformation converts a point's coordinates from one frame to another (sensor -> robot -> world). It's how 'the lidar sees a point 2 m ahead' (sensor frame) becomes 'an obstacle at (x, y) on the map' (world frame), and how a goal (world frame) becomes 'drive this way' (body frame).
Why several frames: each thing is naturally described in its own frame: a sensor physically measures in its own frame, the robot moves in its body frame, the map/goals live in the fixed world frame: and these frames move relative to each other as the robot drives. The data is born local, so you know the relationships between frames and convert rather than forcing one global frame.
Why 'always know your frame' prevents bugs: a quantity in the wrong frame is silently wrong: treating a sensor-frame measurement as world-frame (or a stale/wrong robot pose, a flipped axis, mismatched units) puts the correctly-measured obstacle/goal in the wrong place, looking like a perception/planning bug but really a frame mistake. Since conversions fail silently (a confidently-wrong location, no error), robotics demands disciplined frame bookkeeping: 'which frame is this in?' is the first question, and the chain of transforms is the first thing to check when something is mislocated. This is why robotics builds the transform tree and tf2 (the Nav2 SLAM lesson) to track frame relationships over time, and why frames are the geometric backbone of kinematics, perception, localization, and navigation. The math of converting between frames is the next lesson (rotations & homogeneous transformations).
Quiz Check
A quick auto-graded check, separate from the recall cards above. Your score is pooled with the recall cards into this module's Mastery score, and completing this lesson requires the quiz submitted with pooled mastery at 80% or above.