Software
laser_scan_merger
From github.com/BruceChanJianLe/laser_scan_merger (opens in a new tab)
- Perception
- Tool
- Apache-2.0
A ROS 2 package that merges up to nine laser scan topics into one scan, using a multithreaded design and approximate time filtering.
Facts
- GitHub stars
- 2read on 28 Nov 2026
- Last update
- 3 Jul 2026Newest commit on master
- Maintenance
- Maintaineda commit in the last 12 months
- Difficulty
- Beginner
Checked on GitHub on 28 Nov 2026.
Licenses
- Code
- Apache-2.0 (opens in a new tab)
Read by Robotheca from LICENSE (opens in a new tab) (Apache-2.0) at commit 05b7971 (opens in a new tab), on 16 Oct 2026.
- Commercial use
- Yes
At a glance
- What it is
- Merges between 2 and 9 input laser scan topics into a single merged scan topic.
- Uses approximate time synchronization with a configurable queue size to match scans.
- Lets each input topic use a reliable or best-effort sync policy.
- Transforms scans into a common output frame, with an option for moving frames.
- Configurable angular range, angular resolution, and minimum/maximum valid range.
- Includes a demo launch file and supports per-robot configuration files.
Robotheca's summary of the project's documents, not the creator's words.
- Robots on Robotheca
- No robot on Robotheca uses it yet.
- Licence
- Apache-2.0. Commercial use: Yes. Where it was read
- Install
- In the creator's words: The project's README (opens in a new tab)
- Maintenance
- Maintained, last commit on 3 Jul 2026.
Use it
How to install it, in the creator's words: The project's README (opens in a new tab)
Robotheca doesn't review code. Read it before running it.
Files and versions
- Repository on GitHubgithub.com/BruceChanJianLe/laser_scan_merger (opens in a new tab)
- The version Robotheca read05b7971 (opens in a new tab)
- Latest releaseNone published on GitHub
Robotheca never hosts the code: each link goes to the creator's own page.
The README
The creator's own README, copied as written: README.md by @BruceChanJianLe, at commit 05b7971, under Apache-2.0 (opens in a new tab). The original on GitHub (opens in a new tab).
Read the README here
A ROS2 Laser Scan Merger
A multithreaded laser scan merger, aims to be blazingly fast. This package merges up to 9 laser scans with approximate time filter.
Parameters
| Parameter Name | Type | Default Value | Description |
|---|---|---|---|
scan_topics | std::vector<std::string> | [] | List of input laser scan topics to merge. [2 <= scan_topics <= 9] |
scan_policies | std::vector<int64_t> | [] | Sync policies for each scan topic [0 - reliable, 1 - best effort] |
merged_frame_id | std::string | "base_link" | Frame ID for the merged laser scan output. |
output_topic | std::string | "merged_scan" | Topic name to publish the merged laser scan. |
debug | bool | false | Enables debug output/logging. |
moving_frames | bool | false | Indicates if scan frames are moving, otherwise transformation will only be calculated once. |
queue_size | int | 20 | How many sets of messages it should store from each input filter (by timestamp) while waiting for messages to arrive and complete their "set". Refer to message_filters package. |
angle_min | double | -π | Minimum angle of the merged scan in radians. Defines the start of the angular range. [rad] |
angle_max | double | π | Maximum angle of the merged scan in radians. Defines the end of the angular range. [rad] |
angle_increment | double | π / 180 | Angular resolution of the merged scan in radians. Smaller values provide higher resolution but larger message sizes. [rad] |
range_min | double | 0.1 | Minimum valid range value in meters. Points closer than this distance will be ignored. [m] |
range_max | double | std::numeric_limits<double>::max() | Maximum valid range value in meters. Points farther than this distance will be ignored. [m] |
inf_epsilon | double | 1.0 | Epsilon value for handling infinite range readings. Used to determine when a range should be considered infinite. [m] |
use_inf | bool | true | Enable reporting of infinite ranges as +inf instead of range_max + inf_epsilon. |
scan_time | double | 1.0 / 30.0 | Expected time between scan rays in seconds. Used for time-based interpolation and synchronization. [s] |
min_height | double | std::numeric_limits<double>::min() | Minimum height from merged_frame_id in which a point is considered. [m] |
max_height | double | std::numeric_limits<double>::max() | Maximum height from merged_frame_id in which a point is considered. [m] |
tolerance | double | 0.01 | TF lookup tolerance for transform timing. |
Build
- Create workspace
mkdir ls_ws/src -p
cd ls_ws/src
git clone https://github.com/BruceChanJianLe/laser_scan_merger.git --recurse-submodules
- Install dependencies
cd ls_ws
rosdep install --from-paths src --ignore-src -r -y
colcon build --symlink-install
source install/setup.bash
Usage
- Run demo
ros2 launch laser_scan_merger start_demo.launch.py
- Use your own robot config file
cd ls_ws/src/laser_scan_merger/config
mkdir your_robot_config
cp example/param.yaml your_robot_config/param.yaml
# Now you may update your param.yaml based on your own requirement
- Launch your own robot config
ros2 launch laser_scan_merger start.launch.py robotname:=your_robot_config
Code Formatting
This project uses clang-format (opens in a new tab) for code style. To format all C++ files:
find . -name "*.cpp" -o -name "*.hpp" | xargs clang-format -i
Robotheca lists software as a reference: nothing is hosted or run here, and every fact links to where it was read.