|
Nav2 Navigation Stack - rolling
main
ROS 2 Navigation Stack
|
Abstract interface for inflation layers, providing common methods needed by navigation components regardless of the inflation implementation. More...
#include <nav2_costmap_2d/include/nav2_costmap_2d/inflation_layer_interface.hpp>


Public Types | |
| typedef std::recursive_mutex | mutex_t |
Public Member Functions | |
| virtual double | getCostScalingFactor ()=0 |
| Get the cost scaling factor. More... | |
| virtual double | getInflationRadius ()=0 |
| Get the inflation radius. More... | |
| virtual mutex_t * | getMutex ()=0 |
| Get the mutex of the inflation information. More... | |
| virtual unsigned char | computeCost (double distance) const =0 |
| Given a distance, compute a cost. More... | |
Public Member Functions inherited from nav2_costmap_2d::Layer | |
| Layer () | |
| A constructor. | |
| virtual | ~Layer () |
| A destructor. | |
| void | initialize (LayeredCostmap *parent, std::string name, nav2::TransformBuffer *tf, const nav2::LifecycleNode::WeakPtr &node, rclcpp::CallbackGroup::SharedPtr callback_group) |
| Initialization process of layer on startup. | |
| virtual void | deactivate () |
| Stop publishers. | |
| virtual void | activate () |
| Restart publishers if they've been stopped. | |
| virtual void | reset ()=0 |
| Reset this costmap. | |
| virtual bool | isClearable ()=0 |
| If clearing operations should be processed on this layer or not. | |
| virtual void | updateBounds (double robot_x, double robot_y, double robot_yaw, double *min_x, double *min_y, double *max_x, double *max_y)=0 |
| This is called by the LayeredCostmap to poll this plugin as to how much of the costmap it needs to update. Each layer can increase the size of this bounds. More... | |
| virtual void | updateCosts (Costmap2D &master_grid, int min_i, int min_j, int max_i, int max_j)=0 |
| Actually update the underlying costmap, only within the bounds calculated during UpdateBounds(). | |
| virtual void | matchSize () |
| Implement this to make this layer match the size of the parent costmap. | |
| virtual void | onFootprintChanged () |
| LayeredCostmap calls this whenever the footprint there changes (via LayeredCostmap::setFootprint()). Override to be notified of changes to the robot's footprint. | |
| std::string | getName () const |
| Get the name of the costmap layer. | |
| bool | isCurrent () const |
| Check to make sure all the data in the layer is up to date. If the layer is not up to date, then it may be unsafe to plan using the data from this layer, and the planner may need to know. More... | |
| void | setCurrent (bool current) |
| Set whether the data in the layer is up to date. More... | |
| bool | isEnabled () const |
| Gets whether the layer is enabled. | |
| const std::vector< geometry_msgs::msg::Point > & | getFootprint () const |
| Convenience function for layered_costmap_->getFootprint(). | |
| std::string | getFullName (const std::string ¶m_name) |
| Convenience functions for declaring ROS parameters. | |
| std::string | joinWithParentNamespace (const std::string &topic) |
Static Public Member Functions | |
| static std::shared_ptr< InflationLayerInterface > | getInflationLayer (std::shared_ptr< nav2_costmap_2d::Costmap2DROS > &costmap_ros, const std::string layer_name="") |
| Get the inflation layer from a costmap, checking for both InflationLayer and LegacyInflationLayer implementations. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from nav2_costmap_2d::Layer | |
| virtual void | onInitialize () |
| This is called at the end of initialize(). Override to implement subclass-specific initialization. More... | |
Protected Attributes inherited from nav2_costmap_2d::Layer | |
| LayeredCostmap * | layered_costmap_ |
| std::string | name_ |
| nav2::TransformBuffer * | tf_ |
| rclcpp::CallbackGroup::SharedPtr | callback_group_ |
| nav2::LifecycleNode::WeakPtr | node_ |
| rclcpp::Clock::SharedPtr | clock_ |
| rclcpp::Logger | logger_ {rclcpp::get_logger("nav2_costmap_2d")} |
| std::atomic_bool | current_ |
| bool | enabled_ |
Abstract interface for inflation layers, providing common methods needed by navigation components regardless of the inflation implementation.
Definition at line 34 of file inflation_layer_interface.hpp.
|
pure virtual |
Given a distance, compute a cost.
| distance | The distance from an obstacle in cells |
Implemented in nav2_costmap_2d::LegacyInflationLayer, and nav2_costmap_2d::InflationLayer.
|
pure virtual |
Get the cost scaling factor.
Implemented in nav2_costmap_2d::LegacyInflationLayer, and nav2_costmap_2d::InflationLayer.
|
inlinestatic |
Get the inflation layer from a costmap, checking for both InflationLayer and LegacyInflationLayer implementations.
| costmap_ros | The costmap ROS wrapper |
| layer_name | Optional name of the specific layer to find |
Definition at line 73 of file inflation_layer_interface.hpp.
Referenced by mppi::critics::CostCritic::findCircumscribedCost(), and mppi::critics::ObstaclesCritic::findCircumscribedCost().

|
pure virtual |
Get the inflation radius.
Implemented in nav2_costmap_2d::LegacyInflationLayer, and nav2_costmap_2d::InflationLayer.
|
pure virtual |
Get the mutex of the inflation information.
Implemented in nav2_costmap_2d::LegacyInflationLayer, and nav2_costmap_2d::InflationLayer.