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
36 using Action = nav2_msgs::action::FollowObject;
37 using ActionResult = Action::Result;
47 const std::string & xml_tag_name,
48 const std::string & action_name,
49 const BT::NodeConfiguration & conf);
79 BT::InputPort<std::string>(
80 "pose_topic",
"dynamic_pose",
"Topic to publish the pose of the object to follow"),
81 BT::InputPort<std::string>(
82 "tracked_frame",
"Target frame to follow (Optional, used if pose_topic is not set)"),
84 "max_duration", 0.0,
"The maximum duration to follow the object (Optional)"),
86 BT::OutputPort<ActionResult::_total_elapsed_time_type>(
87 "total_elapsed_time",
"Total elapsed time"),
88 BT::OutputPort<ActionResult::_error_code_type>(
89 "error_code_id",
"Error code"),
90 BT::OutputPort<std::string>(
91 "error_msg",
"Error message"),
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.