Go to the documentation of this file.
4 #include <unordered_map>
6 #include <VirtualRobot/VirtualRobot.h>
25 using path = std::filesystem::path;
44 std::optional<ObjectInfo>
findObject(
const std::string& dataset,
45 const std::string& name)
const;
46 std::optional<ObjectInfo>
findObject(
const std::string& nameOrID)
const;
53 std::vector<ObjectInfo>
findAllObjects(
bool checkPaths =
true)
const;
54 std::map<std::string, std::vector<ObjectInfo>>
57 bool checkPaths =
true)
const;
59 std::vector<armem::articulated_object::ArticulatedObjectDescription>
61 std::vector<armem::articulated_object::ArticulatedObjectDescription>
63 std::unordered_map<std::string,
64 std::vector<armem::articulated_object::ArticulatedObjectDescription>>
68 const std::optional<ObjectInfo>& ts);
69 VirtualRobot::ManipulationObjectPtr
72 VirtualRobot::ObstaclePtr
static loadObstacle(
const std::optional<ObjectInfo>& ts);
87 bool includeClassName =
false)
const;
99 bool includeClassName =
false)
const;
106 bool isDatasetDirValid(
const std::filesystem::path&
path)
const;
108 path _rootDirAbs()
const;
109 path _rootDirRel()
const;
116 mutable std::string packageName;
122 mutable path absPackageDataDir;
129 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