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 17 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 24 of file ObjectInfo.cpp.

◆ ~ObjectInfo()

virtual ~ObjectInfo ( )
virtualdefault

Member Function Documentation

◆ articulatedSdf()

PackageFileLocation articulatedSdf ( ) const

Definition at line 134 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 124 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 129 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 171 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 308 of file ObjectInfo.cpp.

+ Here is the call graph for this function:

◆ className()

std::string className ( ) const

Definition at line 47 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 42 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 72 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 139 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 104 of file ObjectInfo.cpp.

+ Here is the call graph for this function:

◆ id()

ObjectID id ( ) const

Return "dataset/name".

Definition at line 52 of file ObjectInfo.cpp.

+ Here is the caller graph for this function:

◆ idStr()

std::string idStr ( ) const

Definition at line 57 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 181 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 214 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 261 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 266 of file ObjectInfo.cpp.

+ Here is the caller graph for this function:

◆ meshWrl()

PackageFileLocation meshWrl ( ) const

Definition at line 161 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 176 of file ObjectInfo.cpp.

+ Here is the call graph for this function:

◆ package()

std::string package ( ) const

Definition at line 37 of file ObjectInfo.cpp.

◆ sdf()

PackageFileLocation sdf ( ) const

Definition at line 99 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 32 of file ObjectInfo.cpp.

◆ simoxXML()

PackageFileLocation simoxXML ( ) const

Definition at line 89 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 94 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 166 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: