Unable to get /map on Rviz2 in RosbotXL with ROS2 Humble

Hi,

I am trying to run SLAM on RosbotXL with ROS2 Humble version using dockers but I am unable to see the /map topic in map Display on Rviz2. I am keeping the fixed frame as base_link. Laser scan display works with /scan topic but the map is not received. This was the docker-compose.yaml file stored in ros2_ws:

x-common-config:
&common-config
network_mode: host
ipc: host
restart: unless-stopped
environment:
- ROBOT_NAMESPACE
- USER

services:
astra:
image: husarion/astra:humble-nightly
<<: *common-config
devices:
- /dev/bus/usb/
command: >
ros2 launch /husarion_utils/astra.launch.py

rosbot:
image: husarion/rosbot:humble-0.13.1-20240201
<<: *common-config
devices:
- ${SERIAL_PORT:-/dev/ttyUSB0}
command: >
ros2 launch rosbot_bringup combined.launch.py
mecanum:=${MECANUM:-False}
serial_port:=${SERIAL_PORT:-/dev/ttyUSB0}
serial_baudrate:=576000

rplidar:
image: husarion/rplidar:humble-1.0.1-20240104
<<: *common-config
devices:
- /dev/ttyRPLIDAR:/dev/ttyUSB0
command: >
ros2 launch /husarion_utils/rplidar.launch.py
serial_baudrate:=${LIDAR_BAUDRATE:-256000}
serial_port:=/dev/ttyUSB0

slam-toolbox:
image: husarion/slam-toolbox:humble-22-11-25
<<: *common-config
volumes:
- ./config/slam_toolbox_params.yaml:/slam_params.yaml
command: >
ros2 launch slam_toolbox online_sync_launch.py slam_params_file:=/slam_params.yaml use_sim_time:=false

And also the slam_toolbox_params.yaml file in ros2_ws/config:

sync_slam_toolbox_node:
ros__parameters:
use_sim_time: false
slam_toolbox_mode: mapping
resolution: 0.05
map_update_interval: 2.0
max_laser_range: 10.0
minimum_time_interval: 0.5
transform_publish_period: 0.02
mode: synchronous
scan_topic: scan
odom_topic: rosbot_xl_base_controller/odom
map_file_name: /tmp/map

The dockers start fine with docker compose up -d as shown below:

docker compose up -d
[+] Running 4/4
:heavy_check_mark: Container ros2_ws-astra-1 Started 0.2s
:heavy_check_mark: Container ros2_ws-rplidar-1 Started 0.2s
:heavy_check_mark: Container ros2_ws-rosbot-1 Started 0.2s
:heavy_check_mark: Container ros2_ws-slam-toolbox-1 Started

And I can also see the /map topic in ros2 topic list as shown below:

ros2 topic list
/battery_state
/camera/color/image_raw
/cmd_vel
/diagnostics
/dynamic_joint_states
/imu_broadcaster/imu
/imu_broadcaster/transition_event
/joint_state_broadcaster/transition_event
/joint_states
/joy
/laser_scan_box_filter/transition_event
/map
/map_metadata
/odometry/filtered
/parameter_events
/pose
/robot_description
/rosbot_base_controller/odom
/rosbot_xl_base_controller/odom
/rosbot_xl_base_controller/transition_event
/rosout
/scan
/scan_filtered
/set_pose
/slam_toolbox/feedback
/slam_toolbox/graph_visualization
/slam_toolbox/scan_visualization
/slam_toolbox/update
/tf
/tf_static

Where exactly am I going wrong here? Any suggestions will be very helpful for me as I urgently need to perform SLAM on RosbotXL for my research project.

We don’t really use the slam service you mentioned. I suggest starting a navigation and mapping project based on this repository: GitHub - husarion/rosbot-xl-autonomy: Using SLAM Toolbox and Nav2 with ROSbot XL

Thanks a lot! It worked.

But I am unable to view the ZED camera on Rviz2. Is there any separate repository for using ZED camera or do we need add some lines in the compose.yaml file?

Thank you for the information. I’m glad it works.

The ZED camera is a very specific sensor with frequent updates and many dependencies. We decided that for this sensor, it’s best for the user to configure the camera according to the manufacturer’s instructions. Otherwise, frequent package updates and proper configuration management would be problematic. And we’re not a large enough team to be able to perform these kinds of updates regularly.