From 84034b89945444f7931c583424d2b74d72f37083 Mon Sep 17 00:00:00 2001 From: Raphael Grimm <raphael.grimm@kit.edu> Date: Fri, 6 Sep 2019 17:18:28 +0200 Subject: [PATCH] Improve searching for the robot xml --- .../RobotUnitModules/RobotUnitModuleRobotData.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/source/RobotAPI/components/units/RobotUnit/RobotUnitModules/RobotUnitModuleRobotData.cpp b/source/RobotAPI/components/units/RobotUnit/RobotUnitModules/RobotUnitModuleRobotData.cpp index 3be94c7a5..e6d317984 100644 --- a/source/RobotAPI/components/units/RobotUnit/RobotUnitModules/RobotUnitModuleRobotData.cpp +++ b/source/RobotAPI/components/units/RobotUnit/RobotUnitModules/RobotUnitModuleRobotData.cpp @@ -109,17 +109,19 @@ namespace armarx if (!robotProjectName.empty()) { CMakePackageFinder finder(robotProjectName); - Ice::StringSeq projectIncludePaths; auto pathsString = finder.getDataDir(); - boost::split(projectIncludePaths, + boost::split(includePaths, pathsString, boost::is_any_of(";,"), boost::token_compress_on); - includePaths.insert(includePaths.end(), projectIncludePaths.begin(), projectIncludePaths.end()); + ArmarXDataPath::addDataPaths(includePaths); } if (!ArmarXDataPath::getAbsolutePath(robotFileName, robotFileName, includePaths)) { - throw UserException("Could not find robot file " + robotFileName); + std::stringstream str; + str << "Could not find robot file " + robotFileName + << "\nCollected paths from RobotFileNameProject '" << robotProjectName << "':" << includePaths; + throw UserException(str.str()); } // read the robot try -- GitLab