Last modified 6 years ago Last modified on 06/02/15 10:52:15

Laser Cluster Detection Plugin

This plugins takes distance data from 2D laser range finders (LRF) and tries to find clusters in this data. The plugin supports running multiple clustering threads which each use their own set of parameters. This can be used, for example, to process data of multiple LRFs or to look for clusters with different parameters, e.g. different number of points or with enabled or disabled line removal.

Clusters are determined using euclidean cluster extraction using the PointCloud Library (PCL). Clusters are groups of points in the data based on the euclidean distance between points. The plugin can optionally remove lines before clustering, for example to filter out walls or other straight objects.


group of points in the data based on the euclidean distance between points
cluster thread
A thread performing clustering based on a specific configuration.


The configuration is flexible and allows for any number of cluster configuration. Each configuration has the following layout:


  # Configuration name

    # If this configuration is active and should be loaded
    active: true

    # Automatically start, i.e. set enabled to true?
    auto-start: true

    # input laser cloud
    input_cloud: urg-filtered

    # How to select the best cluster?
    # min-angle: minimum angle between forward direction and direction to cluster
    # min-dist: minimum distance from sensor to cluster centroid
    selection_mode: min-dist

    # The maximum number of clusters to publish on the blackboard
    # The interfaces will be named "Laser Cluster N" for N=1..max_num_clusters
    max_num_clusters: 3

    # How much must a cluster detection deviate from the previous to consider
    # this to be a different cluster (and thus restart the visibility history)
    switch_tolerance: 0.2

    # The frame in which the result should be published; frame
    result_frame: /base_link

      enable: false

      # Maximum number of iterations to perform for line segmentation
      segmentation_max_iterations: 250

      # Segmentation distance threshold; m
      segmentation_distance_threshold: 0.1

      # Minimum size of fraction of points that must be inliers to consider a table; 0.0..1.0
      segmentation_min_inliers: 30

      # Maximum distance between samples drawn from the cloud
      # This distance is important for the separation of lines if they are close.
      segmentation_sample_max_dist: 0.08

      # Minimum length of line to remove it
      min_length: 0.8

      # Clustering inter-point distance tolerance; m
      tolerance: 0.1

      # Minimum number of points in cluster to consider
      min_size: 4

      # Minimum number of points in cluster to consider
      max_size: 25

      # not that these values are in the sensor frame!
      min_x:  0.02
      max_x:  0.8
      min_y: -0.7
      max_y:  0.7

    # transpose the x-position of the detected cluster by the given offset
    # Note that this is in the result frame
      x: 0.0
      y: 0.0
      z: 0.0

BlackBoard Interfaces

For each cluster configuration, for example named <C>, the following interfaces are opened.

  • SwitchInterface::/laser-cluster/<C>: enable or disable input data processing, e.g. to save power when laser clusters are not required.
  • LaserClusterInterface::/laser-cluster/<C>: set some clustering parameters like how to order clusters (by angle or by distance) or a maximum depth to look in
  • Position3DInterface::/laser-cluster/<C>/<N>: for each cluster <N> in [1..M], where M is the configured maximum number of clusters for this configuration, the interface is used to provide the centroid position of the cluster.

Point Clouds

  • XYZ input point cloud: the ID is configured in the point_cloud config value.
  • XYZRGB output point cloud: the ID is /laser-cluster/<C> for a configuration named <C>. It contains all detected color-coded clusters and is mostly useful for visalization.

Compilation and Runtime Requirements

  • Laser plugin for laser input
  • Optional: ros, ros-tf, ros-pointclouds, rviz for visualization in rviz

Usage Instructions

After compiling the plugin setup a minimal configuration as explained above. Run Fawkes with a laser data source (real or simulated) and load the properly configured laser-clusters plugin. With ROS support enabled, the detected clusters can then be visualized in rviz.