π Cosmap Filters API#
ROS 2 API#
To interact with the Costmap Filters, you can refer to the following ROS 2 APIs.
Topics |
Services |
---|---|
The map_mask_server, global_costmap, and local_costmap nodes implement the Costmap Filters functionalities. To configure the global_costmap and local_costmap, please refer to the Costmap configuration guide.
To configure the map_mask_server you can refer to the following table containing the nodeβs parameters and their explanation:
Parameter |
Description |
---|---|
|
Whether to use simulation time or not. |
|
List of plugins to load. |
To configure the pal_map_masks::KeepoutMapMask
you can refer to the following table containing the pluginβs
parameters:
Parameter |
Description |
---|---|
|
Name of the plugin to load ( |
|
ROS 2 Topic in which it will publish the generated Map Mask. |
|
Value that will be used to replace the cells within the Highways Lanes (between 0.0 and 100.0). It indicates how desired that area is for the navigation (0.0 highly desirable to navigate in that area, 100.0 navigation forbidden). |
|
Value that will be used to replace the cells outside the Highways Lanes (between 0.0 and 100.0). It indicates how desired that area is for the navigation (0.0 highly desirable that the robot moves outside the Highways, 100.0 robot can only move within the highways). |
|
Value that will be used to replace the cells within the Virtual Obstacle Zones (between 0.0 and 100.0). It indicates how desired that area is for the navigation (0.0 highly desirable to navigate in that area, 100.0 navigation forbidden). |
To configure the pal_map_masks::SpeedMapMask
you can refer to the following table containing the pluginβs
parameters:
Parameter |
Description |
---|---|
|
Name of the plugin to load ( |
|
ROS 2 Topic in which it will publish the generated Map Mask. |
|
Value that will be used to replace the cells within the Speed Area (between 0.0 and 100.0). It indicates the desired speed percentage (0.0 robot not moving, 100.0 robot moving at nominal velocity). |
C++ API#
The pal_map_masks::MapMask
class provides an interface for creating and managing masks using occupancy grid data.
It also offers several utility functions to draw polygons and lanes on the mask.
For more information on how to create a new Map Mask Plugin, you can refer to 𧩠Costmap Filters Plugins.
Function |
Description |
---|---|
|
Configure the plugin with the provided node and plugin name.
|
|
Cleanup the plugin. This method should be overridden to implement custom cleanup logic. |
|
Activate the plugin. This method should be overridden to implement custom activation logic. |
|
Deactivate the plugin. This method should be overridden to implement custom deactivation logic. |
|
Generate the mask. This method should be overridden to implement custom mask generation logic.
|
|
Restore the mask using the last received |
|
Initialize the
|
|
Check whether the first
|
|
Convert the
|
|
Replace grid cell values in the mask with new specified values.
|
|
Draw polygons on the mask using the provided points and mask value.
|
|
Draw lanes on the mask using the provided points, mask value, and lane width.
|
|
Convert from a vector of
|
|
Transform a vector of
|