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. | |
void | AddFrame (sdf::InterfaceFrame _frame) |
Add an interface frame. | |
void | AddJoint (sdf::InterfaceJoint _joint) |
Add an interface joint. | |
void | AddLink (sdf::InterfaceLink _link) |
Add an interface link. | |
void | AddNestedModel (sdf::InterfaceModelConstPtr _nestedModel) |
Provided so that hierarchy can still be leveraged from SDFormat. | |
const std::string & | CanonicalLinkName () const |
Get the canonical link name. | |
const std::vector< sdf::InterfaceFrame > & | Frames () const |
Gets registered frames. | |
const std::vector< sdf::InterfaceJoint > & | Joints () const |
Gets registered joints. | |
const std::vector< sdf::InterfaceLink > & | Links () const |
Gets registered links. | |
const gz::math::Pose3d & | ModelFramePoseInParentFrame () const |
Get the pose of this model in the parent frame. | |
const std::string & | Name () const |
Get the name of the model. | |
const std::vector< sdf::InterfaceModelConstPtr > & | NestedModels () const |
Gets registered nested models. | |
bool | ParserSupportsMergeInclude () const |
Whether the custom parser supports merge-include. | |
void | SetParserSupportsMergeInclude (bool _val) |
Set whether the custom parser supports merge-include. | |
bool | Static () const |
Get whether the model is static. | |
Interface element representing a Model.
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.
[in] | name | The local name (no nesting, e.g. "::"). If this name contains "::", an error will be raised. |
[in] | _static | Whether the model is static |
[in] | _canonicalLinkName | The 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] | _poseInParentFrame | Model frame pose relative to the parent frame. Defaults to identity. |
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.
[in] | _frame | A child interface frame. |
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.
[in] | _joint | A child interface joint. |
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.
[in] | _link | A child interface link. |
void sdf::SDF_VERSION_NAMESPACE::InterfaceModel::AddNestedModel | ( | sdf::InterfaceModelConstPtr | _nestedModel | ) |
Provided so that hierarchy can still be leveraged from SDFormat.
[in] | _nestedModel | A child interface model. |
const std::string & sdf::SDF_VERSION_NAMESPACE::InterfaceModel::CanonicalLinkName | ( | ) | const |
Get the canonical link name.
const std::vector< sdf::InterfaceFrame > & sdf::SDF_VERSION_NAMESPACE::InterfaceModel::Frames | ( | ) | const |
Gets registered frames.
const std::vector< sdf::InterfaceJoint > & sdf::SDF_VERSION_NAMESPACE::InterfaceModel::Joints | ( | ) | const |
Gets registered joints.
const std::vector< sdf::InterfaceLink > & sdf::SDF_VERSION_NAMESPACE::InterfaceModel::Links | ( | ) | const |
Gets registered links.
const gz::math::Pose3d & sdf::SDF_VERSION_NAMESPACE::InterfaceModel::ModelFramePoseInParentFrame | ( | ) | const |
Get the pose of this model in the parent frame.
const std::string & sdf::SDF_VERSION_NAMESPACE::InterfaceModel::Name | ( | ) | const |
Get the name of the model.
const std::vector< sdf::InterfaceModelConstPtr > & sdf::SDF_VERSION_NAMESPACE::InterfaceModel::NestedModels | ( | ) | const |
Gets registered nested models.
bool sdf::SDF_VERSION_NAMESPACE::InterfaceModel::ParserSupportsMergeInclude | ( | ) | const |
Whether the custom parser supports merge-include.
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.
bool sdf::SDF_VERSION_NAMESPACE::InterfaceModel::Static | ( | ) | const |
Get whether the model is static.