26 <root main_tree_to_execute = "MainTree"> 27 <!---------------------------------------> 28 <BehaviorTree ID="DoorClosed"> 29 <Sequence name="door_closed_sequence"> 31 <Condition ID="IsDoorOpen"/> 33 <RetryUntilSuccesful num_attempts="4"> 35 </RetryUntilSuccesful> 39 <!---------------------------------------> 40 <BehaviorTree ID="MainTree"> 42 <Fallback name="root_Fallback"> 43 <Sequence name="door_open_sequence"> 47 <SubTree ID="DoorClosed"/> 53 <!---------------------------------------> 61 int main(
int argc,
char** argv)
81 const bool LOOP = ( argc == 2 && strcmp( argv[1],
"loop") == 0);
89 status = tree.root_node->executeTick();
int main(int argc, char **argv)
void printTreeRecursively(const TreeNode *root_node)
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())
AddStdCoutLoggerToTree. Give the root node of a tree, a simple callback is subscribed to any status c...