REP-103 & REP-105 — ROS standard conventions
REP (ROS Enhancement Proposal) is the official ROS convention document. REP-103 specifies the unit and axis direction. REP-105 specifies the names and relationships of standard frames that all ROS packages (Nav2, robot_state_publisher, slam_toolbox...) are assumed to have.
Failure to follow these two conventions does not immediately cause the program to report an error — everything still "works", it's just that the packages do not coordinate with each other in a way that is very difficult to detect (for example, Nav2 misunderstands centimeters as meters, the robot being commanded goes 100 times farther than expected).
REP-103: units and axes
The unit is always meters / second / radians — not centimeters, not degrees. The axis direction follows the right-hand rule: X points forward, Y points left, Z points up. Quaternion (0,0,0,1) means "no rotation".
REP-105: map → odom → base_link
| Frame | Features | How to update transform |
|---|---|---|
map | Absolutely fixed, origin at 1 point on the map | map→odom: discrete, step jump — every time AMCL/SLAM revises global position estimate |
odom | Origin is where the robot starts, never jumps | odom→base_link: continuous, smooth (e.g. 50 Hz, calculated from wheel encoders) but gradually drifts — errors accumulate, nothing is corrected |
base_link | Rigidly attached to the robot itself | — |
See drift and jumps, directly on the graph
The dotted gray line is the robot's actual position. The orange line (odom) gradually drifts away from the real line — nothing corrects itself. The blue line (position in frame map) follows the odom but is periodically "corrected" — each correction is a jump in transform map→odom.
Why separate instead of combining 1 frame map→base_link?
The locomotion controller (local controller, Module 10) needs smooth, non-jumping data to calculate the velocity command. If you use map→base_link straight (can jump each time AMCL corrects), the robot will jerk every time the localization error is corrected. Separating odom as an intermediate frame is always smooth for local control, while map→odom only affects "global" understanding (global planning), does not affect instantaneous movement.
Try it
Testing real units on real data — requires 2 terminals (already source install/setup.bash, see Module 0):
# Terminal 1 — keep running; do not close
ros2 run ros2_basics tf_broadcaster
# Terminal 2 — Ctrl+C to stop
ros2 run tf2_ros tf2_echo world moving_frame
Translation prints in meters, Rotation (RPY) prints in radians — correct REP-103, not cm/degrees.
Example in the Atlas project
diff_drive_controller(Module 5) self-publishesodom→base_footprintcontinuously from the wheel encoders — this data gradually drifts along the path.amcl(Module 9) publishmap→odom— only updated when there is a new estimate, not continuously likeodom→base_link. Correct reason:local_costmapconfigureglobal_frame: odom(needs to be smooth) andglobal_costmapusesglobal_frame: map(needs absolute correct position) — two different choices, not random.