24 <root main_tree_to_execute = "MainTree"> 25 <!---------------------------------------> 26 <BehaviorTree ID="DoorClosed"> 27 <Sequence name="door_closed_sequence"> 29 <Condition ID="IsDoorOpen"/> 31 <RetryUntilSuccessful num_attempts="4"> 33 </RetryUntilSuccessful> 37 <!---------------------------------------> 38 <BehaviorTree ID="MainTree"> 40 <Fallback name="root_Fallback"> 41 <Sequence name="door_open_sequence"> 45 <SubTree ID="DoorClosed"/> 51 <!---------------------------------------> 59 int main(
int argc,
char** argv)
87 const bool LOOP = (argc == 2 && strcmp(argv[1],
"loop") == 0);
92 tree.sleep(std::chrono::milliseconds(10));
93 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...