15 <root main_tree_to_execute = "MainTree"> 16 <!---------------------------------------> 17 <BehaviorTree ID="DoorClosed"> 18 <Sequence name="door_closed_sequence"> 20 <Condition ID="IsDoorOpen"/> 22 <RetryUntilSuccesful num_attempts="4"> 24 </RetryUntilSuccesful> 28 <!---------------------------------------> 29 <BehaviorTree ID="MainTree"> 30 <Fallback name="root_Fallback"> 31 <Sequence name="door_open_sequence"> 35 <SubTree ID="DoorClosed"/> 39 <!---------------------------------------> 52 auto blackboard = Blackboard::create<BlackboardLocal>();
53 blackboard->set(
"door_open",
false);
54 blackboard->set(
"door_locked",
true);
65 FileLogger logger_file(tree.root_node,
"bt_trace.fbl");
78 status = tree.root_node->executeTick();
void printTreeRecursively(const TreeNode *root_node)
void RegisterNodes(BT::BehaviorTreeFactory &factory)
const std::string xml_text
AddStdCoutLoggerToTree. Give the root node of a tree, a simple callback is subscribed to any status c...
Tree buildTreeFromText(const BehaviorTreeFactory &factory, const std::string &text, const Blackboard::Ptr &blackboard=Blackboard::Ptr())