t10_include_trees.cpp
Go to the documentation of this file.
2 #include "dummy_nodes.h"
3 
4 using namespace BT;
5 
6 
7 int main(int argc, char** argv)
8 {
9  BehaviorTreeFactory factory;
11 
12  if( argc != 2)
13  {
14  std::cout <<" missing name of the XML file to open" << std::endl;
15  return 1;
16  }
17 
18  // IMPORTANT: when the object tree goes out of scope,
19  // all the TreeNodes are destroyed
20  auto tree = factory.createTreeFromFile(argv[1]);
21 
22  printTreeRecursively( tree.rootNode() );
23 
24  tree.tickRoot();
25 
26  return 0;
27 }
void RegisterNodes(BT::BehaviorTreeFactory &factory)
Definition: dummy_nodes.h:70
int main(int argc, char **argv)
The BehaviorTreeFactory is used to create instances of a TreeNode at run-time.
Definition: bt_factory.h:207
void printTreeRecursively(const TreeNode *root_node, std::ostream &stream=std::cout)
Tree createTreeFromFile(const std::string &file_path, Blackboard::Ptr blackboard=Blackboard::create())
Definition: bt_factory.cpp:259


behaviotree_cpp_v3
Author(s): Michele Colledanchise, Davide Faconti
autogenerated on Tue May 4 2021 02:56:25