20 <root main_tree_to_execute = "MainTree" > 22 <BehaviorTree ID="MainTree"> 23 <Sequence name="root"> 26 <SaySomething message="mission started..." /> 27 <MoveBase goal="1;2;3"/> 28 <SaySomething message="mission completed!" /> 37 <root main_tree_to_execute = "MainTree" > 39 <BehaviorTree ID="MainTree"> 40 <SequenceStar name="root"> 43 <SaySomething message="mission started..." /> 44 <MoveBase goal="1;2;3"/> 45 <SaySomething message="mission completed!" /> 57 throw std::runtime_error(
"this is not what I expected");
79 std::cout <<
"\n------------ BUILDING A NEW TREE ------------" << std::endl;
85 std::cout <<
"\n--- 1st executeTick() ---" << std::endl;
86 status = tree.root_node->executeTick();
90 std::cout <<
"\n--- 2nd executeTick() ---" << std::endl;
91 status = tree.root_node->executeTick();
95 std::cout <<
"\n--- 3rd executeTick() ---" << std::endl;
96 status = tree.root_node->executeTick();
99 std::cout << std::endl;
void registerNodeType(const std::string &ID)
void Assert(bool condition)
const std::string xml_text
void registerSimpleCondition(const std::string &ID, const SimpleConditionNode::TickFunctor &tick_functor)
Register a SimpleConditionNode.
BT::NodeStatus CheckTemperature()
const std::string xml_text_sequence
BT::NodeStatus CheckBattery()
const std::string xml_text_sequence_star
Tree buildTreeFromText(const BehaviorTreeFactory &factory, const std::string &text, const Blackboard::Ptr &blackboard=Blackboard::Ptr())