|
|
Used to find objects in the ArmarX objects repository [1] (formerly [2]). More...
#include <RobotAPI/libraries/ArmarXObjects/ObjectFinder.h>
Inheritance diagram for ObjectFinder:Public Types | |
| using | path = std::filesystem::path |
Public Member Functions | |
| std::vector< armem::articulated_object::ArticulatedObjectDescription > | findAllArticulatedObjects (bool checkPaths) const |
| std::unordered_map< std::string, std::vector< armem::articulated_object::ArticulatedObjectDescription > > | findAllArticulatedObjectsByDataset (bool checkPaths=true) const |
| std::vector< armem::articulated_object::ArticulatedObjectDescription > | findAllArticulatedObjectsOfDataset (const std::string &dataset, bool checkPaths) const |
| std::vector< ObjectInfo > | findAllObjects (bool checkPaths=true) const |
| std::map< std::string, std::vector< ObjectInfo > > | findAllObjectsByDataset (bool checkPaths=true) const |
| std::vector< ObjectInfo > | findAllObjectsOfDataset (const std::string &dataset, bool checkPaths=true) const |
| std::optional< ObjectInfo > | findObject (const ObjectID &id) const |
| std::optional< ObjectInfo > | findObject (const objpose::ObjectPose &obj) const |
| std::optional< ObjectInfo > | findObject (const std::string &dataset, const std::string &name) const |
| std::optional< ObjectInfo > | findObject (const std::string &nameOrID) const |
| std::vector< path > | getDatasetDirectories () const |
| std::vector< std::string > | getDatasets () const |
| std::string | getPackageName () const |
| VirtualRobot::ManipulationObjectPtr | loadManipulationObject (const objpose::ObjectPose &obj) const |
| VirtualRobot::ObstaclePtr | loadObstacle (const objpose::ObjectPose &obj) const |
| std::vector< std::string > | loadRecognizedNames (const ObjectID &objectID, bool includeClassName=false) const |
| Load names to use when matched when recognizing an object by name. More... | |
| std::vector< std::string > | loadSpokenNames (const ObjectID &objectID, bool includeClassName=false) const |
| Load names to use when verbalizing an object name. More... | |
| ObjectFinder (const ObjectFinder &)=default | |
| ObjectFinder (const std::string &objectsPackageName=DefaultObjectsPackageName, const path &relObjectsDir=DefaultObjectsDirectory) | |
| ObjectFinder (ObjectFinder &&)=default | |
| ObjectFinder & | operator= (const ObjectFinder &)=default |
| ObjectFinder & | operator= (ObjectFinder &&)=default |
| void | setLogObjectDiscoveryError (bool logEnabled) |
| void | setPath (const std::string &path) |
Static Public Member Functions | |
| static VirtualRobot::ManipulationObjectPtr | loadManipulationObject (const std::optional< ObjectInfo > &ts) |
| static VirtualRobot::ObstaclePtr | loadObstacle (const std::optional< ObjectInfo > &ts) |
Static Public Attributes | |
| static const std::string | DefaultObjectsDirectory = "objects" |
| static const std::string | DefaultObjectsPackageName = "PriorKnowledgeData" |
Used to find objects in the ArmarX objects repository [1] (formerly [2]).
Definition at line 22 of file ObjectFinder.h.
| using path = std::filesystem::path |
Definition at line 25 of file ObjectFinder.h.
| ObjectFinder | ( | const std::string & | objectsPackageName = DefaultObjectsPackageName, |
| const path & | relObjectsDir = DefaultObjectsDirectory |
||
| ) |
|
default |
|
default |
| std::vector< armem::articulated_object::ArticulatedObjectDescription > findAllArticulatedObjects | ( | bool | checkPaths | ) | const |
| std::unordered_map< std::string, std::vector< armem::articulated_object::ArticulatedObjectDescription > > findAllArticulatedObjectsByDataset | ( | bool | checkPaths = true | ) | const |
| std::vector< armem::articulated_object::ArticulatedObjectDescription > findAllArticulatedObjectsOfDataset | ( | const std::string & | dataset, |
| bool | checkPaths | ||
| ) | const |
| std::vector< ObjectInfo > findAllObjects | ( | bool | checkPaths = true | ) | const |
Definition at line 149 of file ObjectFinder.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| std::map< std::string, std::vector< ObjectInfo > > findAllObjectsByDataset | ( | bool | checkPaths = true | ) | const |
| std::vector< ObjectInfo > findAllObjectsOfDataset | ( | const std::string & | dataset, |
| bool | checkPaths = true |
||
| ) | const |
| std::optional< ObjectInfo > findObject | ( | const ObjectID & | id | ) | const |
| std::optional< ObjectInfo > findObject | ( | const objpose::ObjectPose & | obj | ) | const |
| std::optional< ObjectInfo > findObject | ( | const std::string & | dataset, |
| const std::string & | name | ||
| ) | const |
Definition at line 64 of file ObjectFinder.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| std::optional< ObjectInfo > findObject | ( | const std::string & | nameOrID | ) | const |
| std::vector< ObjectFinder::path > getDatasetDirectories | ( | ) | const |
| std::vector< std::string > getDatasets | ( | ) | const |
Definition at line 116 of file ObjectFinder.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| std::string getPackageName | ( | ) | const |
| VirtualRobot::ManipulationObjectPtr loadManipulationObject | ( | const objpose::ObjectPose & | obj | ) | const |
|
static |
Definition at line 310 of file ObjectFinder.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| VirtualRobot::ObstaclePtr loadObstacle | ( | const objpose::ObjectPose & | obj | ) | const |
|
static |
Definition at line 333 of file ObjectFinder.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| std::vector< std::string > loadRecognizedNames | ( | const ObjectID & | objectID, |
| bool | includeClassName = false |
||
| ) | const |
Load names to use when matched when recognizing an object by name.
If the object's names JSON file does not exist, no names will be added from a file. If you would like to detect this case, first findObject(), then use ObjectInfo::loadRecognizedNames(), which returns a std::optional.
| includeClassName | If true, include the raw class name in the result. |
Definition at line 379 of file ObjectFinder.cpp.
| std::vector< std::string > loadSpokenNames | ( | const ObjectID & | objectID, |
| bool | includeClassName = false |
||
| ) | const |
Load names to use when verbalizing an object name.
If the object's names JSON file does not exist, no names will be added from a file. If you would like to detect this case, first findObject(), then use ObjectInfo::loadSpokenNames(), which returns a std::optional.
| includeClassName | If true, include the raw class name in the result. |
ObjectInfo::loadSpokenNames() Definition at line 388 of file ObjectFinder.cpp.
|
default |
|
default |
| void setLogObjectDiscoveryError | ( | bool | logEnabled | ) |
| void setPath | ( | const std::string & | path | ) |
|
inlinestatic |
Definition at line 27 of file ObjectFinder.h.
|
inlinestatic |
Definition at line 26 of file ObjectFinder.h.