20 <root main_tree_to_execute = "MainTree" > 22 <BehaviorTree ID="MainTree"> 23 <Sequence name="root"> 25 <SaySomething message="mission started..." /> 26 <MoveBase goal="1;2;3"/> 27 <SaySomething message="mission completed!" /> 36 <root main_tree_to_execute = "MainTree" > 38 <BehaviorTree ID="MainTree"> 39 <ReactiveSequence name="root"> 42 <SaySomething message="mission started..." /> 43 <MoveBase goal="1;2;3"/> 44 <SaySomething message="mission completed!" /> 78 std::cout <<
"\n------------ BUILDING A NEW TREE ------------" << std::endl;
84 std::cout <<
"\n--- 1st executeTick() ---" << std::endl;
89 std::cout <<
"\n--- 2nd executeTick() ---" << std::endl;
90 status = tree.root_node->executeTick();
94 std::cout <<
"\n--- 3rd executeTick() ---" << std::endl;
95 status = tree.root_node->executeTick();
98 std::cout << std::endl;
static const char * xml_text_reactive
void registerNodeType(const std::string &ID)
void Assert(bool condition)
The BehaviorTreeFactory is used to create instances of a TreeNode at run-time.
Tree createTreeFromText(const std::string &text, Blackboard::Ptr blackboard=Blackboard::create())
static const char * xml_text_sequence
static const char * xml_text
virtual BT::NodeStatus executeTick()
The method that should be used to invoke tick() and setStatus();.
void registerSimpleCondition(const std::string &ID, const SimpleConditionNode::TickFunctor &tick_functor, PortsList ports={})
registerSimpleCondition help you register nodes of type SimpleConditionNode.
BT::NodeStatus CheckBattery()