ROS2 2D-Scan Merger merges unlimited LiDARs, no PCL required
Merge multiple 2D LiDAR scans into one LaserScan without PCL or paid tools.
Existing solutions for merging multiple 2D LiDAR scans in ROS2 often impose painful compromises: paid licenses, heavy PCL dependencies, intermediate PointCloud2 conversions, and compile-time caps on sensor count. Ali Pahlevani’s new open-source package eliminates all of that. The core node subscribes to an arbitrary number of LaserScan topics, synchronizes them in time, transforms each scan via TF2, and publishes a single unified LaserScan. The key technical trick is direct polar-to-bin projection using a persistent C++20 thread pool, which avoids any PointCloud2 conversion and removes the need for PCL entirely. The node also supports per-topic QoS settings (mixing reliable and best-effort publishers) and a two-pass sync safety mechanism to prevent silent data loss on partial sync failures.
Performance-wise, the merge runs with near-zero per-callback overhead thanks to parallel ray projection. There is no compile-time limit on the number of LiDAR inputs—users can add as many sensors as their hardware can handle. The package is compatible out of the box with ROS2 Humble, Iron, Jazzy, and Kilted Kaiju. This makes it a drop-in replacement for teams running multi-LiDAR setups on ground robots, drones, or autonomous vehicles. The GitHub repository is open for contributions and feedback, and the developer asks for a simple star as thanks. For ROS2 developers tired of bloated or paid fusion pipelines, this is a clean, efficient, and free alternative.
- Supports unlimited LiDAR inputs with no compile-time cap on sensor count.
- Zero intermediate PointCloud2 conversion or PCL dependency—uses direct polar-to-bin projection.
- Utilizes a persistent C++20 thread pool for parallel ray projection; compatible with ROS2 Humble, Iron, Jazzy, and Kilted Kaiju.
Why It Matters
Free, efficient multi-LiDAR fusion for ROS2 robots, removing cost and complexity barriers for SLAM and navigation.