diff --git a/source/RobotAPI/libraries/ArmarXObjects/ObjectFinder.cpp b/source/RobotAPI/libraries/ArmarXObjects/ObjectFinder.cpp index f5516353eecf459e4d2cde12db3737b396908972..8b61c578cca4070197d4b57bcc8a353ff8ceee2c 100644 --- a/source/RobotAPI/libraries/ArmarXObjects/ObjectFinder.cpp +++ b/source/RobotAPI/libraries/ArmarXObjects/ObjectFinder.cpp @@ -220,6 +220,8 @@ namespace armarx if (fs::is_directory(datasetDir / dir)) { ObjectInfo object(packageName, absPackageDataDir, relObjectsDir, dataset, dir.filename()); + object.setLogError(logObjectDiscoveryError); + if (!checkPaths || object.checkPaths()) { objects.push_back(object); @@ -371,6 +373,11 @@ namespace armarx return info.loadSpokenNames(); }); } + + void ObjectFinder::setLogObjectDiscoveryError(bool logEnabled) + { + logObjectDiscoveryError = logEnabled; + } ObjectFinder::path ObjectFinder::_rootDirAbs() const { @@ -388,4 +395,3 @@ namespace armarx } } - diff --git a/source/RobotAPI/libraries/ArmarXObjects/ObjectFinder.h b/source/RobotAPI/libraries/ArmarXObjects/ObjectFinder.h index 708608528cd8d506d80f229a6c9c96896d18207a..5c461033d3d75b4d097ec2763928a9e94aab6389 100644 --- a/source/RobotAPI/libraries/ArmarXObjects/ObjectFinder.h +++ b/source/RobotAPI/libraries/ArmarXObjects/ObjectFinder.h @@ -94,6 +94,8 @@ namespace armarx */ std::vector<std::string> loadSpokenNames(const ObjectID& objectID, bool includeClassName = false) const; + void setLogObjectDiscoveryError(bool logEnabled); + private: @@ -120,5 +122,9 @@ namespace armarx /// Path to the directory containing objects in the package's data directory. path relObjectsDir; + + // see: ObjectInfo::checkPaths() + bool logObjectDiscoveryError = true; + }; }