15 #ifndef NAV2_COSTMAP_2D__DENOISE_LAYER_HPP_
16 #define NAV2_COSTMAP_2D__DENOISE_LAYER_HPP_
18 #include "nav2_costmap_2d/layer.hpp"
19 #include "nav2_costmap_2d/denoise/image_processing.hpp"
30 friend class DenoiseLayerTester;
39 void reset()
override;
52 double robot_x,
double robot_y,
double robot_yaw,
53 double * min_x,
double * min_y,
54 double * max_x,
double * max_y)
override;
68 int min_x,
int min_y,
int max_x,
int max_y)
override;
114 bool isBackground(uint8_t pixel)
const;
118 size_t minimal_group_size_{};
126 bool no_information_is_obstacle_{};
A 2D costmap provides a mapping between points in the world and their associated "costs".
Layer filters noise-induced standalone obstacles (white costmap pixels) or small obstacles groups.
void updateCosts(nav2_costmap_2d::Costmap2D &master_grid, int min_x, int min_y, int max_x, int max_y) override
Filters noise-induced obstacles in the selected region of the costmap The method is called when costm...
void onInitialize() override
Initializes the layer on startup This method is called at the end of plugin initialization....
void updateBounds(double robot_x, double robot_y, double robot_yaw, double *min_x, double *min_y, double *max_x, double *max_y) override
Reports that no expansion is required The method is called to ask the plugin: which area of costmap i...
bool isClearable() override
Reports that no clearing operation is required.
void reset() override
Reset this layer.
Image with pixels of type T Сan own data, be a wrapper over some memory buffer, or refer to a fragmen...
Abstract class for layered costmap plugin implementations.
A memory buffer that can grow to an upper-bounded capacity.
Object to eliminate grouped noise on the image Stores a label tree that is reused.
@ Way8
neighbors pixels are connected horizontally, vertically and diagonally