Responsible for managing multiple variables storing information on the goal.
More...
#include <nav2_smac_planner/include/nav2_smac_planner/goal_manager.hpp>
|
|
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 |
| |
|
using | NodeContext = typename NodeT::NodeContext |
| |
|
|
| GoalManager () |
| | Constructor: Initializes empty goal state. sets and coordinate lists.
|
| |
|
| ~GoalManager ()=default |
| | Destructor for the GoalManager.
|
| |
| void | setContext (NodeContext *ctx) |
| | Sets the node context for goal nodes. More...
|
| |
| 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...
|
| |
|
|
NodeSet | _goals_set |
| |
|
GoalStateVector | _goals_state |
| |
|
CoordinateVector | _goals_coordinate |
| |
|
Coordinates | _ref_goal_coord |
| |
|
NodeContext * | _ctx = nullptr |
| |
template<typename NodeT>
class nav2_smac_planner::GoalManager< NodeT >
Responsible for managing multiple variables storing information on the goal.
Definition at line 42 of file goal_manager.hpp.
◆ addGoal()
template<typename NodeT >
Adds goal to the goal vector.
- Parameters
-
| goal | Reference to the NodePtr |
Definition at line 91 of file goal_manager.hpp.
◆ getGoalsCoordinates()
template<typename NodeT >
Get pointer reference to goals coordinates.
- Returns
- vector of goals coordinates reference to the goals coordinates
Definition at line 261 of file goal_manager.hpp.
◆ getGoalsSet()
template<typename NodeT >
Get pointer reference to goals set vector.
- Returns
- unordered_set of node pointers reference to the goals nodes
Definition at line 243 of file goal_manager.hpp.
◆ getGoalsState()
template<typename NodeT >
Get pointer reference to goals state.
- Returns
- vector of node pointers reference to the goals state
Definition at line 252 of file goal_manager.hpp.
◆ goalsIsEmpty()
template<typename NodeT >
Checks if the goals set is empty.
- Returns
- true if the goals set is empty
Definition at line 82 of file goal_manager.hpp.
◆ hasGoalChanged()
template<typename NodeT >
Checks whether the Reference goal coordinate has changed.
- Parameters
-
| coord | Coordinates to compare with the current Reference goal coordinate. |
- Returns
- true if the Reference goal coordinate has changed, false otherwise.
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 280 of file goal_manager.hpp.
◆ isGoal()
template<typename NodeT >
Check if a given node is part of the goal set.
- Parameters
-
| node | Node pointer to check. |
- Returns
- if node matches any goal in the goal set.
Definition at line 234 of file goal_manager.hpp.
◆ isZoneValid()
template<typename NodeT >
◆ prepareGoalsForAnalyticExpansion()
template<typename NodeT >
| void nav2_smac_planner::GoalManager< NodeT >::prepareGoalsForAnalyticExpansion |
( |
NodeVector & |
coarse_check_goals, |
|
|
NodeVector & |
fine_check_goals, |
|
|
int |
coarse_search_resolution |
|
) |
| |
|
inline |
Populates coarse and fine goal lists for analytic expansion.
- Parameters
-
| 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 112 of file goal_manager.hpp.
◆ removeInvalidGoals()
template<typename NodeT >
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.
- Parameters
-
| 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 205 of file goal_manager.hpp.
References nav2_smac_planner::GoalManager< NodeT >::isZoneValid().
◆ setContext()
template<typename NodeT >
Sets the node context for goal nodes.
- Parameters
-
| ctx | Pointer to the NodeContext |
Definition at line 73 of file goal_manager.hpp.
◆ setRefGoalCoordinates()
template<typename NodeT >
The documentation for this class was generated from the following file: