Skip to content

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

Facts read at commit 05b7971

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.

Image

Parameters
Parameter NameTypeDefault ValueDescription
scan_topicsstd::vector<std::string>[]List of input laser scan topics to merge. [2 <= scan_topics <= 9]
scan_policiesstd::vector<int64_t>[]Sync policies for each scan topic [0 - reliable, 1 - best effort]
merged_frame_idstd::string"base_link"Frame ID for the merged laser scan output.
output_topicstd::string"merged_scan"Topic name to publish the merged laser scan.
debugboolfalseEnables debug output/logging.
moving_framesboolfalseIndicates if scan frames are moving, otherwise transformation will only be calculated once.
queue_sizeint20How 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_mindouble-πMinimum angle of the merged scan in radians. Defines the start of the angular range. [rad]
angle_maxdoubleπMaximum angle of the merged scan in radians. Defines the end of the angular range. [rad]
angle_incrementdoubleπ / 180Angular resolution of the merged scan in radians. Smaller values provide higher resolution but larger message sizes. [rad]
range_mindouble0.1Minimum valid range value in meters. Points closer than this distance will be ignored. [m]
range_maxdoublestd::numeric_limits<double>::max()Maximum valid range value in meters. Points farther than this distance will be ignored. [m]
inf_epsilondouble1.0Epsilon value for handling infinite range readings. Used to determine when a range should be considered infinite. [m]
use_infbooltrueEnable reporting of infinite ranges as +inf instead of range_max + inf_epsilon.
scan_timedouble1.0 / 30.0Expected time between scan rays in seconds. Used for time-based interpolation and synchronization. [s]
min_heightdoublestd::numeric_limits<double>::min()Minimum height from merged_frame_id in which a point is considered. [m]
max_heightdoublestd::numeric_limits<double>::max()Maximum height from merged_frame_id in which a point is considered. [m]
tolerancedouble0.01TF lookup tolerance for transform timing.
Build
  1. Create workspace
mkdir ls_ws/src -p
cd ls_ws/src
git clone https://github.com/BruceChanJianLe/laser_scan_merger.git --recurse-submodules
  1. Install dependencies
cd ls_ws
rosdep install --from-paths src --ignore-src -r -y
colcon build --symlink-install
source install/setup.bash
Usage
  1. Run demo
ros2 launch laser_scan_merger start_demo.launch.py
  1. 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
  1. 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.