Skip to content
Snippets Groups Projects

Feature/open fridge

Merged Fabian Reister requested to merge feature/open-fridge into master
Files
8
@@ -59,12 +59,17 @@ namespace armarx
return _id.str();
}
ObjectInfo::path ObjectInfo::objectDirectory() const
ObjectInfo::path ObjectInfo::objectDirectory(const bool fixDataPath) const
{
if(fixDataPath)
{
return _relObjectsPath / _id.dataset() / _id.className();
}
return path(_packageName) / _relObjectsPath / _id.dataset() / _id.className();
}
PackageFileLocation ObjectInfo::file(const std::string& _extension, const std::string& suffix) const
PackageFileLocation ObjectInfo::file(const std::string& _extension, const std::string& suffix, const bool fixDataPath) const
{
std::string extension = _extension;
if (extension.at(0) != '.')
@@ -75,8 +80,8 @@ namespace armarx
PackageFileLocation loc;
loc.package = _packageName;
loc.relativePath = objectDirectory() / filename;
loc.absolutePath = _absPackageDataDir / loc.relativePath;
loc.relativePath = objectDirectory(fixDataPath) / filename;
loc.absolutePath = _absPackageDataDir / objectDirectory(false) / filename;
return loc;
}
@@ -118,12 +123,12 @@ namespace armarx
PackageFileLocation ObjectInfo::articulatedSimoxXML() const
{
return file(".xml", "_articulated");
return file(".xml", "_articulated", true);
}
PackageFileLocation ObjectInfo::articulatedUrdf() const
{
return file(".urdf", "_articulated");
return file(".urdf", "_articulated", true);
}
PackageFileLocation ObjectInfo::articulatedSdf() const
@@ -332,5 +337,3 @@ std::ostream& armarx::operator<<(std::ostream& os, const ObjectInfo& rhs)
{
return os << rhs.id();
}
Loading