Go to the documentation of this file.
30 <root BTCPP_format="4" >
32 <BehaviorTree ID="MainTree">
33 <Sequence name="root">
34 <SaySomething message="hello" />
35 <SaySomething2 message="this works too" />
36 <ThinkWhatToSay text="{the_answer}"/>
37 <SaySomething2 message="{the_answer}" />
55 setOutput(
"text",
"The answer is 42");
62 return { BT::OutputPort<std::string>(
"text") };
83 PortsList say_something_ports = { InputPort<std::string>(
"message") };
static const char * xml_text
static BT::PortsList providedPorts()
BT::NodeStatus SaySomethingSimple(BT::TreeNode &self)
BT::NodeStatus tick() override
Method to be implemented by the user.
NodeStatus tickWhileRunning(std::chrono::milliseconds sleep_time=std::chrono::milliseconds(10))
std::unordered_map< std::string, PortInfo > PortsList
void registerNodeType(const std::string &ID, const PortsList &ports, ExtraArgs... args)
Tree createTreeFromText(const std::string &text, Blackboard::Ptr blackboard=Blackboard::create())
createTreeFromText will parse the XML directly from string. The XML needs to contain either a single ...
The BehaviorTreeFactory is used to create instances of a TreeNode at run-time.
ThinkWhatToSay(const std::string &name, const BT::NodeConfig &config)
The SyncActionNode is an ActionNode that explicitly prevents the status RUNNING and doesn't require a...
void registerSimpleAction(const std::string &ID, const SimpleActionNode::TickFunctor &tick_functor, PortsList ports={})
registerSimpleAction help you register nodes of type SimpleActionNode.