Public Member Functions | List of all members
sdf::SDF_VERSION_NAMESPACE::InterfaceModel Class Reference

Interface element representing a Model. More...

#include <InterfaceModel.hh>

Public Member Functions

 InterfaceModel (const std::string &_name, const sdf::RepostureFunction &_repostureFunction, bool _static, const std::string &_canonicalLinkName, const gz::math::Pose3d &_poseInParentFrame={})
 Constructor. More...
 
void AddFrame (sdf::InterfaceFrame _frame)
 Add an interface frame. More...
 
void AddJoint (sdf::InterfaceJoint _joint)
 Add an interface joint. More...
 
void AddLink (sdf::InterfaceLink _link)
 Add an interface link. More...
 
void AddNestedModel (sdf::InterfaceModelConstPtr _nestedModel)
 Provided so that hierarchy can still be leveraged from SDFormat. More...
 
const std::string & CanonicalLinkName () const
 Get the canonical link name. More...
 
const std::vector< sdf::InterfaceFrame > & Frames () const
 Gets registered frames. More...
 
const std::vector< sdf::InterfaceJoint > & Joints () const
 Gets registered joints. More...
 
const std::vector< sdf::InterfaceLink > & Links () const
 Gets registered links. More...
 
const gz::math::Pose3d & ModelFramePoseInParentFrame () const
 Get the pose of this model in the parent frame. More...
 
const std::string & Name () const
 Get the name of the model. More...
 
const std::vector< sdf::InterfaceModelConstPtr > & NestedModels () const
 Gets registered nested models. More...
 
bool ParserSupportsMergeInclude () const
 Whether the custom parser supports merge-include. More...
 
void SetParserSupportsMergeInclude (bool _val)
 Set whether the custom parser supports merge-include. More...
 
bool Static () const
 Get whether the model is static. More...
 

Detailed Description

Interface element representing a Model.

Constructor & Destructor Documentation

◆ InterfaceModel()

sdf::SDF_VERSION_NAMESPACE::InterfaceModel::InterfaceModel ( const std::string &  _name,
const sdf::RepostureFunction _repostureFunction,
bool  _static,
const std::string &  _canonicalLinkName,
const gz::math::Pose3d &  _poseInParentFrame = {} 
)

Constructor.

Parameters
[in]nameThe local name (no nesting, e.g. "::"). If this name contains "::", an error will be raised.
[in]_staticWhether the model is static
[in]_canonicalLinkNameThe canonical link's name. This is the resolved name of the canonical link, therefore, it cannot be an empty string. The link must be added to the model. If the canonical link is nested in a child model, this should be the relative name (using the "::" delimiter) of the canonical link in the scope of this model.
[in]_poseInParentFrameModel frame pose relative to the parent frame. Defaults to identity.
Note
This will not be used if //include/pose is specified.

Member Function Documentation

◆ AddFrame()

void sdf::SDF_VERSION_NAMESPACE::InterfaceModel::AddFrame ( sdf::InterfaceFrame  _frame)

Add an interface frame.

Provided so that the including SDFormat model can still interface with the declared frames.

Parameters
[in]_frameA child interface frame.

◆ AddJoint()

void sdf::SDF_VERSION_NAMESPACE::InterfaceModel::AddJoint ( sdf::InterfaceJoint  _joint)

Add an interface joint.

Provided so that the including SDFormat model can still interface with the declared joints.

Parameters
[in]_jointA child interface joint.

◆ AddLink()

void sdf::SDF_VERSION_NAMESPACE::InterfaceModel::AddLink ( sdf::InterfaceLink  _link)

Add an interface link.

Provided so that the including SDFormat model can still interface with the declared links.

Parameters
[in]_linkA child interface link.

◆ AddNestedModel()

void sdf::SDF_VERSION_NAMESPACE::InterfaceModel::AddNestedModel ( sdf::InterfaceModelConstPtr  _nestedModel)

Provided so that hierarchy can still be leveraged from SDFormat.

Parameters
[in]_nestedModelA child interface model.

◆ CanonicalLinkName()

const std::string& sdf::SDF_VERSION_NAMESPACE::InterfaceModel::CanonicalLinkName ( ) const

Get the canonical link name.

Remarks
Unlike Model::CanonicalLinkName which simply returns the value of //model/@canonical_link without resolving to an actual link, this function returns the resolved canonical link name.
Returns
Canonical link name of the model.

◆ Frames()

const std::vector<sdf::InterfaceFrame>& sdf::SDF_VERSION_NAMESPACE::InterfaceModel::Frames ( ) const

Gets registered frames.

◆ Joints()

const std::vector<sdf::InterfaceJoint>& sdf::SDF_VERSION_NAMESPACE::InterfaceModel::Joints ( ) const

Gets registered joints.

◆ Links()

const std::vector<sdf::InterfaceLink>& sdf::SDF_VERSION_NAMESPACE::InterfaceModel::Links ( ) const

Gets registered links.

◆ ModelFramePoseInParentFrame()

const gz::math::Pose3d& sdf::SDF_VERSION_NAMESPACE::InterfaceModel::ModelFramePoseInParentFrame ( ) const

Get the pose of this model in the parent frame.

Returns
Pose of this model in the parent model frame.

◆ Name()

const std::string& sdf::SDF_VERSION_NAMESPACE::InterfaceModel::Name ( ) const

Get the name of the model.

Returns
Local name of the model.

◆ NestedModels()

const std::vector<sdf::InterfaceModelConstPtr>& sdf::SDF_VERSION_NAMESPACE::InterfaceModel::NestedModels ( ) const

Gets registered nested models.

◆ ParserSupportsMergeInclude()

bool sdf::SDF_VERSION_NAMESPACE::InterfaceModel::ParserSupportsMergeInclude ( ) const

Whether the custom parser supports merge-include.

Returns
True if the custom parser supports merge-include

◆ SetParserSupportsMergeInclude()

void sdf::SDF_VERSION_NAMESPACE::InterfaceModel::SetParserSupportsMergeInclude ( bool  _val)

Set whether the custom parser supports merge-include.

[in] _val True if the custom parser supports merge-include.

◆ Static()

bool sdf::SDF_VERSION_NAMESPACE::InterfaceModel::Static ( ) const

Get whether the model is static.

Returns
Whether the model is static.

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