diff --git a/source/RobotAPI/libraries/ArmarXObjects/ObjectFinder.cpp b/source/RobotAPI/libraries/ArmarXObjects/ObjectFinder.cpp index 2e026dd211cf6906d8b54b468ad6eebfff12141b..f964364b9e1e43083d9c6755370549c33cfa66ad 100644 --- a/source/RobotAPI/libraries/ArmarXObjects/ObjectFinder.cpp +++ b/source/RobotAPI/libraries/ArmarXObjects/ObjectFinder.cpp @@ -57,7 +57,7 @@ namespace armarx bool ObjectFinder::isDatasetDirValid(const path& path) const { - return path.filename() != "Scenes" and std::filesystem::is_directory(path); + return std::filesystem::is_directory(path); } @@ -401,7 +401,7 @@ namespace armarx ObjectFinder::path ObjectFinder::_rootDirAbs() const { - return packageDataDir / packageName; + return packageDataDir / packageName / "objects"; } ObjectFinder::path ObjectFinder::_rootDirRel() const diff --git a/source/RobotAPI/libraries/ArmarXObjects/ObjectFinder.h b/source/RobotAPI/libraries/ArmarXObjects/ObjectFinder.h index 0bef0667120ee99e7d65f575f1c9b61b446ffe6f..18c23dbdb3f727201ed6f66d6558b1f007f8cb41 100644 --- a/source/RobotAPI/libraries/ArmarXObjects/ObjectFinder.h +++ b/source/RobotAPI/libraries/ArmarXObjects/ObjectFinder.h @@ -15,17 +15,19 @@ namespace armarx { /** - * @brief Used to find objects in the ArmarX objects repository [1]. + * @brief Used to find objects in the ArmarX objects repository [1] (formerly [2]). * - * @see [1] https://gitlab.com/ArmarX/ArmarXObjects + * @see [1] https://gitlab.com/ArmarX/PriorKnowledgeData + * @see [2] https://gitlab.com/ArmarX/ArmarXObjects */ class ObjectFinder : Logging { public: using path = std::filesystem::path; - inline static const std::string DefaultObjectsPackageName = "ArmarXObjects"; + inline static const std::string DefaultObjectsPackageName = "PriorKnowledgeData"; public: + ObjectFinder(const std::string& objectsPackageName = DefaultObjectsPackageName); ObjectFinder(ObjectFinder&&) = default; diff --git a/source/RobotAPI/libraries/ArmarXObjects/ObjectInfo.cpp b/source/RobotAPI/libraries/ArmarXObjects/ObjectInfo.cpp index 348a5b25419813a22717f71c92d0c3484042361c..c68e1b2710a1520db7e7c8fb4ea7944485ddcfe5 100644 --- a/source/RobotAPI/libraries/ArmarXObjects/ObjectInfo.cpp +++ b/source/RobotAPI/libraries/ArmarXObjects/ObjectInfo.cpp @@ -57,7 +57,7 @@ namespace armarx ObjectInfo::path ObjectInfo::objectDirectory() const { - return path(_packageName) / _id.dataset() / _id.className(); + return path(_packageName) / "objects" / _id.dataset() / _id.className(); } PackageFileLocation ObjectInfo::file(const std::string& _extension, const std::string& suffix) const