Turtlebot 3 with ROS Humble from last apt repositories: broken map_server

Hello,

I installed a working TB3 + Gazebo + Nav2 stack 1 month ago from apt repositories. I am now installing new setups on other computers and the Nav2 stack seems broken.

The /map topic is not being published by the map_server. That node apparently fails to configure. Here is a selection of the relevant log output:

~$ ros2 launch turtlebot3_navigation2 navigation2.launch.py map:=$HOME/map.yaml
[...]
[lifecycle_manager_localization]: e[34me[1mStarting managed nodes bringup...e[0me[0m
[component_container_isolated-1] [INFO] [1717492043.754857093] [lifecycle_manager_localization]: e[34me[1mConfiguring map_servere[0me[0m
[component_container_isolated-1] [INFO] [1717492043.755046456] [map_server]: Configuring
[component_container_isolated-1] [INFO] [map_io]: Loading yaml file: /home/kiwi/map.yaml
[component_container_isolated-1] [DEBUG] [map_io]: resolution: 0.05
[component_container_isolated-1] [DEBUG] [map_io]: origin[0]: -4.25
[component_container_isolated-1] [DEBUG] [map_io]: origin[1]: -0.424
[component_container_isolated-1] [DEBUG] [map_io]: origin[2]: 0
[component_container_isolated-1] [DEBUG] [map_io]: free_thresh: 0.25
[component_container_isolated-1] [DEBUG] [map_io]: occupied_thresh: 0.65
[component_container_isolated-1] [DEBUG] [map_io]: mode: trinary
[component_container_isolated-1] [DEBUG] [map_io]: negate: 0
[component_container_isolated-1] [INFO] [map_io]: Loading image_file: /home/kiwi/map.pgm
[component_container_isolated-1] [ERROR] [1717492043.755702071] [lifecycle_manager_localization]: Failed to change state for node: map_server
[component_container_isolated-1] [ERROR] [1717492043.755733308] [lifecycle_manager_localization]: Failed to bring up all requested nodes. Aborting bringup.
[component_container_isolated-1] [DEBUG] [map_io]: Read map /home/kiwi/map.pgm: 208 X 128 map @ 0.05 m/cell

Here is the map_server source code for the configure step. Something seem to fail between these lines.

How to reproduce the bug: Install a fresh VM or PC with ROS 2 Humble and run:

  • sudo apt install ros-humble-turtlebot3-navigation2 ros-humble-turtlebot3-simulations ros-humble-turtlebot3-teleop ros-humble-turtlebot3-cartographer
  • ros2 launch turtlebot3_gazebo turtlebot3_house.launch.py
  • save a map file if you don’t have one for the TB3 house
  • ros2 launch turtlebot3_navigation2 navigation2.launch.py map:=$HOME/map.yaml
  • You will see RViz2 not being able to display the map because /map topic is not published by map_server

It’s hard to tell if versions of apt packages are the same in both (working/non-working) computers because many packages are involved in the stack. But the TB3 integration to Nav2 is the same version:

~$ apt-cache madison ros-humble-turtlebot3-navigation2 
ros-humble-turtlebot3-navigation2 | 2.1.5-1jammy.20240518.064942 | http://packages.ros.org/ros2/ubuntu jammy/main amd64 Packages