[Nav2] Denoise Layer for particles filtering on maps

Hi all!

ROS 2โ€™s Nav2 stack recently acquired the new great feature: Denoise Layer Costmap2D plugin.

Have you ever experienced annoying noise particles in costmaps?
Such particles might appear on maps due to lidar/radar sensors noise, due to projecting parts or antennas of the robot above the sensors, due to imprecise localization shifts between map and sensors data, or as residual tracks following after moving objects.

If you met this (and if not - so even more :wink: ) this announcement is for you!
Made by ryzhikovas ยท GitHub, this feature removes residual dust noise particle groups out from costmaps.
The work contains its own implementation of the OpenCV cv::dilate() and cv::connectedComponents() functions that are briefly doing this.

The performance of the solution is comparable with OpenCV, but we do not need to haul the tons of dependencies onboard, which is vital for small robots with lack extra of CPU and RAM powers:

The Denoise Layer has minimal set of parameters is working out-of-the box, as described on its own parameters page:
https://navigation.ros.org/configuration/packages/costmap-plugins/denoise.html
So, you can choose the size of noise particle and start filtering the maps!

To quickly set up your own filter, please refer to the simple tutorial:
https://navigation.ros.org/tutorials/docs/filtering_of_noise-induced_obstacles.html

For ones who want to dive deeper into denoise core algorithms, the following presentation, prepared by your humble servant, might be useful:
DenoiseLayer_CodeStructure.pdf (879.4 KB)

As usual, Denoise Layer has a high quality of testing with more than 97% code coverage, which is especially important for reliability of new functions delivered to ROS2.
Thanks to Steve @smac for his constant and mindful review of this feature, that really did help to make the wise solutions!

And happy noise-filtering!

-Alex

6 Likes