Handles navigation goals, their lifecycle, and command interface.
More...
#include <GoalManager.hpp>
|
| void | check_goals (const geometry_msgs::msg::Pose ¤t_pose, const GoalTolerance &goal_tolerance) |
| | Check if the robot is currently at the first goal.
|
| |
| nav_msgs::msg::Goals | get_goals () const |
| | Get current goals.
|
| |
| State | get_state () const |
| | Get current internal goal state.
|
| |
| | GoalManager (NavState &nav_state, rclcpp_lifecycle::LifecycleNode::SharedPtr parent_node) |
| | Constructor.
|
| |
| void | set_error (const std::string &reason) |
| | Mark the system as in error state.
|
| |
| void | set_failed (const std::string &reason) |
| | Mark the current goal as failed.
|
| |
| void | set_finished () |
| | Mark the current goal as successfully completed.
|
| |
| void | update (NavState &nav_state) |
| | Update internal logic, including preemption and timeout checks.
|
| |
Handles navigation goals, their lifecycle, and command interface.
Manages goal state, handles external control messages, and interacts with navigation components.
◆ State
Current internal goal state.
| Enumerator |
|---|
| IDLE | No active goal.
|
| ACTIVE | A goal is currently being pursued.
|
◆ GoalManager()
Constructor.
- Parameters
-
| nav_state | Shared pointer to navigation state. |
| parent_node | Lifecycle node for parameter and interface management. |
◆ check_goals()
| void check_goals |
( |
const geometry_msgs::msg::Pose & | current_pose, |
|
|
const GoalTolerance & | goal_tolerance ) |
Check if the robot is currently at the first goal.
Compares the current pose against the first target in the list using positional and angular tolerances.
- Parameters
-
| current_pose | Current pose of the robot. |
| goal_tolerance | Maximum allowed error for the goal position and orientation. |
◆ get_goals()
| nav_msgs::msg::Goals get_goals |
( |
| ) |
const |
|
nodiscard |
Get current goals.
- Returns
- Goals message.
◆ get_state()
| State get_state |
( |
| ) |
const |
|
nodiscard |
◆ set_error()
| void set_error |
( |
const std::string & | reason | ) |
|
Mark the system as in error state.
- Parameters
-
| reason | Textual explanation. |
◆ set_failed()
| void set_failed |
( |
const std::string & | reason | ) |
|
Mark the current goal as failed.
- Parameters
-
| reason | Textual explanation. |
◆ set_finished()
Mark the current goal as successfully completed.
◆ update()
Update internal logic, including preemption and timeout checks.
The documentation for this class was generated from the following files: