Hello,
I am working with PX4 SITL, Gazebo Harmonic, and ROS2 Humble, bridging LiDAR data from Gazebo to ROS2 using ros_gz_bridge. The /scan topic appears in ros2 topic list, but there are no messages arriving on /scan—not in ros2 topic echo /scan, not in my Python rclpy subscriber, and not in SLAM Toolbox.
Log:
sqplab@lab:~$ ros2 launch drone_slam slam.launch.py
[INFO] [launch]: All log files can be found below /home/sqplab/.ros/log/2025-09-16-01-36-37-754979-lab-102077
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [parameter_bridge-1]: process started with pid [102078]
[INFO] [parameter_bridge-2]: process started with pid [102080]
[INFO] [python3-3]: process started with pid [102082]
[INFO] [static_transform_publisher-4]: process started with pid [102084]
[INFO] [async_slam_toolbox_node-5]: process started with pid [102086]
[INFO] [rviz2-6]: process started with pid [102088]
[static_transform_publisher-4] [WARN] [1757954197.794909558] []: Old-style arguments are deprecated; see --help for new-style arguments
[static_transform_publisher-4] [INFO] [1757954197.812084381] [static_transform_publisher_KTihlJm5bIFhHNSM]: Spinning until stopped - publishing transform
[static_transform_publisher-4] translation: ('0.000000', '0.000000', '0.260000')
[static_transform_publisher-4] rotation: ('0.000000', '0.000000', '0.000000', '1.000000')
[static_transform_publisher-4] from 'base_link' to 'link'
[parameter_bridge-2] [INFO] [1757954197.841174400] [ros_gz_bridge]: Creating GZ->ROS Bridge: [/world/walls/model/x500_lidar_2d_0/link/link/sensor/lidar_2d_v2/scan (gz.msgs.LaserScan) -> /world/walls/model/x500_lidar_2d_0/link/link/sensor/lidar_2d_v2/scan (sensor_msgs/msg/LaserScan)] (Lazy 0)
[parameter_bridge-2] [INFO] [1757954197.843000226] [ros_gz_bridge]: Creating ROS->GZ Bridge: [/world/walls/model/x500_lidar_2d_0/link/link/sensor/lidar_2d_v2/scan (sensor_msgs/msg/LaserScan) -> /world/walls/model/x500_lidar_2d_0/link/link/sensor/lidar_2d_v2/scan (gz.msgs.LaserScan)] (Lazy 0)
[parameter_bridge-1] [INFO] [1757954197.844460265] [ros_gz_bridge]: Creating GZ->ROS Bridge: [/clock (gz.msgs.Clock) -> /clock (rosgraph_msgs/msg/Clock)] (Lazy 0)
[async_slam_toolbox_node-5] [INFO] [1757954197.851204108] [slam_toolbox]: Using solver plugin solver_plugins::CeresSolver
[rviz2-6] [INFO] [1757954198.863523151] [rviz2]: Stereo is NOT SUPPORTED
[rviz2-6] [INFO] [1757954198.863694584] [rviz2]: OpenGl version: 4.2 (GLSL 4.2)
[rviz2-6] [INFO] [1757954198.896705197] [rviz2]: Stereo is NOT SUPPORTED
[INFO] [ros2-7]: process started with pid [102204]
[ros2-7] Node not found
[ERROR] [ros2-7]: process has died [pid 102204, exit code 1, cmd 'ros2 lifecycle set /slam_toolbox configure'].
[INFO] [ros2-8]: process started with pid [102231]
[ros2-8] Node not found
[ERROR] [ros2-8]: process has died [pid 102231, exit code 1, cmd 'ros2 lifecycle set /slam_toolbox activate'].
Symptoms and Setup:
-
SLAM Toolbox fails to configure/activate due to “Node not found” errors in the launch log.
-
/scantopic exists, but no data/messages are published to it. -
My Python script subscribes to
/scanwithLaserScanbut the callback is never triggered. -
All nodes (including SLAM Toolbox and RViz2) use
use_sim_time: true;/clockis publishing as expected. -
The ros_gz_bridge logs show the bridges for
/scanand/clockwere created successfully (Lazy 0). -
There are no critical errors in the bridge or simulation logs.
Checks I have made:
-
Confirmed
/scantopic exists viaros2 topic list -
Checked that there is no echo output:
ros2 topic echo /scanstays blank -
Verified QoS compatibility (tried both default and Best Effort in Python)
-
The LaserScan plugin is loaded in the Gazebo world, and bridging appears to work on the Gazebo side
Questions:
-
Why does the
/scantopic exist with no data being published, even though the bridges are created and the plugin is loaded? -
What could prevent both
ros2 topic echoand my Python subscriber from receiving any messages? -
Could the SLAM Toolbox lifecycle failures be related to receiving no LaserScan data, and how can I decouple/debug these?
-
Are there known bridge, plugin, or QoS caveats with this stack (PX4 SITL + Gazebo Harmonic + ROS2 + ros_gz_bridge + SLAM Toolbox)?
Any debugging tips or configuration suggestions would be greatly appreciated!
Thank you!