19 #include "behaviortree_cpp/behavior_tree.h"
20 #include "behaviortree_cpp/bt_factory.h"
21 #include "behaviortree_cpp/utils/shared_library.h"
22 #include "behaviortree_cpp/xml_parsing.h"
24 #include "plugins_list.hpp"
25 #include "nav2_util/string_utils.hpp"
29 BT::BehaviorTreeFactory factory;
31 std::vector<std::string> plugins_list = nav2_util::split(nav2::details::BT_BUILTIN_PLUGINS,
';');
33 for (
const auto & plugin : plugins_list) {
34 std::cout <<
"Loading: " << plugin <<
"\n";
35 factory.registerFromPlugin(BT::SharedLibrary::getOSName(plugin));
37 std::cout <<
"\nGenerating file: nav2_tree_nodes.xml\n"
38 <<
"\nCompare it with the one in the git repo and update the latter if necessary.\n";
40 std::ofstream xml_file;
41 xml_file.open(
"nav2_tree_nodes.xml");
42 xml_file << BT::writeTreeNodesModelXML(factory) << std::endl;