Template Class AStarAlgorithm
Defined in File a_star.hpp
Nested Relationships
Nested Types
Class Documentation
An A* implementation for planning in a costmap. Templated based on the Node type.
Public Types
Public Functions
A constructor for nav2_smac_planner::AStarAlgorithm.
A destructor for nav2_smac_planner::AStarAlgorithm.
Initialization of the planner with defaults.
- Parameters:
allow_unknown – Allow search in unknown space, good for navigation while mapping
max_iterations – Maximum number of iterations to use while expanding search
max_on_approach_iterations – Maximum number of iterations before returning a valid path once within thresholds to refine path comes at more compute time but smoother paths.
max_planning_time – Maximum time (in seconds) to wait for a plan, createPath returns false after this timeout
Creating path from given costmap, start, and goal.
- Parameters:
path – Reference to a vector of indicies of generated path
num_iterations – Reference to number of iterations to create plan
tolerance – Reference to tolerance in costmap nodes
- Returns:
if plan was successful
Sets the collision checker to use.
- Parameters:
collision_checker – Collision checker to use for checking state validity
Set the goal for planning, as a node index.
- Parameters:
mx – The node X index of the goal
my – The node Y index of the goal
dim_3 – The node dim_3 index of the goal
Set the starting pose for planning, as a node index.
- Parameters:
mx – The node X index of the goal
my – The node Y index of the goal
dim_3 – The node dim_3 index of the goal
Get maximum number of iterations to plan.
- Returns:
Reference to Maximum iterations parameter
Get pointer reference to starting node.
- Returns:
Node pointer reference to starting node
Get pointer reference to goal node.
- Returns:
Node pointer reference to goal node
Get maximum number of on-approach iterations after within threshold.
- Returns:
Reference to Maximum on-appraoch iterations parameter
Get tolerance, in node nodes.
- Returns:
Reference to tolerance parameter
Get size of graph in X.
- Returns:
Size in X
Get size of graph in Y.
- Returns:
Size in Y
Get number of angle quantization bins (SE2) or Z coordinate (XYZ)
- Returns:
Number of angle bins / Z dimension
Protected Functions
Get pointer to next goal in open set.
- Returns:
Node pointer reference to next heuristically scored node
Add a node to the open set.
- Parameters:
cost – The cost to sort into the open set of the node
node – Node pointer reference to add to open set
Adds node to graph.
- Parameters:
index – Node index to add
Check if this node is the goal node.
- Parameters:
node – Node pointer to check if its the goal node
- Returns:
if node is goal
Get cost of heuristic of node.
- Parameters:
node – Node pointer to get heuristic for
- Returns:
Heuristic cost for node
Check if inputs to planner are valid.
- Returns:
Are valid
Clear hueristic queue of nodes to search.
Clear graph of nodes searched.
Protected Attributes
Public Functions