Go to the documentation of this file.
6 <root main_tree_to_execute = "MainTree" >
7 <BehaviorTree ID="MainTree">
9 <ThinkRuntimePort text="{the_answer}"/>
10 <SayRuntimePort message="{the_answer}" />
26 setOutput(
"text",
"The answer is 42");
41 auto msg = getInput<std::string>(
"message");
46 std::cout <<
"Robot says: " << msg.value() << std::endl;
57 PortsList think_ports = {BT::OutputPort<std::string>(
"text")};
59 CreateManifest<ThinkRuntimePort>(
"ThinkRuntimePort", think_ports),
60 CreateBuilder<ThinkRuntimePort>());
62 PortsList say_ports = {BT::InputPort<std::string>(
"message")};
void registerNodeType(const std::string &ID)
static const char * xml_text
std::unordered_map< std::string, PortInfo > PortsList
void registerBuilder(const TreeNodeManifest &manifest, const NodeBuilder &builder)
Tree createTreeFromText(const std::string &text, Blackboard::Ptr blackboard=Blackboard::create())
BT::NodeStatus tick() override
Method to be implemented by the user.
The BehaviorTreeFactory is used to create instances of a TreeNode at run-time.
BT::NodeStatus tick() override
Method to be implemented by the user.
ThinkRuntimePort(const std::string &name, const BT::NodeConfiguration &config)
SayRuntimePort(const std::string &name, const BT::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