16#include "auto_apms_interfaces/action/start_tree_executor.hpp"
21class LaunchExecutorAction :
public RosActionNode<auto_apms_interfaces::action::StartTreeExecutor>
23 double last_running_node_timestamp_ = 0;
28 static BT::PortsList providedPorts()
35 switch (wr.result->tree_result)
37 case ActionType::Result::TREE_RESULT_SUCCESS:
38 return BT::NodeStatus::SUCCESS;
40 return BT::NodeStatus::FAILURE;
44 BT::NodeStatus onFeedback(
const std::shared_ptr<const Feedback> feedback)
46 if (feedback->running_action_timestamp > last_running_node_timestamp_)
48 last_running_node_timestamp_ = feedback->running_action_timestamp;
50 feedback->running_tree_identity.c_str(), feedback->running_action_name.c_str());
52 return BT::NodeStatus::RUNNING;
std::string getFullName() const
RosActionNode(const std::string &instance_name, const Config &config, const Context &context)
static BT::PortsList providedBasicPorts(BT::PortsList addition)
typename rclcpp_action::ClientGoalHandle< auto_apms_interfaces::action::StartTreeExecutor >::WrappedResult WrappedResult
const rclcpp::Logger logger_
#define AUTO_APMS_BEHAVIOR_TREE_REGISTER_NODE(type)
Macro for registering a behavior tree node plugin.