ros-perception / laser_filters

Assorted filters designed to operate on 2D planar laser scanners, which use the sensor_msgs/LaserScan type.
BSD 3-Clause "New" or "Revised" License
164 stars 200 forks source link

New filter for radius outlier removal #93

Closed nlimpert closed 4 years ago

nlimpert commented 4 years ago

This PR adds a new filter inspired by PCL's RadiusOutlierRemoval to allow a radius-based filtering based on plain distances between points. I found this useful to overcome sensor noise being problematic specially for navigation purposes, where false-positive measurements are marked as obstacles. In contrast I couldn't figure out how to properly configure the ScanShadowFilter to achieve a robust filtering of generic sensor noise.

The implementation is based on (and also inspired by) the ScanShadowFilter.

The radius_search parameter specifies the maximum allowed distance of a neighboring point to be considered as a valid neighbor. The parameter min_neighbors specifies how many neighbors have to be found to consider the point to remain in the output. The window parameter specifies how many consecutive measurements to take into account.

The following screenshot shows a sample of a robot running the new filter: Screenshot of robot running radius_outlier_filter The laser measurements colored in magenta represent the raw, unfiltered laser while the cyan ones are the filtered measurements. The configuration of this scenario is the same as found in the example - being:

    radius_search: 0.4
    min_neighbors: 10
    window: 10

I have also created a video demonstrating the new filter: https://fh-aachen.sciebo.de/s/Mf9QgE8SMC8y3Aw Note that in this video RViz is configured with Decay Time = 2 for the filtered laser to highlight the result.

nlimpert commented 4 years ago

@jonbinney would you have the time for a review? :)

jonbinney commented 4 years ago

Will try to get to this tomorrow!

nlimpert commented 4 years ago

Thanks for the review! Is there a chance for a new release including this? :)

jonbinney commented 4 years ago

Sure - are you on melodic?

nlimpert commented 4 years ago

Sure - are you on melodic?

Yes. Thanks a lot!

jonbinney commented 4 years ago

Release 1.8.10 created: https://github.com/ros/rosdistro/pull/24413