|
Nav2 Navigation Stack - rolling
main
ROS 2 Navigation Stack
|
Responsible for managing multiple variables storing information on the goal. More...
#include <nav2_smac_planner/include/nav2_smac_planner/goal_manager.hpp>
Public Types | |
| typedef NodeT * | NodePtr |
| typedef std::vector< NodePtr > | NodeVector |
| typedef std::unordered_set< NodePtr > | NodeSet |
| typedef std::vector< GoalState< NodeT > > | GoalStateVector |
| typedef NodeT::Coordinates | Coordinates |
| typedef NodeT::CoordinateVector | CoordinateVector |
Public Member Functions | |
| GoalManager () | |
| Constructor: Initializes empty goal state. sets and coordinate lists. | |
| ~GoalManager ()=default | |
| Destructor for the GoalManager. | |
| bool | goalsIsEmpty () |
| Checks if the goals set is empty. More... | |
| void | addGoal (NodePtr &goal) |
| Adds goal to the goal vector. More... | |
| void | clear () |
| Clears all internal goal data, including goals, states, and coordinates. | |
| void | prepareGoalsForAnalyticExpansion (NodeVector &coarse_check_goals, NodeVector &fine_check_goals, int coarse_search_resolution) |
| Populates coarse and fine goal lists for analytic expansion. More... | |
| bool | isZoneValid (const NodePtr node, const float &radius, GridCollisionChecker *collision_checker, const bool &traverse_unknown) const |
| Checks if zone within the radius of a node is feasible. Returns true if there's at least one non-lethal cell within the node radius. More... | |
| void | removeInvalidGoals (const float &tolerance, GridCollisionChecker *collision_checker, const bool &traverse_unknown) |
| Filters and marks invalid goals based on collision checking and tolerance thresholds. More... | |
| bool | isGoal (const NodePtr &node) |
| Check if a given node is part of the goal set. More... | |
| NodeSet & | getGoalsSet () |
| Get pointer reference to goals set vector. More... | |
| GoalStateVector & | getGoalsState () |
| Get pointer reference to goals state. More... | |
| CoordinateVector & | getGoalsCoordinates () |
| Get pointer reference to goals coordinates. More... | |
| void | setRefGoalCoordinates (const Coordinates &coord) |
| Set the Reference goal coordinate. More... | |
| bool | hasGoalChanged (const Coordinates &coord) |
| Checks whether the Reference goal coordinate has changed. More... | |
Protected Attributes | |
| NodeSet | _goals_set |
| GoalStateVector | _goals_state |
| CoordinateVector | _goals_coordinate |
| Coordinates | _ref_goal_coord |
Responsible for managing multiple variables storing information on the goal.
Definition at line 41 of file goal_manager.hpp.
|
inline |
Adds goal to the goal vector.
| goal | Reference to the NodePtr |
Definition at line 80 of file goal_manager.hpp.
|
inline |
Get pointer reference to goals coordinates.
Definition at line 248 of file goal_manager.hpp.
|
inline |
Get pointer reference to goals set vector.
Definition at line 230 of file goal_manager.hpp.
|
inline |
Get pointer reference to goals state.
Definition at line 239 of file goal_manager.hpp.
|
inline |
Checks if the goals set is empty.
Definition at line 71 of file goal_manager.hpp.
|
inline |
Checks whether the Reference goal coordinate has changed.
| coord | Coordinates to compare with the current Reference goal coordinate. |
Note: This function checks if the goal has changed. This has to be done with the coordinates not the Node pointer because the Node pointer can be reused for different goals, but the coordinates will always be unique for each goal.
Definition at line 267 of file goal_manager.hpp.
|
inline |
Check if a given node is part of the goal set.
| node | Node pointer to check. |
Definition at line 221 of file goal_manager.hpp.
|
inline |
Checks if zone within the radius of a node is feasible. Returns true if there's at least one non-lethal cell within the node radius.
| node | Input node. |
| radius | Search radius. |
| collision_checker | Collision checker to validate nearby nodes. |
| traverse_unknown | Flag whether traversal through unknown space is allowed. |
Definition at line 126 of file goal_manager.hpp.
References nav2_costmap_2d::FootprintCollisionChecker< CostmapT >::getCostmap(), nav2_costmap_2d::Costmap2D::getSizeInCellsX(), and nav2_costmap_2d::Costmap2D::getSizeInCellsY().
Referenced by nav2_smac_planner::GoalManager< NodeT >::removeInvalidGoals().


|
inline |
Populates coarse and fine goal lists for analytic expansion.
| coarse_check_goals | Output list of goals for coarse search expansion. |
| fine_check_goals | Output list of goals for fine search refinement. |
| coarse_search_resolution | Number of fine goals per coarse goal. |
Definition at line 101 of file goal_manager.hpp.
|
inline |
Filters and marks invalid goals based on collision checking and tolerance thresholds.
Stores only valid (or tolerably infeasible) goals into internal goal sets and coordinates.
| tolerance | Heuristic tolerance allowed for infeasible goals. |
| collision_checker | Collision checker to validate goal positions. |
| traverse_unknown | Flag whether traversal through unknown space is allowed. |
Definition at line 193 of file goal_manager.hpp.
References nav2_smac_planner::GoalManager< NodeT >::isZoneValid().

|
inline |
Set the Reference goal coordinate.
| coord | Coordinates to set as Reference goal |
Definition at line 257 of file goal_manager.hpp.