15 #ifndef NAV2_BEHAVIOR_TREE__PLUGINS__DECORATOR__GOAL_UPDATED_CONTROLLER_HPP_
16 #define NAV2_BEHAVIOR_TREE__PLUGINS__DECORATOR__GOAL_UPDATED_CONTROLLER_HPP_
22 #include "behaviortree_cpp/decorator_node.h"
23 #include "behaviortree_cpp/json_export.h"
25 #include "rclcpp/rclcpp.hpp"
26 #include "geometry_msgs/msg/pose_stamped.hpp"
27 #include "nav2_behavior_tree/bt_utils.hpp"
28 #include "nav2_behavior_tree/json_utils.hpp"
30 namespace nav2_behavior_tree
52 const std::string & name,
53 const BT::NodeConfiguration & conf);
62 BT::RegisterJsonDefinition<geometry_msgs::msg::PoseStamped>();
63 BT::RegisterJsonDefinition<std::vector<geometry_msgs::msg::PoseStamped>>();
66 BT::InputPort<std::vector<geometry_msgs::msg::PoseStamped>>(
67 "goals",
"Vector of navigation goals"),
68 BT::InputPort<geometry_msgs::msg::PoseStamped>(
69 "goal",
"Navigation goal"),
78 BT::NodeStatus tick()
override;
80 bool goal_was_updated_;
81 geometry_msgs::msg::PoseStamped goal_;
82 std::vector<geometry_msgs::msg::PoseStamped> goals_;
A BT::DecoratorNode that ticks its child if the goal was updated.
GoalUpdatedController(const std::string &name, const BT::NodeConfiguration &conf)
A constructor for nav2_behavior_tree::GoalUpdatedController.
static BT::PortsList providedPorts()
Creates list of BT ports.