Skip to content

Enhancement Suggestions for LiDAR SLAM ROS2 Wrapper

Hi, first of all — thanks for open-sourcing your LiDAR SLAM project! I've been working with it and had a few ideas that could help improve usability and performance:

1. Split custom interfaces into a separate package

Separating the custom message/service/action definitions into their own lidar_slam_interfaces package makes it easier to interact with the SLAM system from other nodes without having to build the full SLAM stack. This is especially helpful when using Docker and building only what's necessary.

2. Add support for Composable Nodes

Using the ROS 2 composition approach allows nodes like lidar_slam_node and aggregation_node to be loaded into the same process as other nodes (e.g., the Velodyne driver). This enables faster inter-node communication by avoiding serialization overhead between processes.

3. Use pluginlib to include the lidar conversion into the slam callback

Using pluginlib to integrate the LiDAR conversion directly into the SLAM callback streamlines the processing pipeline. Instead of using a separate node that subscribes to a sensor_msgs/PointCloud2 message, converts it to a PCL cloud, converts it to a PCL cloud with the correct point type, converts it back to a sensor_msgs/PointCloud2 message, and then sends it to the SLAM node (which converts it back to PCL), you can perform the conversion once inside the SLAM callback. This approach eliminates the need to start another node and integrates the conversion within the frame computation time, resulting in a more accurate latency-corrected output. (I tested this for the velodyne here)


I've already implemented both changes in my fork — feel free to take a look or use any of it! 🙂

Edited by Maik