23#ifndef EASYNAV_SYSTEM__GOALMANAGERCLIENT_HPP_
24#define EASYNAV_SYSTEM__GOALMANAGERCLIENT_HPP_
26#include "rclcpp/rclcpp.hpp"
28#include "easynav_interfaces/msg/navigation_control.hpp"
29#include "geometry_msgs/msg/pose_stamped.hpp"
30#include "nav_msgs/msg/goals.hpp"
35using namespace std::placeholders;
75 void send_goal(
const geometry_msgs::msg::PoseStamped & goal);
81 void send_goals(
const nav_msgs::msg::Goals & goals);
103 [[nodiscard]]
const easynav_interfaces::msg::NavigationControl &
get_last_control()
const;
109 [[nodiscard]]
const easynav_interfaces::msg::NavigationControl &
get_feedback()
const;
115 [[nodiscard]]
const easynav_interfaces::msg::NavigationControl &
get_result()
const;
119 rclcpp::Node::SharedPtr node_;
122 rclcpp::Publisher<easynav_interfaces::msg::NavigationControl>::SharedPtr control_pub_;
125 rclcpp::Subscription<easynav_interfaces::msg::NavigationControl>::SharedPtr control_sub_;
128 easynav_interfaces::msg::NavigationControl::UniquePtr last_control_;
131 easynav_interfaces::msg::NavigationControl last_feedback_;
134 easynav_interfaces::msg::NavigationControl last_result_;
143 void control_callback(easynav_interfaces::msg::NavigationControl::UniquePtr msg);
void cancel()
Cancel the current goal.
Definition GoalManagerClient.cpp:222
const easynav_interfaces::msg::NavigationControl & get_feedback() const
Get the most recent feedback received.
Definition GoalManagerClient.cpp:161
const easynav_interfaces::msg::NavigationControl & get_result() const
Get the last result message received.
Definition GoalManagerClient.cpp:167
void send_goals(const nav_msgs::msg::Goals &goals)
Send a list of goals to the GoalManager.
Definition GoalManagerClient.cpp:185
void send_goal(const geometry_msgs::msg::PoseStamped &goal)
Send a single goal to the GoalManager.
Definition GoalManagerClient.cpp:173
State
Internal state of the client-side goal manager.
Definition GoalManagerClient.hpp:53
@ SENT_GOAL
Definition GoalManagerClient.hpp:55
@ SENT_PREEMPT
Definition GoalManagerClient.hpp:56
@ NAVIGATION_FAILED
Definition GoalManagerClient.hpp:60
@ ACCEPTED_AND_NAVIGATING
Definition GoalManagerClient.hpp:57
@ IDLE
Definition GoalManagerClient.hpp:54
@ ERROR
Definition GoalManagerClient.hpp:62
@ NAVIGATION_CANCELLED
Definition GoalManagerClient.hpp:61
@ NAVIGATION_FINISHED
Definition GoalManagerClient.hpp:58
@ NAVIGATION_REJECTED
Definition GoalManagerClient.hpp:59
const easynav_interfaces::msg::NavigationControl & get_last_control() const
Get the last control message sent or received.
Definition GoalManagerClient.cpp:155
GoalManagerClient(rclcpp::Node::SharedPtr node)
Constructor.
Definition GoalManagerClient.cpp:36
State get_state() const
Get the current internal state.
Definition GoalManagerClient.hpp:97
void reset()
Reset internal client state.
Definition GoalManagerClient.cpp:246
Definition CircularBuffer.hpp:28