Class CostmapDownsampler
Defined in File costmap_downsampler.hpp
Class Documentation
A costmap downsampler for more efficient path planning.
Public Functions
A constructor for CostmapDownsampler.
A destructor for CostmapDownsampler.
Configure the downsampled costmap object and the ROS publisher.
- Parameters:
node – Lifecycle node pointer
global_frame – The ID of the global frame used by the costmap
topic_name – The name of the topic to publish the downsampled costmap
costmap – The costmap we want to downsample
downsampling_factor – Multiplier for the costmap resolution
use_min_cost_neighbor – If true, min function is used instead of max for downsampling
Activate the publisher of the downsampled costmap.
Deactivate the publisher of the downsampled costmap.
Cleanup the publisher of the downsampled costmap.
Downsample the given costmap by the downsampling factor, and publish the downsampled costmap.
- Parameters:
downsampling_factor – Multiplier for the costmap resolution
- Returns:
A ptr to the downsampled costmap
Resize the downsampled costmap. Used in case the costmap changes and we need to update the downsampled version.
Protected Functions
Update the sizes X-Y of the costmap and its downsampled version.
Explore all subcells of the original costmap and assign the max cost to the new (downsampled) cell.
- Parameters:
new_mx – The X-coordinate of the cell in the new costmap
new_my – The Y-coordinate of the cell in the new costmap
Protected Attributes