20#include "behaviortree_cpp/loggers/groot2_publisher.h"
21#include "rclcpp/node.hpp"
23#include "executor_params.hpp"
62 using TerminationCallback = std::function<void(
ExecutionResult,
const std::string&)>;
79 void execution_routine_(TerminationCallback termination_callback);
83 virtual bool onInitialTick();
85 virtual bool onTick();
119 rclcpp::Node::SharedPtr node_ptr_;
122 std::unique_ptr<Tree> tree_ptr_;
123 std::unique_ptr<BT::Groot2Publisher> groot2_publisher_ptr_;
124 std::unique_ptr<BTStateObserver> state_observer_ptr_;
125 rclcpp::TimerBase::SharedPtr execution_timer_ptr_;
128 bool execution_stopped_;
129 std::string termination_reason_;
void setExecutorParameters(const ExecutorParams &p)
executor_params::Params ExecutorParams
ExecutorParams getExecutorParameters()
std::function< Tree(TreeBlackboardSharedPtr)> CreateTreeCallback
void setControlCommand(ControlCommand cmd)
TreeExecutor(rclcpp::Node::SharedPtr node_ptr)
BTStateObserver & getStateObserver()
rclcpp::Node::SharedPtr getNodePtr()
Get a pointer to the internal ROS2 node instance.
rclcpp::node_interfaces::NodeBaseInterface::SharedPtr get_node_base_interface()
Get the node's base interface. Is required to be able to register derived classes as ROS2 components.
TreeBlackboardSharedPtr getGlobalBlackboardPtr()
Get a pointer to the global blackboard instance.
std::shared_future< ExecutionResult > startExecution(CreateTreeCallback create_tree_cb)
std::string getTreeName()
ExecutionState getExecutionState()
std::string toStr(TreeExecutor::ExecutionState state)
std::shared_ptr< TreeBlackboard > TreeBlackboardSharedPtr