15 #ifndef NAV2_COSTMAP_2D__PLUGIN_CONTAINER_LAYER_HPP_
16 #define NAV2_COSTMAP_2D__PLUGIN_CONTAINER_LAYER_HPP_
23 #include "rclcpp/rclcpp.hpp"
24 #include "nav2_costmap_2d/layer.hpp"
25 #include "nav2_costmap_2d/layered_costmap.hpp"
26 #include "nav2_costmap_2d/costmap_layer.hpp"
27 #include "nav2_costmap_2d/observation_buffer.hpp"
28 #include "nav2_costmap_2d/inflation_layer.hpp"
29 #include "nav2_ros_common/tf2_factories.hpp"
30 #include "pluginlib/class_loader.hpp"
32 using nav2_costmap_2d::LETHAL_OBSTACLE;
33 using nav2_costmap_2d::INSCRIBED_INFLATED_OBSTACLE;
34 using nav2_costmap_2d::NO_INFORMATION;
35 using rcl_interfaces::msg::ParameterType;
67 double * max_y)
override;
96 void reset()
override;
105 void clearArea(
int start_x,
int start_y,
int end_x,
int end_y,
bool invert)
override;
107 void addPlugin(std::shared_ptr<Layer> plugin, std::string layer_name);
108 pluginlib::ClassLoader<Layer> plugin_loader_{
"nav2_costmap_2d",
"nav2_costmap_2d::Layer"};
118 const std::vector<rclcpp::Parameter> & parameters);
130 rclcpp::node_interfaces::PostSetParametersCallbackHandle::SharedPtr post_set_params_handler_;
131 rclcpp::node_interfaces::OnSetParametersCallbackHandle::SharedPtr on_set_params_handler_;
134 std::vector<std::shared_ptr<Layer>> plugins_;
135 std::vector<std::string> plugin_names_;
136 std::vector<std::string> plugin_types_;
A 2D costmap provides a mapping between points in the world and their associated "costs".
A costmap layer base class for costmap plugin layers. Rather than just a layer, this object also cont...
Holds a list of plugins and applies them only to the specific layer.
bool isClearable() override
If clearing operations should be processed on this layer or not.
void onInitialize() override
Initialization process of layer on startup.
void onFootprintChanged() override
LayeredCostmap calls this whenever the footprint there changes (via LayeredCostmap::setFootprint())....
void reset() override
Reset this costmap.
void matchSize() override
Update the footprint to match size of the parent costmap.
void updateBounds(double robot_x, double robot_y, double robot_yaw, double *min_x, double *min_y, double *max_x, double *max_y) override
Update the bounds of the master costmap by this layer's update dimensions.
void deactivate() override
Deactivate the layer.
void clearArea(int start_x, int start_y, int end_x, int end_y, bool invert) override
Clear an area in the constituent costmaps with the given dimension if invert, then clear everything e...
rcl_interfaces::msg::SetParametersResult validateParameterUpdatesCallback(const std::vector< rclcpp::Parameter > ¶meters)
Validate incoming parameter updates before applying them. This callback is triggered when one or more...
void updateCosts(nav2_costmap_2d::Costmap2D &master_grid, int min_i, int min_j, int max_i, int max_j) override
Update the costs in the master costmap in the window.
void updateParametersCallback(const std::vector< rclcpp::Parameter > ¶meters)
Apply parameter updates after validation This callback is executed when parameters have been successf...
void activate() override
Activate the layer.