Class RoutePlanner
Defined in File route_planner.hpp
Class Documentation
An optimal planner to compute a route from a start to a goal in an arbitrary graph.
Public Functions
A constructor for nav2_route::RoutePlanner.
A destructor for nav2_route::RoutePlanner.
Configure the route planner, get parameters.
- Parameters:
node – Node object to get parametersfrom
tf_buffer – TF buffer to use for transformations
costmap_subscriber – Costmap subscriber to use for blocked nodes
Find the route from start to goal on the graph.
- Parameters:
graph – Graph to search
start – Start index in the graph of the start node
goal – Goal index in the graph of the goal node
blocked_ids – A set of blocked node and edge IDs not to traverse
- Returns:
Route object containing the navigation graph route
Protected Functions
Reset the search state of the graph nodes.
- Parameters:
graph – Graph to reset
Dikstra’s algorithm search on the graph.
- Parameters:
graph – Graph to search
start – Start Node pointer
goal – Goal node pointer
blocked_ids – A set of blocked node and edge IDs not to traverse
Gets the traversal cost for an edge using edge scorers.
- Parameters:
edge – Edge pointer to find traversal cost for
travel – cost
blocked_ids – A set of blocked node and edge IDs not to traverse
- Returns:
if this edge is valid for search
Gets the next node in the priority queue for search.
- Returns:
Next node pointer in queue with cost
Adds a node to the priority queue for search.
- Parameters:
cost – Priority level
node – Node pointer to insert
Gets the edges from a given node.
- Parameters:
node – Node pointer to check
- Returns:
A vector of edges that the node contains
Clears the priority queue.
Checks if a given node is the goal node.
- Parameters:
node – Node to check
- Returns:
bool If this node is the goal
Checks if a given node is the start node.
- Parameters:
node – Node to check
- Returns:
bool If this node is the start
Checks edge is a start or end edge.
- Parameters:
edge – Edge to check
- Returns:
EdgeType identifying whether the edge is start, end or none
Protected Attributes