|
Accessor for the object files. More...
#include <RobotAPI/libraries/ArmarXObjects/ObjectInfo.h>
Public Types | |
using | path = std::filesystem::path |
Public Member Functions | |
PackageFileLocation | articulatedSdf () const |
PackageFileLocation | articulatedSimoxXML () const |
PackageFileLocation | articulatedUrdf () const |
PackageFileLocation | boundingBoxJson () const |
virtual bool | checkPaths () const |
Checks the existence of expected files. More... | |
std::string | className () const |
std::string | dataset () const |
PackageFileLocation | file (const std::string &extension, const std::string &suffix="", bool fixDataPath=false) const |
std::optional< PackageFileLocation > | getArticulatedModel () const |
Return the articulated Simox XML, URDF or SDF, if one exists. More... | |
std::optional< PackageFileLocation > | getModel () const |
Return the Simox XML, URDF or SDF, if one exists. More... | |
ObjectID | id () const |
Return "dataset/name". More... | |
std::string | idStr () const |
std::optional< simox::AxisAlignedBoundingBox > | loadAABB () const |
Load the AABB (axis-aligned bounding-box) from the bounding box JSON file. More... | |
std::optional< simox::OrientedBox< float > > | loadOOBB () const |
Load the OOBB (object-oriented bounding box) from the bounding box JSON file. More... | |
std::optional< std::vector< std::string > > | loadRecognizedNames () const |
Load names to use when matched when recognizing an object by name. More... | |
std::optional< std::vector< std::string > > | loadSpokenNames () const |
Load names to use when verbalizing an object name. More... | |
PackageFileLocation | meshWrl () const |
std::string | name () const |
PackageFileLocation | namesJson () const |
File containing recognized and spoken names of objects. More... | |
ObjectInfo (const std::string &packageName, const path &absPackageDataDir, const path &relObjectsPath, const ObjectID &id) | |
ObjectInfo. More... | |
ObjectInfo (const std::string &packageName, const path &packageDataDir, const path &relObjectsPath, const std::string &dataset, const std::string &className) | |
std::string | package () const |
PackageFileLocation | sdf () const |
void | setLogError (bool enabled) |
PackageFileLocation | simoxXML () const |
PackageFileLocation | urdf () const |
PackageFileLocation | wavefrontObj () const |
virtual | ~ObjectInfo ()=default |
Accessor for the object files.
Definition at line 37 of file ObjectInfo.h.
using path = std::filesystem::path |
Definition at line 40 of file ObjectInfo.h.
ObjectInfo | ( | const std::string & | packageName, |
const path & | absPackageDataDir, | ||
const path & | relObjectsPath, | ||
const ObjectID & | id | ||
) |
packageName | The ArmarX package. |
absPackageDataDir | Absolute path to the package's data directory. |
localObjectsPath | The path where objects are stored in the data directory. |
id | The object class ID (with dataset and class name). |
Definition at line 19 of file ObjectInfo.cpp.
ObjectInfo | ( | const std::string & | packageName, |
const path & | packageDataDir, | ||
const path & | relObjectsPath, | ||
const std::string & | dataset, | ||
const std::string & | className | ||
) |
Definition at line 30 of file ObjectInfo.cpp.
|
virtualdefault |
PackageFileLocation articulatedSdf | ( | ) | const |
Definition at line 160 of file ObjectInfo.cpp.
PackageFileLocation articulatedSimoxXML | ( | ) | const |
Definition at line 148 of file ObjectInfo.cpp.
PackageFileLocation articulatedUrdf | ( | ) | const |
Definition at line 154 of file ObjectInfo.cpp.
PackageFileLocation boundingBoxJson | ( | ) | const |
Definition at line 199 of file ObjectInfo.cpp.
|
virtual |
Checks the existence of expected files.
If a file is does not exist, emits a warning returns false.
Definition at line 377 of file ObjectInfo.cpp.
std::string className | ( | ) | const |
Definition at line 61 of file ObjectInfo.cpp.
std::string dataset | ( | ) | const |
PackageFileLocation file | ( | const std::string & | extension, |
const std::string & | suffix = "" , |
||
bool | fixDataPath = false |
||
) | const |
Definition at line 90 of file ObjectInfo.cpp.
std::optional< PackageFileLocation > getArticulatedModel | ( | ) | const |
Return the articulated Simox XML, URDF or SDF, if one exists.
Definition at line 166 of file ObjectInfo.cpp.
std::optional< PackageFileLocation > getModel | ( | ) | const |
Return the Simox XML, URDF or SDF, if one exists.
Definition at line 127 of file ObjectInfo.cpp.
ObjectID id | ( | ) | const |
Return "dataset/name".
Definition at line 67 of file ObjectInfo.cpp.
std::string idStr | ( | ) | const |
Definition at line 73 of file ObjectInfo.cpp.
std::optional< simox::AxisAlignedBoundingBox > loadAABB | ( | ) | const |
Load the AABB (axis-aligned bounding-box) from the bounding box JSON file.
std::nullopt
if file does not exist. Definition at line 211 of file ObjectInfo.cpp.
std::optional< simox::OrientedBox< float > > loadOOBB | ( | ) | const |
Load the OOBB (object-oriented bounding box) from the bounding box JSON file.
The OOBB is defined the object's local frame.
std::nullopt
if file does not exist. Definition at line 268 of file ObjectInfo.cpp.
std::optional< std::vector< std::string > > loadRecognizedNames | ( | ) | const |
Load names to use when matched when recognizing an object by name.
namesJson()
Definition at line 326 of file ObjectInfo.cpp.
std::optional< std::vector< std::string > > loadSpokenNames | ( | ) | const |
Load names to use when verbalizing an object name.
namesJson()
Definition at line 332 of file ObjectInfo.cpp.
PackageFileLocation meshWrl | ( | ) | const |
Definition at line 187 of file ObjectInfo.cpp.
|
inline |
PackageFileLocation namesJson | ( | ) | const |
File containing recognized and spoken names of objects.
Definition at line 205 of file ObjectInfo.cpp.
std::string package | ( | ) | const |
Definition at line 49 of file ObjectInfo.cpp.
PackageFileLocation sdf | ( | ) | const |
Definition at line 121 of file ObjectInfo.cpp.
void setLogError | ( | bool | enabled | ) |
Definition at line 43 of file ObjectInfo.cpp.
PackageFileLocation simoxXML | ( | ) | const |
Definition at line 109 of file ObjectInfo.cpp.
PackageFileLocation urdf | ( | ) | const |
Definition at line 115 of file ObjectInfo.cpp.
PackageFileLocation wavefrontObj | ( | ) | const |
Definition at line 193 of file ObjectInfo.cpp.