| 21 | // clang-format on |
| 22 | |
| 23 | int main(int argc, char** argv) |
| 24 | { |
| 25 | using namespace BT; |
| 26 | BehaviorTreeFactory factory; |
| 27 | |
| 28 | std::string plugin_path = "test_plugin_action.so"; |
| 29 | |
| 30 | // if you don't want to use the hardcoded path, pass it as an argument |
| 31 | if(argc == 2) |
| 32 | { |
| 33 | plugin_path = argv[1]; |
| 34 | } |
| 35 | |
| 36 | // load the plugin. This will register the action "PrintVector" |
| 37 | factory.registerFromPlugin(plugin_path); |
| 38 | |
| 39 | // print the registered model of PrintVector |
| 40 | std::cout << writeTreeNodesModelXML(factory, false) << std::endl; |
| 41 | |
| 42 | auto tree = factory.createTreeFromText(xml_text); |
| 43 | tree.tickWhileRunning(); |
| 44 | |
| 45 | return 0; |
| 46 | } |
nothing calls this directly
no test coverage detected