From 112b299637b2dfbe15a87345157a4017756d0b8e Mon Sep 17 00:00:00 2001 From: "Ana C. Huaman Quispe" Date: Wed, 7 Dec 2022 13:47:25 -0600 Subject: [PATCH] Fixed use of ros_pkg for ROS1 applications --- src/xml_parsing.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/xml_parsing.cpp b/src/xml_parsing.cpp index 18c2ed2f2..4ee74c6ea 100644 --- a/src/xml_parsing.cpp +++ b/src/xml_parsing.cpp @@ -173,12 +173,12 @@ void XMLParser::Pimpl::loadDocImpl(tinyxml2::XMLDocument* doc, bool add_includes #elif defined USING_ROS2 ros_pkg_path = ament_index_cpp::get_package_share_directory(ros_pkg_relative_path); - file_path = std::filesystem::path(ros_pkg_path) / file_path; #else throw RuntimeError("Using attribute [ros_pkg] in , but this library was " "compiled without ROS support. Recompile the BehaviorTree.CPP " "using catkin"); #endif + file_path = std::filesystem::path(ros_pkg_path) / file_path; } }