Bird
Raised Fist0
ROSframework~10 mins

Robot frame conventions (base_link, odom, map) in ROS - Step-by-Step Execution

Choose your learning style10 modes available

Start learning this pattern below

Jump into concepts and practice - no test required

or
Recommended
Test this pattern10 questions across easy, medium, and hard to know if this pattern is strong
Concept Flow - Robot frame conventions (base_link, odom, map)
Start: Robot in environment
map frame: fixed world reference
odom frame: tracks robot movement over time
base_link frame: robot's own center
Sensors and actuators positions relative to base_link
Robot moves -> odom updates -> base_link moves
Localization corrects map->odom transform
Shows how the robot's position is tracked using three frames: map (fixed world), odom (robot's movement), and base_link (robot center).
Execution Sample
ROS
# Frames relationship example
map -> odom -> base_link
# Robot moves, odom updates position
# Localization adjusts map to odom
This shows the hierarchy and update flow of robot frames during movement and localization.
Execution Table
StepFramePosition UpdateReference FrameEffect
1mapStaticWorldFixed global reference
2odomUpdated by wheel odometrymapTracks robot movement over time
3base_linkUpdated by odomodomRobot's center position
4SensorsFixed relative to base_linkbase_linkSensor data positions
5Robot moves forwardodom position changesmapbase_link moves accordingly
6Localization correctionmap to odom transform adjustedmapCorrects odom drift
7base_linkUpdated by corrected odomodomAccurate robot position
💡 Robot position is accurately tracked by combining odom updates and map corrections.
Variable Tracker
VariableStartAfter MoveAfter LocalizationFinal
mapfixedfixedfixedfixed
odominitial positionupdated by movementcorrected by localizationcorrected position
base_linkinitial positionmoved with odomupdated with corrected odomaccurate robot center
Key Moments - 3 Insights
Why does the odom frame drift over time?
Because odom is updated by wheel sensors which accumulate small errors, shown in execution_table step 2 and 5.
What is the role of the map frame?
Map is a fixed global reference that does not move, providing a stable frame for localization corrections, as in step 1 and 6.
How does base_link relate to odom and map?
base_link moves with odom updates but is corrected by localization adjusting map to odom, ensuring accurate robot position (steps 3, 5, 7).
Visual Quiz - 3 Questions
Test your understanding
Look at the execution_table, at which step does localization correct odom drift?
AStep 4
BStep 6
CStep 2
DStep 7
💡 Hint
Check the 'Localization correction' row in execution_table step 6.
According to variable_tracker, what happens to odom after the robot moves but before localization?
AIt updates by movement
BIt stays fixed
CIt is corrected
DIt resets to zero
💡 Hint
Look at odom value in variable_tracker 'After Move' column.
If the robot's sensors moved relative to base_link, which step in execution_table would change?
AStep 3
BStep 1
CStep 4
DStep 5
💡 Hint
Sensors fixed relative to base_link is described in step 4.
Concept Snapshot
Robot frames hierarchy:
- map: fixed world frame
- odom: tracks robot movement, can drift
- base_link: robot center, moves with odom
Localization corrects map->odom to fix drift
Sensors fixed relative to base_link
This keeps robot position accurate in the world.
Full Transcript
In robot navigation, three main frames track position: map, odom, and base_link. The map frame is fixed and represents the world. The odom frame updates as the robot moves, but it can drift due to sensor errors. The base_link frame is the robot's center and moves with odom. Sensors are positioned relative to base_link. When the robot moves, odom updates and base_link moves accordingly. Localization adjusts the map to odom transform to correct drift, ensuring accurate robot positioning. This flow helps robots understand where they are in the world reliably.

Practice

(1/5)
1. Which ROS frame represents the robot's own center point and moves with it?
easy
A. map
B. base_link
C. odom
D. world

Solution

  1. Step 1: Understand the role of base_link

    base_link is the frame fixed to the robot itself, representing its center.
  2. Step 2: Compare with other frames

    odom tracks movement but can drift, map is a fixed global frame, and world is not a standard ROS frame here.
  3. Final Answer:

    base_link -> Option B
  4. Quick Check:

    Robot center frame = base_link [OK]
Hint: Remember: base_link moves with the robot itself [OK]
Common Mistakes:
  • Confusing odom as robot center
  • Thinking map moves with robot
  • Assuming world is standard ROS frame
2. Which of the following is the correct way to refer to the odometry frame in ROS?
easy
A. odom
B. odom_frame
C. map
D. base_link

Solution

  1. Step 1: Identify the standard odometry frame name

    The standard ROS frame for odometry is odom.
  2. Step 2: Check other options

    base_link is robot center, map is global frame, and odom_frame is not a standard name.
  3. Final Answer:

    odom -> Option A
  4. Quick Check:

    Odometry frame = odom [OK]
Hint: Odom frame is just 'odom', no extra suffix [OK]
Common Mistakes:
  • Adding '_frame' suffix incorrectly
  • Mixing base_link with odom
  • Using map instead of odom
3. Given a robot moving in a room, which frame will show drift over time due to sensor noise?
medium
A. world
B. map
C. base_link
D. odom

Solution

  1. Step 1: Understand frame drift

    The odom frame tracks movement from start but can accumulate errors causing drift.
  2. Step 2: Compare with other frames

    map is fixed and does not drift, base_link moves with robot, world is not standard here.
  3. Final Answer:

    odom -> Option D
  4. Quick Check:

    Drifting frame = odom [OK]
Hint: Odom drifts; map stays fixed [OK]
Common Mistakes:
  • Thinking map drifts
  • Confusing base_link with odom
  • Assuming world is used here
4. You notice your robot's position drifts over time when using the odom frame. What is the best way to fix this issue?
medium
A. Use the map frame for global localization
B. Switch to using the base_link frame for navigation
C. Reset the odom frame periodically
D. Ignore the drift as it is normal

Solution

  1. Step 1: Understand the cause of drift

    The odom frame drifts due to sensor noise and integration errors over time.
  2. Step 2: Choose a frame that corrects drift

    The map frame is fixed globally and used for localization to correct odom drift.
  3. Final Answer:

    Use the map frame for global localization -> Option A
  4. Quick Check:

    Fix drift with map frame [OK]
Hint: Use map frame to correct odom drift [OK]
Common Mistakes:
  • Using base_link which moves with robot
  • Resetting odom often is impractical
  • Ignoring drift causes navigation errors
5. You want to build a navigation system that uses sensor data to update the robot's position on a fixed map. Which sequence of frames should you use to correctly represent the robot's position relative to the world?
hard
A. odom -> base_link -> map
B. base_link -> odom -> map
C. map -> odom -> base_link
D. base_link -> map -> odom

Solution

  1. Step 1: Understand frame hierarchy

    The robot's position is relative to base_link, which is relative to odom, and odom is relative to map.
  2. Step 2: Determine correct parent-child order

    The correct chain is map (global fixed frame) -> odom (local odometry) -> base_link (robot center).
  3. Final Answer:

    map -> odom -> base_link -> Option C
  4. Quick Check:

    Global to robot: map -> odom -> base_link [OK]
Hint: Frame chain goes from map down to base_link [OK]
Common Mistakes:
  • Reversing frame order
  • Putting base_link as parent of odom
  • Ignoring map as global frame