Skip to content

Software

laser_segmentation

From github.com/ajtudela/laser_segmentation (opens in a new tab)

  • Perception
  • Library
  • Apache-2.0

A ROS2 package that splits 2D laser scans into segments of beams using jump-distance clustering methods, with an online-reconfigurable interface.

Facts

GitHub stars
39read on 28 Nov 2026
Last update
3 Aug 2026Newest commit on main
Maintenance
Maintaineda commit in the last 12 months
Difficulty
Intermediate

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 22d0f4d (opens in a new tab), on 16 Oct 2026.

Commercial use
Yes

At a glance

What it is
  • Splits laser scans into subsets of beams whenever the distance between adjacent beams exceeds a threshold.
  • Offers a jump distance clustering method and a variant that merges over-segmented small clusters, common outdoors.
  • Can compute a dynamic jump distance threshold using the Lee, Dietmayer or Santos methods.
  • Filters segments by point count, average distance from the sensor, and width.
  • Publishes the resulting segments and RViz2 markers for segments, their ids and centroids.
  • Parameters and filters can be changed online through a dynamic reconfigure server.

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 Aug 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 22d0f4d

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 @ajtudela, at commit 22d0f4d, under Apache-2.0 (opens in a new tab). The original on GitHub (opens in a new tab).

Read the README here

laser_segmentation

(opens in a new tab) (opens in a new tab)

Overview

Implementation of different algorithms for segmentation of laserscans, splitting them into subsets of beams, with a ROS2 interface. The currently implemented algorithm are:

  • Jump distance clustering: widely used method for 2D laser range data in mobile robotics. It's a simple and fast method to segment the scans: if the Euclidean distance between two adjacent beams exceeds a given threshold distance, a new segment is generated.
  • Jump distance clustering and merge: Similar algorithm as above but checks if pre-predecessor segments are close to each other. This deals with over-segmented data with many small cluster in outdoor environment. It uses the same threshold condition twice.

In the two implementation mentioned above the jump distance threshold is fixed. However, a dynamic jump distance threshold can be calculated using methods of Lee (Lee, 2001), Dietmayer (Dietmayer, et al., 2001) and Santos (Santos, et al., 2003). See the parameters list below to change between them.

Includes a dynamic reconfigure server parameter to change online the configuration of the algorithms and the filtering.

Laser scanSegments
LaserScanSegments

Keywords: ROS2, laser, segmentation, clustering

**Author: Alberto Tudela **

The laser_segmentation package has been tested under ROS2 (opens in a new tab) Rolling on Ubuntu (opens in a new tab) 24.04. This is research code, expect that it changes often and any fitness for a particular purpose is disclaimed.

Installation
Binaries

On Ubuntu 24.04 you can install the latest version of this package using the following command

sudo apt-get update
sudo apt-get install ros-rolling-laser-segmentation
Building from Source
Dependencies
Building

To build from source, clone the latest version from the main repository into your colcon workspace and compile the package using

cd colcon_workspace/src
git clone https://github.com/ajtudela/laser_segmentation.git -b rolling
cd ../
rosdep install -i --from-path src --rosdistro rolling -y
colcon build --symlink-install
Usage

With some scan source running, run the laser_segmentation node with:

ros2 launch laser_segmentation segmentation.launch.py
Nodes
laser_segmentation

Segmentation of the laserscans.

Subscribed Topics
Published Topics
Parameters
  • scan_topic (string, default: "scan")

    Topic of the laserscan.

  • segments_topic (string, default: "segments")

    Topic of the segmented laser scan.

  • segmentation_type (string, default: "jump_distance")

    Choose between several segmentation algorithms. Jump distance clustering (jump_distance) and jump distance and merge (jump_distance_merge).

Parameters for filtering
  • min_points_segment (int, default: 3)

    Minimium number of points per segment.

  • max_points_segment (int, default: 200)

    Maximum number of points per segment.

  • min_avg_distance_from_sensor (double, default: 0.0)

    Minimium average distance from sensor.

  • max_avg_distance_from_sensor (double, default: 20.0)

    Maximum average distance from sensor.

  • min_segment_width (double, default: 0.2)

    Minimium width of the segment.

  • max_segment_width (double, default: 10.0)

    Maximum width of the segment.

Parameters for segmentation algorithms
  • method_threshold (string, default: "")

    Method to calculate a dynamic jump distance threshold in jump_distance or jump_distance_merge algorithms. This value and methods are based on lee (Lee, 2001), diet (Dietmayer, et al., 2001) or santos (Santos, et al., 2003).

  • distance_threshold (double, default: 0.3)

    If none of the algorithms mentioned above is selected, this parameters will be use as the jump distance above which a new segment is created.

  • noise_reduction (double, default: 0.3)

    Parameter for noise reduction in "Santos" and "Dietmayer" algorithms.

Robotheca lists software as a reference: nothing is hosted or run here, and every fact links to where it was read.