25 <root main_tree_to_execute = "MainTree"> 26 <!---------------------------------------> 27 <BehaviorTree ID="DoorClosed"> 28 <Sequence name="door_closed_sequence"> 30 <Condition ID="IsDoorOpen"/> 32 <RetryUntilSuccesful num_attempts="4"> 34 </RetryUntilSuccesful> 38 <!---------------------------------------> 39 <BehaviorTree ID="MainTree"> 41 <Fallback name="root_Fallback"> 42 <Sequence name="door_open_sequence"> 46 <SubTree ID="DoorClosed"/> 52 <!---------------------------------------> 60 int main(
int argc,
char** argv)
86 const bool LOOP = ( argc == 2 && strcmp( argv[1],
"loop") == 0);
94 status = tree.tickRoot();
int main(int argc, char **argv)
void RegisterNodes(BT::BehaviorTreeFactory &factory)
The BehaviorTreeFactory is used to create instances of a TreeNode at run-time.
static const char * xml_text
Tree createTreeFromText(const std::string &text, Blackboard::Ptr blackboard=Blackboard::create())
void printTreeRecursively(const TreeNode *root_node, std::ostream &stream=std::cout)
AddStdCoutLoggerToTree. Give the root node of a tree, a simple callback is subscribed to any status c...