41 #include <rclcpp/rclcpp.hpp>
42 #include <rclcpp_action/rclcpp_action.hpp>
44 #include <pluginlib/class_loader.hpp>
48 #include <moveit_msgs/action/global_planner.hpp>
49 #include <moveit_msgs/msg/motion_plan_request.hpp>
50 #include <moveit_msgs/msg/motion_plan_response.hpp>
65 if (long_callback_thread_.joinable())
67 long_callback_thread_.join();
76 return node_->get_node_base_interface();
80 std::shared_ptr<rclcpp::Node> node_;
82 std::string planner_plugin_name_;
85 std::unique_ptr<pluginlib::ClassLoader<GlobalPlannerInterface>> global_planner_plugin_loader_;
88 std::shared_ptr<GlobalPlannerInterface> global_planner_instance_;
91 rclcpp_action::Server<moveit_msgs::action::GlobalPlanner>::SharedPtr global_planning_request_server_;
94 rclcpp::Publisher<moveit_msgs::msg::MotionPlanResponse>::SharedPtr global_trajectory_pub_;
97 void globalPlanningRequestCallback(
98 const std::shared_ptr<rclcpp_action::ServerGoalHandle<moveit_msgs::action::GlobalPlanner>>& goal_handle);
101 bool initializeGlobalPlanner();
104 std::thread long_callback_thread_;
107 rclcpp::CallbackGroup::SharedPtr cb_group_;
rclcpp::node_interfaces::NodeBaseInterface::SharedPtr get_node_base_interface()
~GlobalPlannerComponent()
Destructor.
GlobalPlannerComponent(const rclcpp::NodeOptions &options)
Constructor.