Go to the documentation of this file.
4 #include <unordered_map>
6 #include <VirtualRobot/VirtualRobot.h>
27 using path = std::filesystem::path;
47 std::optional<ObjectInfo>
findObject(
const std::string& dataset,
const std::string& name)
const;
48 std::optional<ObjectInfo>
findObject(
const std::string& nameOrID)
const;
55 std::vector<ObjectInfo>
findAllObjects(
bool checkPaths =
true)
const;
61 std::unordered_map<std::string, std::vector<armem::articulated_object::ArticulatedObjectDescription>>
findAllArticulatedObjectsByDataset(
bool checkPaths =
true)
const;
63 VirtualRobot::ManipulationObjectPtr
65 VirtualRobot::ManipulationObjectPtr
68 VirtualRobot::ObstaclePtr
69 static loadObstacle(
const std::optional<ObjectInfo>& ts);
70 VirtualRobot::ObstaclePtr
103 bool isDatasetDirValid(
const std::filesystem::path&
path)
const;
105 path _rootDirAbs()
const;
106 path _rootDirRel()
const;
114 mutable std::string packageName;
120 mutable path absPackageDataDir;
127 bool logObjectDiscoveryError =
true;
std::vector< armem::articulated_object::ArticulatedObjectDescription > findAllArticulatedObjectsOfDataset(const std::string &dataset, bool checkPaths) const
A known object ID of the form "Dataset/ClassName" or "Dataset/ClassName/InstanceName".
static const std::string DefaultObjectsPackageName
static VirtualRobot::ObstaclePtr loadObstacle(const std::optional< ObjectInfo > &ts)
std::vector< ObjectInfo > findAllObjects(bool checkPaths=true) const
ObjectFinder(const std::string &objectsPackageName=DefaultObjectsPackageName, const path &relObjectsDir=DefaultObjectsDirectory)
std::filesystem::path path
static VirtualRobot::ManipulationObjectPtr loadManipulationObject(const std::optional< ObjectInfo > &ts)
void setLogObjectDiscoveryError(bool logEnabled)
Used to find objects in the ArmarX objects repository [1] (formerly [2]).
void setPath(const std::string &path)
std::vector< ObjectInfo > findAllObjectsOfDataset(const std::string &dataset, bool checkPaths=true) const
std::unordered_map< std::string, std::vector< armem::articulated_object::ArticulatedObjectDescription > > findAllArticulatedObjectsByDataset(bool checkPaths=true) const
std::vector< std::string > loadSpokenNames(const ObjectID &objectID, bool includeClassName=false) const
Load names to use when verbalizing an object name.
ObjectFinder & operator=(ObjectFinder &&)=default
std::vector< std::string > loadRecognizedNames(const ObjectID &objectID, bool includeClassName=false) const
Load names to use when matched when recognizing an object by name.
std::map< std::string, std::vector< ObjectInfo > > findAllObjectsByDataset(bool checkPaths=true) const
std::vector< path > getDatasetDirectories() const
Base Class for all Logging classes.
std::optional< ObjectInfo > findObject(const std::string &dataset, const std::string &name) const
std::vector< armem::articulated_object::ArticulatedObjectDescription > findAllArticulatedObjects(bool checkPaths) const
std::vector< std::string > getDatasets() const
std::string getPackageName() const
This file offers overloads of toIce() and fromIce() functions for STL container types.
An object pose as stored by the ObjectPoseStorage.
static const std::string DefaultObjectsDirectory