Class GoalManagerClient

Class Documentation

class GoalManagerClient

Client-side interface for interacting with GoalManager.

Sends navigation goals, handles feedback and result updates, and manages goal lifecycle state.

Public Types

enum class State

Internal state of the client-side goal manager.

Values:

enumerator IDLE
enumerator SENT_GOAL
enumerator SENT_PREEMPT
enumerator ACCEPTED_AND_NAVIGATING
enumerator NAVIGATION_FINISHED
enumerator NAVIGATION_REJECTED
enumerator NAVIGATION_FAILED
enumerator NAVIGATION_CANCELLED
enumerator ERROR

Public Functions

GoalManagerClient(rclcpp::Node::SharedPtr node)

Constructor.

Parameters:

node – Shared pointer to a ROS 2 node.

void send_goal(const geometry_msgs::msg::PoseStamped &goal)

Send a single goal to the GoalManager.

Parameters:

goal – PoseStamped representing the goal.

void send_goals(const nav_msgs::msg::Goals &goals)

Send a list of goals to the GoalManager.

Parameters:

goals – List of goals to navigate.

void cancel()

Cancel the current goal.

void reset()

Reset internal client state.

inline State get_state() const

Get the current internal state.

Returns:

Current State.

const easynav_interfaces::msg::NavigationControl &get_last_control() const

Get the last control message sent or received.

Returns:

Reference to the last control message.

const easynav_interfaces::msg::NavigationControl &get_feedback() const

Get the most recent feedback received.

Returns:

Reference to the last feedback message.

const easynav_interfaces::msg::NavigationControl &get_result() const

Get the last result message received.

Returns:

Reference to the last result message.