Public Member Functions | List of all members
sdf::v11::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 ignition::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 ignition::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 Static () const
 Get whether the model is static. More...
 

Detailed Description

Interface element representing a Model.

Constructor & Destructor Documentation

◆ InterfaceModel()

sdf::v11::InterfaceModel::InterfaceModel ( const std::string &  _name,
const sdf::RepostureFunction &  _repostureFunction,
bool  _static,
const std::string &  _canonicalLinkName,
const ignition::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::v11::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::v11::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::v11::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::v11::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::v11::InterfaceModel::CanonicalLinkName ( ) const

Get the canonical link name.

Remarks
Unlike Model::CanonicalLinkName which simply returns the value of //model/ 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::v11::InterfaceModel::Frames ( ) const

Gets registered frames.

◆ Joints()

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

Gets registered joints.

◆ Links()

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

Gets registered links.

◆ ModelFramePoseInParentFrame()

const ignition::math::Pose3d& sdf::v11::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::v11::InterfaceModel::Name ( ) const

Get the name of the model.

Returns
Local name of the model.

◆ NestedModels()

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

Gets registered nested models.

◆ Static()

bool sdf::v11::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: