15 #ifndef NAV2_BEHAVIOR_TREE__PLUGINS__ACTION__PROGRESS_CHECKER_SELECTOR_NODE_HPP_
16 #define NAV2_BEHAVIOR_TREE__PLUGINS__ACTION__PROGRESS_CHECKER_SELECTOR_NODE_HPP_
22 #include "std_msgs/msg/string.hpp"
24 #include "behaviortree_cpp/action_node.h"
26 #include "nav2_ros_common/lifecycle_node.hpp"
28 namespace nav2_behavior_tree
56 const std::string & xml_tag_name,
57 const BT::NodeConfiguration & conf);
66 BT::InputPort<std::string>(
67 "default_progress_checker",
68 "the default progress_checker to use if there is not any external topic message received."),
70 BT::InputPort<std::string>(
72 "progress_checker_selector",
73 "the input topic name to select the progress_checker"),
75 BT::OutputPort<std::string>(
76 "selected_progress_checker",
77 "Selected progress_checker by subscription")
89 void createROSInterfaces();
94 BT::NodeStatus tick()
override;
101 void callbackProgressCheckerSelect(
const std_msgs::msg::String::ConstSharedPtr & msg);
103 nav2::Subscription<std_msgs::msg::String>::SharedPtr progress_checker_selector_sub_;
105 std::string last_selected_progress_checker_;
107 nav2::LifecycleNode::SharedPtr node_;
108 rclcpp::CallbackGroup::SharedPtr callback_group_;
109 rclcpp::executors::SingleThreadedExecutor callback_group_executor_;
111 std::string topic_name_;
112 std::chrono::milliseconds bt_loop_duration_;
The ProgressCheckerSelector behavior is used to switch the progress checker of the controller server....
static BT::PortsList providedPorts()
Creates list of BT ports.
ProgressCheckerSelector(const std::string &xml_tag_name, const BT::NodeConfiguration &conf)
A constructor for nav2_behavior_tree::ProgressCheckerSelector.