16 #ifndef NAV2_BEHAVIOR_TREE__PLUGINS__ACTION__FOLLOW_OBJECT_ACTION_HPP_
17 #define NAV2_BEHAVIOR_TREE__PLUGINS__ACTION__FOLLOW_OBJECT_ACTION_HPP_
23 #include "nav2_behavior_tree/bt_action_node.hpp"
24 #include "nav2_msgs/action/follow_object.hpp"
27 namespace nav2_behavior_tree
41 using Action = nav2_msgs::action::FollowObject;
42 using ActionResult = Action::Result;
52 const std::string & xml_tag_name,
53 const std::string & action_name,
54 const BT::NodeConfiguration & conf);
84 BT::InputPort<std::string>(
85 "pose_topic",
"dynamic_pose",
"Topic to publish the pose of the object to follow"),
86 BT::InputPort<std::string>(
87 "tracked_frame",
"Target frame to follow (Optional, used if pose_topic is not set)"),
89 "max_duration", 0.0,
"The maximum duration to follow the object (Optional)"),
91 BT::OutputPort<ActionResult::_total_elapsed_time_type>(
92 "total_elapsed_time",
"Total elapsed time"),
Abstract class representing an action based BT node.
static BT::PortsList providedBasicPorts(BT::PortsList addition)
Any subclass of BtActionNode that accepts parameters must provide a providedPorts method and call pro...
nav2_behavior_tree::BtActionNode class that wraps nav2_msgs/FollowObject
BT::NodeStatus on_cancelled() override
Function to perform some user-defined operation upon cancellation of the action.
void on_tick() override
Function to perform some user-defined operation on tick.
FollowObjectAction(const std::string &xml_tag_name, const std::string &action_name, const BT::NodeConfiguration &conf)
A constructor for nav2_behavior_tree::FollowObjectAction.
static BT::PortsList providedPorts()
Creates list of BT ports.
BT::NodeStatus on_aborted() override
Function to perform some user-defined operation upon abortion of the action.
BT::NodeStatus on_success() override
Function to perform some user-defined operation upon successful completion of the action.