Go to the documentation of this file.
6 <root BTCPP_format="4" >
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") };
Tree createTree(const std::string &tree_name, Blackboard::Ptr blackboard=Blackboard::create())
static const char * xml_text
SayRuntimePort(const std::string &name, const BT::NodeConfig &config)
NodeStatus tickWhileRunning(std::chrono::milliseconds sleep_time=std::chrono::milliseconds(10))
std::unordered_map< std::string, PortInfo > PortsList
void registerBuilder(const TreeNodeManifest &manifest, const NodeBuilder &builder)
void registerNodeType(const std::string &ID, const PortsList &ports, ExtraArgs... args)
ThinkRuntimePort(const std::string &name, const BT::NodeConfig &config)
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.
void registerBehaviorTreeFromText(const std::string &xml_text)
The SyncActionNode is an ActionNode that explicitly prevents the status RUNNING and doesn't require a...