ObjectInfo Class Reference

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< PackageFileLocationgetArticulatedModel () const
 Return the articulated Simox XML, URDF or SDF, if one exists. More...
 
std::optional< PackageFileLocationgetModel () 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
 

Detailed Description

Accessor for the object files.

Definition at line 37 of file ObjectInfo.h.

Member Typedef Documentation

◆ path

using path = std::filesystem::path

Definition at line 40 of file ObjectInfo.h.

Constructor & Destructor Documentation

◆ ObjectInfo() [1/2]

ObjectInfo ( const std::string &  packageName,
const path absPackageDataDir,
const path relObjectsPath,
const ObjectID id 
)

ObjectInfo.

Parameters
packageNameThe ArmarX package.
absPackageDataDirAbsolute path to the package's data directory.
localObjectsPathThe path where objects are stored in the data directory.
idThe object class ID (with dataset and class name).

Definition at line 19 of file ObjectInfo.cpp.

◆ ObjectInfo() [2/2]

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.

◆ ~ObjectInfo()

virtual ~ObjectInfo ( )
virtualdefault

Member Function Documentation

◆ articulatedSdf()

PackageFileLocation articulatedSdf ( ) const

Definition at line 160 of file ObjectInfo.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ articulatedSimoxXML()

PackageFileLocation articulatedSimoxXML ( ) const

Definition at line 148 of file ObjectInfo.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ articulatedUrdf()

PackageFileLocation articulatedUrdf ( ) const

Definition at line 154 of file ObjectInfo.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ boundingBoxJson()

PackageFileLocation boundingBoxJson ( ) const

Definition at line 199 of file ObjectInfo.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ checkPaths()

bool checkPaths ( ) const
virtual

Checks the existence of expected files.

If a file is does not exist, emits a warning returns false.

Returns
True if all existing files are found, false otherwise.

Definition at line 377 of file ObjectInfo.cpp.

+ Here is the call graph for this function:

◆ className()

std::string className ( ) const

Definition at line 61 of file ObjectInfo.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dataset()

std::string dataset ( ) const

Definition at line 55 of file ObjectInfo.cpp.

+ Here is the call graph for this function:

◆ file()

PackageFileLocation file ( const std::string &  extension,
const std::string &  suffix = "",
bool  fixDataPath = false 
) const

Definition at line 90 of file ObjectInfo.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getArticulatedModel()

std::optional< PackageFileLocation > getArticulatedModel ( ) const

Return the articulated Simox XML, URDF or SDF, if one exists.

Definition at line 166 of file ObjectInfo.cpp.

+ Here is the call graph for this function:

◆ getModel()

std::optional< PackageFileLocation > getModel ( ) const

Return the Simox XML, URDF or SDF, if one exists.

Definition at line 127 of file ObjectInfo.cpp.

+ Here is the call graph for this function:

◆ id()

ObjectID id ( ) const

Return "dataset/name".

Definition at line 67 of file ObjectInfo.cpp.

+ Here is the caller graph for this function:

◆ idStr()

std::string idStr ( ) const

Definition at line 73 of file ObjectInfo.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ loadAABB()

std::optional< simox::AxisAlignedBoundingBox > loadAABB ( ) const

Load the AABB (axis-aligned bounding-box) from the bounding box JSON file.

Returns
Return the AABB if successful, std::nullopt if file does not exist.

Definition at line 211 of file ObjectInfo.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ loadOOBB()

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.

Returns
Return the OOBB if successful, std::nullopt if file does not exist.

Definition at line 268 of file ObjectInfo.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ loadRecognizedNames()

std::optional< std::vector< std::string > > loadRecognizedNames ( ) const

Load names to use when matched when recognizing an object by name.

See also
namesJson()

Definition at line 326 of file ObjectInfo.cpp.

+ Here is the caller graph for this function:

◆ loadSpokenNames()

std::optional< std::vector< std::string > > loadSpokenNames ( ) const

Load names to use when verbalizing an object name.

See also
namesJson()

Definition at line 332 of file ObjectInfo.cpp.

+ Here is the caller graph for this function:

◆ meshWrl()

PackageFileLocation meshWrl ( ) const

Definition at line 187 of file ObjectInfo.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ name()

std::string name ( ) const
inline

Definition at line 69 of file ObjectInfo.h.

+ Here is the call graph for this function:

◆ namesJson()

PackageFileLocation namesJson ( ) const

File containing recognized and spoken names of objects.

Definition at line 205 of file ObjectInfo.cpp.

+ Here is the call graph for this function:

◆ package()

std::string package ( ) const

Definition at line 49 of file ObjectInfo.cpp.

◆ sdf()

PackageFileLocation sdf ( ) const

Definition at line 121 of file ObjectInfo.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setLogError()

void setLogError ( bool  enabled)

Definition at line 43 of file ObjectInfo.cpp.

◆ simoxXML()

PackageFileLocation simoxXML ( ) const

Definition at line 109 of file ObjectInfo.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ urdf()

PackageFileLocation urdf ( ) const

Definition at line 115 of file ObjectInfo.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ wavefrontObj()

PackageFileLocation wavefrontObj ( ) const

Definition at line 193 of file ObjectInfo.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

The documentation for this class was generated from the following files: