| 52 | using namespace DummyNodes; |
| 53 | |
| 54 | int main() |
| 55 | { |
| 56 | BehaviorTreeFactory factory; |
| 57 | |
| 58 | factory.registerNodeType<SaySomething>("SaySomething"); |
| 59 | factory.registerNodeType<MoveBaseAction>("MoveBase"); |
| 60 | |
| 61 | factory.registerBehaviorTreeFromText(xml_text); |
| 62 | auto tree = factory.createTree("MainTree"); |
| 63 | |
| 64 | tree.tickWhileRunning(); |
| 65 | |
| 66 | // let's visualize some information about the current state of the blackboards. |
| 67 | std::cout << "\n------ First BB ------" << std::endl; |
| 68 | tree.subtrees[0]->blackboard->debugMessage(); |
| 69 | std::cout << "\n------ Second BB------" << std::endl; |
| 70 | tree.subtrees[1]->blackboard->debugMessage(); |
| 71 | |
| 72 | return 0; |
| 73 | } |
| 74 | |
| 75 | /* Expected output: |
| 76 |
nothing calls this directly
no test coverage detected