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

Member Typedef Documentation

◆ path

using path = std::filesystem::path

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).

◆ ObjectInfo() [2/2]

ObjectInfo ( const std::string & packageName,
const path & packageDataDir,
const path & relObjectsPath,
const std::string & dataset,
const std::string & className )

◆ ~ObjectInfo()

virtual ~ObjectInfo ( )
virtualdefault

Member Function Documentation

◆ articulatedSdf()

PackageFileLocation articulatedSdf ( ) const

◆ articulatedSimoxXML()

PackageFileLocation articulatedSimoxXML ( ) const

◆ articulatedUrdf()

PackageFileLocation articulatedUrdf ( ) const

◆ boundingBoxJson()

PackageFileLocation boundingBoxJson ( ) const

◆ 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.

◆ className()

std::string className ( ) const

◆ dataset()

std::string dataset ( ) const

◆ file()

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

◆ getArticulatedModel()

std::optional< PackageFileLocation > getArticulatedModel ( ) const

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

◆ getModel()

std::optional< PackageFileLocation > getModel ( ) const

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

◆ id()

ObjectID id ( ) const

Return "dataset/name".

◆ idStr()

std::string idStr ( ) const

◆ 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.

◆ 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.

◆ loadRecognizedNames()

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

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

See also
namesJson()

◆ loadSpokenNames()

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

Load names to use when verbalizing an object name.

See also
namesJson()

◆ meshWrl()

PackageFileLocation meshWrl ( ) const

◆ name()

std::string name ( ) const
inline

◆ namesJson()

PackageFileLocation namesJson ( ) const

File containing recognized and spoken names of objects.

◆ package()

std::string package ( ) const

◆ sdf()

PackageFileLocation sdf ( ) const

◆ setLogError()

void setLogError ( bool enabled)

◆ simoxXML()

PackageFileLocation simoxXML ( ) const

◆ urdf()

PackageFileLocation urdf ( ) const

◆ wavefrontObj()

PackageFileLocation wavefrontObj ( ) const

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