Class CostmapPlanner
Defined in File CostmapPlanner.hpp
Inheritance Relationships
Base Type
public PlannerMethodBase
Class Documentation
A planner implementing the A* algorithm on a Costmap2D grid.
This class generates a collision-free path using A* search over a 2D costmap. It supports cost-based penalties and anisotropic movement costs.
Public Functions
Default constructor.
Initializes internal parameters and configuration values.
Initializes the planner.
Loads planner parameters, sets up ROS publishers, and prepares the costmap-based planning environment.
- Throws:
std::runtime_error – if initialization fails.
Executes a planning cycle using the current navigation state.
Computes a path from the robot’s current pose to the goal using A*.
- Parameters:
nav_state – Current shared navigation state (input/output).
Protected Functions
Internal A* path planning routine.
Computes a path on the given costmap from the start pose to the goal pose.
Movement cost is influenced by:
The cost of each cell (retrieved from the costmap).
Additional inflation penalties near obstacles.
Anisotropic weights for axial vs diagonal movement.
- Parameters:
map – The costmap to plan over.
start – The robot’s starting pose in world coordinates.
goal – The goal pose in world coordinates.
- Returns:
A vector of poses representing the planned path.
Protected Attributes
Scaling factor applied to cell cost values.
Extra cost penalty for paths near inflated obstacles.
Scaling factor applied to the heuristic term in A*.
Wheter replan path at freq time.
Most recently computed path.
Current goal.
Publisher for the computed navigation path (for visualization or monitoring).