FixTheRobot Explore Robotics / Systems Engineering / Troubleshooting

Troubleshooting · SLAM and localization

Map and odometry frames are inconsistent

Exactly one node should publish map→odom, and odom→base_link must be continuous. Check publishers before parameters.

  • Related modules: 06, 12
  • ROS 2 Jazzy

1. Symptoms

  • The robot jumps in RViz.
  • Two map frames appear or the transform flickers.
  • The planner replans constantly.

2. Possible causes

  • Two nodes publish map→odom (for example AMCL and a SLAM node).
  • A fused filter publishes odom with jumps because absolute sensors are fused into it.
  • Time stamps or use_sim_time mismatch.
  • Wrong frame names between packages.

3. Measurements to collect

  • Publishers on /tf for each pair.
  • Largest step in odom→base_link.
  • tf2_monitor output.

4. Diagnostic commands

Commands are not executed by the site’s automated tests (they need a ROS 2 Jazzy installation or the robot).

ros2 topic info /tf --verbose
ros2 run tf2_ros tf2_monitor
ros2 run tf2_tools view_frames

5. Step-by-step investigation

  1. Print the tree and find duplicate parents.
  2. Find the publishers for map→odom and keep one.
  3. Check odom continuity (REP 105).
  4. Check time settings.
  5. Check frame names in each package’s configuration.

6. Corrective actions

  • Run exactly one localiser publishing map→odom.
  • Keep absolute sensors out of the odom filter, or run a second filter for the map frame.
  • Fix time and frame names.

7. Validation after the fix

  • view_frames shows one chain map→odom→base_link; odom has no jumps in a long run.

References