15 #ifndef OPENNAV_DOCKING__NAVIGATOR_HPP_
16 #define OPENNAV_DOCKING__NAVIGATOR_HPP_
23 #include "rclcpp/callback_group.hpp"
24 #include "rclcpp/duration.hpp"
25 #include "rclcpp/executors/single_threaded_executor.hpp"
26 #include "rclcpp_action/rclcpp_action.hpp"
27 #include "pluginlib/class_loader.hpp"
28 #include "pluginlib/class_list_macros.hpp"
30 #include "nav2_msgs/action/navigate_to_pose.hpp"
31 #include "nav2_ros_common/node_utils.hpp"
32 #include "opennav_docking/utils.hpp"
33 #include "opennav_docking/types.hpp"
35 namespace opennav_docking
44 using Nav2Pose = nav2_msgs::action::NavigateToPose;
45 using ActionClient = nav2::ActionClient<Nav2Pose>;
51 explicit Navigator(
const nav2::LifecycleNode::WeakPtr & parent);
78 const geometry_msgs::msg::PoseStamped & pose,
79 rclcpp::Duration remaining_staging_duration,
80 std::function<
bool()> isPreempted,
81 bool recursed =
false);
84 nav2::LifecycleNode::WeakPtr node_;
85 rclcpp::CallbackGroup::SharedPtr callback_group_;
86 rclcpp::executors::SingleThreadedExecutor executor_;
87 ActionClient::SharedPtr nav_to_pose_client_;
88 std::string navigator_bt_xml_;
An object the call navigation to obtain initial staging pose.
void activate()
An activation method.
Navigator(const nav2::LifecycleNode::WeakPtr &parent)
A constructor for opennav_docking::Navigator.
~Navigator()=default
A destructor for opennav_docking::Navigator.
void goToPose(const geometry_msgs::msg::PoseStamped &pose, rclcpp::Duration remaining_staging_duration, std::function< bool()> isPreempted, bool recursed=false)
An method to go to a particular pose May throw exception if fails to navigate or communicate Blocks u...
void deactivate()
An deactivation method.