31 <root main_tree_to_execute = "MainTree" > 33 <BehaviorTree ID="MainTree"> 34 <Sequence name="root"> 35 <SaySomething message="start thinking..." /> 36 <ThinkWhatToSay text="{the_answer}"/> 37 <SaySomething message="{the_answer}" /> 38 <SaySomething2 message="SaySomething2 works too..." /> 39 <SaySomething2 message="{the_answer}" /> 59 setOutput(
"text",
"The answer is 42" );
66 return { BT::OutputPort<std::string>(
"text") };
89 PortsList say_something_ports = { InputPort<std::string>(
"message") };
void registerNodeType(const std::string &ID)
BT::NodeStatus tick() override
Method to be implemented by the user.
static const char * xml_text
static BT::PortsList providedPorts()
The SyncActionNode is an ActionNode that explicitly prevents the status RUNNING and doesn't require a...
The BehaviorTreeFactory is used to create instances of a TreeNode at run-time.
Tree createTreeFromText(const std::string &text, Blackboard::Ptr blackboard=Blackboard::create())
ThinkWhatToSay(const std::string &name, const BT::NodeConfiguration &config)
void registerSimpleAction(const std::string &ID, const SimpleActionNode::TickFunctor &tick_functor, PortsList ports={})
registerSimpleAction help you register nodes of type SimpleActionNode.
std::unordered_map< std::string, PortInfo > PortsList
BT::NodeStatus SaySomethingSimple(BT::TreeNode &self)
virtual BT::NodeStatus executeTick()
The method that should be used to invoke tick() and setStatus();.