15 #ifndef NAV2_BEHAVIOR_TREE__PLUGINS__ACTION__PROGRESS_CHECKER_SELECTOR_NODE_HPP_
16 #define NAV2_BEHAVIOR_TREE__PLUGINS__ACTION__PROGRESS_CHECKER_SELECTOR_NODE_HPP_
21 #include "std_msgs/msg/string.hpp"
23 #include "behaviortree_cpp_v3/action_node.h"
25 #include "rclcpp/rclcpp.hpp"
27 namespace nav2_behavior_tree
47 const std::string & xml_tag_name,
48 const BT::NodeConfiguration & conf);
57 BT::InputPort<std::string>(
58 "default_progress_checker",
59 "the default progress_checker to use if there is not any external topic message received."),
61 BT::InputPort<std::string>(
63 "progress_checker_selector",
64 "the input topic name to select the progress_checker"),
66 BT::OutputPort<std::string>(
67 "selected_progress_checker",
68 "Selected progress_checker by subscription")
76 BT::NodeStatus tick()
override;
83 void callbackProgressCheckerSelect(
const std_msgs::msg::String::SharedPtr msg);
85 rclcpp::Subscription<std_msgs::msg::String>::SharedPtr progress_checker_selector_sub_;
87 std::string last_selected_progress_checker_;
89 rclcpp::Node::SharedPtr node_;
91 std::string topic_name_;
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.