How does Nav2 calculate and provide the map -> odom transform? (REP 105)

Hi everyone,

I am designing the state estimation and navigation pipeline for a mobile robot in ROS 2 / Nav2, and I have a question about how the coordinate frame transformations work under REP 105.

REP 105 specifies the roles of the base_link, odom, and map frames. The odometry subsystem publishes odom -> base_link, and the localization system provides the global map -> odom transform to correct drift of the odometry system as I see it.

The first question is: How localization system is usually implemented? It is external sensor (e.g. Lidar) paired with software algorithm (e.g. SLAM?).

The second question is: How map->odom transform is provided?

My hypothesis is that localization nodes calculate map -> odom internally by:

  1. Acquiring the robot’s global pose from localizaton system map -> base_link.

  2. Querying odometry system for odom -> base_link

  3. Back-calculating the map -> odom

  4. Broadcasting map -> odom to the /tf topic.

  5. Then updated offset is used to account for the odometry system drift and update the route.

I am currently investigating the architecture and would appreciate any insight into whether I am thinking about this correctly before I write the implementation.

Thanks in advance.

That is correct for how many systems generate the map to odom transform - though some systems themselves might actually take in the odometry for its own use and/or produce it as part of its internal system (not always; but sometimes).