This node struct stores point data needed by the A* (ASTAR) algorithm to properly plan a path. Each node is connected to a parent node and position, distance from start, heuristic value, and node cost are stored.
More...
#include <Nodes.hpp>
This node struct stores point data needed by the A* (ASTAR) algorithm to properly plan a path. Each node is connected to a parent node and position, distance from start, heuristic value, and node cost are stored.
- Author
- clayjay3 (clayt.nosp@m.onra.nosp@m.ycowe.nosp@m.n@gm.nosp@m.ail.c.nosp@m.om)
- Date
- 2024-02-01
◆ AStarNode()
Construct a new AStarNode struct.
- Parameters
-
pParentNode | - A pointer to the parent node the this nodes comes after in the path. |
stNodeLocation | - The global position of this point/node stored in UTM format. |
dKg | - The cost of the path from the star node to the current node. |
dKh | - The heuristic estimate of how much it will cost to get to the end node. |
dKf | - The sum of dKg and dKh. An estimate for the total cost of the node. |
- Author
- clayjay3 (clayt.nosp@m.onra.nosp@m.ycowe.nosp@m.n@gm.nosp@m.ail.c.nosp@m.om)
- Date
- 2024-02-01
83 {
84
85 this->pParentNode = pParentNode;
86 this->stNodeLocation = stNodeLocation;
87 this->dKg = dKg;
88 this->dKh = dKh;
89 this->dKf = dKf;
90 }
◆ operator<()
bool pathplanners::nodes::AStarNode::operator< |
( |
const AStarNode & |
other | ) |
const |
|
inline |
◆ operator<=()
bool pathplanners::nodes::AStarNode::operator<= |
( |
const AStarNode & |
other | ) |
const |
|
inline |
◆ operator>()
bool pathplanners::nodes::AStarNode::operator> |
( |
const AStarNode & |
other | ) |
const |
|
inline |
◆ operator>=()
bool pathplanners::nodes::AStarNode::operator>= |
( |
const AStarNode & |
other | ) |
const |
|
inline |
◆ operator==()
bool pathplanners::nodes::AStarNode::operator== |
( |
const AStarNode & |
other | ) |
const |
|
inline |
Overloaded equality operator for AStarNode struct. This overload is used to see if two nodes have matching coordinates.
- Parameters
-
other | - The other AStarNode in the comparison. |
- Author
- Kai Shafe (kasq5.nosp@m.m@um.nosp@m.syste.nosp@m.m.ed.nosp@m.u)
- Date
- 2024-02-15
146 {
147 return this->stNodeLocation.dEasting == other.stNodeLocation.dEasting && this->stNodeLocation.dNorthing == other.stNodeLocation.dNorthing;
148 }
The documentation for this struct was generated from the following file: