Class Node2D
Defined in File node_2d.hpp
Nested Relationships
Nested Types
Class Documentation
Node2D implementation for graph.
Public Types
Public Functions
A constructor for nav2_smac_planner::Node2D.
- Parameters:
index – The index of this node for self-reference
A destructor for nav2_smac_planner::Node2D.
operator== for comparisons
- Parameters:
Node2D – right hand side node reference
- Returns:
If cell indicies are equal
Reset method for new search.
Gets the accumulated cost at this node.
- Returns:
accumulated cost
Sets the accumulated cost at this node.
- Parameters:
reference – to accumulated cost
Gets the costmap cost at this node.
- Returns:
costmap cost
Gets the costmap cost at this node.
- Returns:
costmap cost
Gets if cell has been visited in search.
- Parameters:
If – cell was visited
Sets if cell has been visited in search.
Gets if cell is currently queued in search.
- Parameters:
If – cell was queued
Sets if cell is currently queued in search.
Gets cell index.
- Returns:
Reference to cell index
Check if this node is valid.
- Parameters:
traverse_unknown – If we can explore unknown nodes on the graph
collision_checker – Pointer to collision checker object
- Returns:
whether this node is valid and collision free
get traversal cost from this node to child node
- Parameters:
child – Node pointer to this node’s child
- Returns:
traversal cost
Retrieve all valid neighbors of a node.
- Parameters:
validity_checker – Functor for state validity checking
collision_checker – Collision checker to use
traverse_unknown – If unknown costs are valid to traverse
neighbors – Vector of neighbors to be filled
Set the starting pose for planning, as a node index.
- Parameters:
path – Reference to a vector of indicies of generated path
- Returns:
whether the path was able to be backtraced
Public Members
Public Static Functions
Get index.
- Parameters:
x – x coordinate of point to get index of
y – y coordinate of point to get index of
width – width of costmap
- Returns:
index
Get index.
- Parameters:
Index – Index of point
width – width of costmap
angles – angle bins to use (must be 1 or throws exception)
- Returns:
coordinates of point
Get index.
- Parameters:
Index – Index of point
- Returns:
coordinates of point
Get cost of heuristic of node.
- Parameters:
node – Node index current
node – Node index of new
- Returns:
Heuristic cost between the nodes
Initialize the neighborhood to be used in A* We support 4-connect (VON_NEUMANN) and 8-connect (MOORE)
- Parameters:
neighborhood – The desired neighborhood type
x_size_uint – The total x size to find neighbors
y_size – The total y size to find neighbors
num_angle_quantization – Number of quantizations, must be 0
search_info – Search parameters, unused by 2D node
Public Static Attributes
Node2D implementation of coordinate structure.
Public Functions
Public Members