Go to the documentation of this file.
20 double arg2, std::string arg3) :
21 SyncActionNode(name, config), _arg1(arg1), _arg2(arg2), _arg3(arg3)
26 std::cout <<
"Action_A: " << _arg1 <<
" / " << _arg2 <<
" / " << _arg3 << std::endl;
49 void init(
int arg1,
double arg2, std::string arg3)
58 std::cout <<
"Action_B: " << _arg1 <<
" / " << _arg2 <<
" / " << _arg3 << std::endl;
93 return std::make_unique<Action_A>(name, config, 42, 3.14,
"hello world");
106 for (
auto& node : tree.nodes)
108 if (
auto action_B_node =
dynamic_cast<Action_B*
>(node.get()))
110 action_B_node->init(69, 9.99,
"interesting_value");
114 tree.tickRootWhileRunning();
void registerNodeType(const std::string &ID)
std::function< std::unique_ptr< TreeNode >const std::string &, const NodeConfiguration &)> NodeBuilder
The term "Builder" refers to the Builder Pattern (https://en.wikipedia.org/wiki/Builder_pattern)
NodeStatus tick() override
Method to be implemented by the user.
static const char * xml_text
std::unordered_map< std::string, PortInfo > PortsList
Action_A(const std::string &name, const NodeConfiguration &config, int arg1, double arg2, std::string arg3)
static PortsList providedPorts()
void registerBuilder(const TreeNodeManifest &manifest, const NodeBuilder &builder)
void init(int arg1, double arg2, std::string arg3)
Tree createTreeFromText(const std::string &text, Blackboard::Ptr blackboard=Blackboard::create())
NodeStatus tick() override
Method to be implemented by the user.
static PortsList providedPorts()
The BehaviorTreeFactory is used to create instances of a TreeNode at run-time.
Action_B(const std::string &name, const NodeConfiguration &config)
The SyncActionNode is an ActionNode that explicitly prevents the status RUNNING and doesn't require a...
behaviortree_cpp_v3
Author(s): Michele Colledanchise, Davide Faconti
autogenerated on Wed Jun 26 2024 02:51:19