Skip to content
Snippets Groups Projects
Commit 84034b89 authored by Raphael Grimm's avatar Raphael Grimm
Browse files

Improve searching for the robot xml

parent 28d38e1c
No related branches found
No related tags found
No related merge requests found
...@@ -109,17 +109,19 @@ namespace armarx ...@@ -109,17 +109,19 @@ namespace armarx
if (!robotProjectName.empty()) if (!robotProjectName.empty())
{ {
CMakePackageFinder finder(robotProjectName); CMakePackageFinder finder(robotProjectName);
Ice::StringSeq projectIncludePaths;
auto pathsString = finder.getDataDir(); auto pathsString = finder.getDataDir();
boost::split(projectIncludePaths, boost::split(includePaths,
pathsString, pathsString,
boost::is_any_of(";,"), boost::is_any_of(";,"),
boost::token_compress_on); boost::token_compress_on);
includePaths.insert(includePaths.end(), projectIncludePaths.begin(), projectIncludePaths.end()); ArmarXDataPath::addDataPaths(includePaths);
} }
if (!ArmarXDataPath::getAbsolutePath(robotFileName, robotFileName, 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 // read the robot
try try
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment