Autonomy Software C++ 24.5.1
Welcome to the Autonomy Software repository of the Mars Rover Design Team (MRDT) at Missouri University of Science and Technology (Missouri S&T)! API reference contains the source code and other resources for the development of the autonomy software for our Mars rover. The Autonomy Software project aims to compete in the University Rover Challenge (URC) by demonstrating advanced autonomous capabilities and robust navigation algorithms.
Loading...
Searching...
No Matches
pathplanners::nodes::AStarNode Struct Reference

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>

Collaboration diagram for pathplanners::nodes::AStarNode:

Public Member Functions

 AStarNode (std::shared_ptr< AStarNode > pParentNode=nullptr, const geoops::UTMCoordinate stNodeLocation=geoops::UTMCoordinate(), const double dKg=0.0, const double dKh=0.0, const double dKf=0.0)
 Construct a new AStarNode struct.
 
bool operator< (const AStarNode &other) const
 Overloaded < comparison operator for AStarNode struct. Evaluates based on dKf value of nodes.
 
bool operator<= (const AStarNode &other) const
 Overloaded <= comparison operator for AStarNode struct. Evaluates based on dKf value of nodes.
 
bool operator> (const AStarNode &other) const
 Overloaded > comparison operator for AStarNode struct. Evaluates based on dKf value of nodes.
 
bool operator>= (const AStarNode &other) const
 Overloaded >= comparison operator for AStarNode struct. Evaluates based on dKf value of nodes.
 
bool operator== (const AStarNode &other) const
 Overloaded equality operator for AStarNode struct. This overload is used to see if two nodes have matching coordinates.
 

Public Attributes

std::shared_ptr< AStarNodepParentNode
 
geoops::UTMCoordinate stNodeLocation
 
double dKg
 
double dKh
 
double dKf
 

Detailed Description

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

Constructor & Destructor Documentation

◆ AStarNode()

pathplanners::nodes::AStarNode::AStarNode ( std::shared_ptr< AStarNode pParentNode = nullptr,
const geoops::UTMCoordinate  stNodeLocation = geoops::UTMCoordinate(),
const double  dKg = 0.0,
const double  dKh = 0.0,
const double  dKf = 0.0 
)
inline

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 // Initialize struct member variables.
85 this->pParentNode = pParentNode;
86 this->stNodeLocation = stNodeLocation;
87 this->dKg = dKg;
88 this->dKh = dKh;
89 this->dKf = dKf;
90 }

Member Function Documentation

◆ operator<()

bool pathplanners::nodes::AStarNode::operator< ( const AStarNode other) const
inline

Overloaded < comparison operator for AStarNode struct. Evaluates based on dKf value of nodes.

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-17
101{ return this->dKf < other.dKf; }

◆ operator<=()

bool pathplanners::nodes::AStarNode::operator<= ( const AStarNode other) const
inline

Overloaded <= comparison operator for AStarNode struct. Evaluates based on dKf value of nodes.

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-17
112{ return this->dKf <= other.dKf; }

◆ operator>()

bool pathplanners::nodes::AStarNode::operator> ( const AStarNode other) const
inline

Overloaded > comparison operator for AStarNode struct. Evaluates based on dKf value of nodes.

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-17
123{ return this->dKf > other.dKf; }

◆ operator>=()

bool pathplanners::nodes::AStarNode::operator>= ( const AStarNode other) const
inline

Overloaded >= comparison operator for AStarNode struct. Evaluates based on dKf value of nodes.

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-17
134{ return this->dKf >= other.dKf; }

◆ 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: