Hi everyone,
I’m running a PX4 SITL simulation with ROS2 Noble and trying to perform 2D mapping using SLAM Toolbox. Most components seem to work, but the LiDAR scan is not being integrated into the map or odometry.
System Setup
-
Ubuntu 24.04
-
ROS2 Rolling
-
PX4 SITL (Gazebo Harmonic, drone with 2D LiDAR)
-
MAVROS (ROS2 version)
-
SLAM Toolbox
-
ros_gz_bridge and relay providing
/scan
Current Behavior
-
/scantopic is active and visible in RViz. -
LiDAR data displays correctly in:
base_link frame link (lidar_link) frame -
MAVROS publishes:
/mavros/local_position/odom
However:
-
The map does not update in map or odom, only update in link and base_link.
-
No LiDAR scan data appears in the
maporodomframe
There are 3 topics that have odom:
/mavros/odometry/in
/mavros/odometry/out (echo received nothing)
/mavros/local_position/odom (Publish frame_id “map” instead of “odom”)
Even when I try to change the yaml file for the /mavros/local_position/odom to publish tf to odom, there is no laser scan appare. The only case where the laser scan appear in odom is using the static transform directly on odom - base_link.





