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.
 
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.
 
std::optional< PackageFileLocationgetModel () const
 Return the Simox XML, URDF or SDF, if one exists.
 
ObjectID id () const
 Return "dataset/name".
 
std::string idStr () const
 
std::optional< simox::AxisAlignedBoundingBox > loadAABB () const
 Load the AABB (axis-aligned bounding-box) from the bounding box JSON file.
 
std::optional< simox::OrientedBox< float > > loadOOBB () const
 Load the OOBB (object-oriented bounding box) from the bounding box JSON file.
 
std::optional< std::vector< std::string > > loadRecognizedNames () const
 Load names to use when matched when recognizing an object by name.
 
std::optional< std::vector< std::string > > loadSpokenNames () const
 Load names to use when verbalizing an object name.
 
PackageFileLocation meshWrl () const
 
std::string name () const
 
PackageFileLocation namesJson () const
 File containing recognized and spoken names of objects.
 
 ObjectInfo (const std::string &packageName, const path &absPackageDataDir, const path &relObjectsPath, const ObjectID &id)
 ObjectInfo.
 
 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 36 of file ObjectInfo.h.

Member Typedef Documentation

◆ path

using path = std::filesystem::path

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

+ Here is the call graph for this function:

◆ 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 31 of file ObjectInfo.cpp.

+ Here is the call graph for this function:

◆ ~ObjectInfo()

virtual ~ObjectInfo ( )
virtualdefault

Member Function Documentation

◆ articulatedSdf()

PackageFileLocation articulatedSdf ( ) 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:

◆ articulatedSimoxXML()

PackageFileLocation articulatedSimoxXML ( ) const

Definition at line 149 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 155 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 200 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 379 of file ObjectInfo.cpp.

+ Here is the call graph for this function:

◆ className()

std::string className ( ) const

Definition at line 62 of file ObjectInfo.cpp.

+ Here is the caller graph for this function:

◆ dataset()

std::string dataset ( ) const

Definition at line 56 of file ObjectInfo.cpp.

+ Here is the caller graph for this function:

◆ file()

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

Definition at line 91 of file ObjectInfo.cpp.

+ 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 167 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 128 of file ObjectInfo.cpp.

+ Here is the call graph for this function:

◆ id()

ObjectID id ( ) const

Return "dataset/name".

Definition at line 68 of file ObjectInfo.cpp.

+ Here is the caller graph for this function:

◆ idStr()

std::string idStr ( ) const

Definition at line 74 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 212 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 269 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 328 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 334 of file ObjectInfo.cpp.

+ Here is the caller graph for this function:

◆ meshWrl()

PackageFileLocation meshWrl ( ) const

Definition at line 188 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 72 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 206 of file ObjectInfo.cpp.

+ Here is the call graph for this function:

◆ package()

std::string package ( ) const

Definition at line 50 of file ObjectInfo.cpp.

◆ sdf()

PackageFileLocation sdf ( ) const

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

◆ simoxXML()

PackageFileLocation simoxXML ( ) const

Definition at line 110 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 116 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 194 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: