#include <Model.hh>
Public Member Functions | |
Model () | |
Default constructor. More... | |
Model (const Model &_model) | |
Copy constructor. More... | |
Model (Model &&_model) noexcept | |
Move constructor. More... | |
~Model () | |
Destructor. More... | |
bool | AllowAutoDisable () const |
Check if this model should be allowed to auto-disable. More... | |
const Link * | CanonicalLink () const |
Get the model's canonical link. More... | |
const std::string & | CanonicalLinkName () const |
Get the name of the model's canonical link. More... | |
sdf::ElementPtr | Element () const |
Get a pointer to the SDF element that was used during load. More... | |
bool | EnableWind () const |
Check if this model should be subject to wind. More... | |
const Frame * | FrameByIndex (const uint64_t _index) const |
Get an explicit frame based on an index. More... | |
const Frame * | FrameByName (const std::string &_name) const |
Get an explicit frame based on a name. More... | |
uint64_t | FrameCount () const |
Get the number of explicit frames. More... | |
bool | FrameNameExists (const std::string &_name) const |
Get whether an explicit frame name exists. More... | |
const Joint * | JointByIndex (const uint64_t _index) const |
Get a joint based on an index. More... | |
const Joint * | JointByName (const std::string &_name) const |
Get a joint based on a name. More... | |
uint64_t | JointCount () const |
Get the number of joints. More... | |
bool | JointNameExists (const std::string &_name) const |
Get whether a joint name exists. More... | |
const Link * | LinkByIndex (const uint64_t _index) const |
Get a link based on an index. More... | |
const Link * | LinkByName (const std::string &_name) const |
Get a link based on a name. More... | |
uint64_t | LinkCount () const |
Get the number of links. More... | |
bool | LinkNameExists (const std::string &_name) const |
Get whether a link name exists. More... | |
Errors | Load (ElementPtr _sdf) |
Load the model based on a element pointer. More... | |
const Model * | ModelByIndex (const uint64_t _index) const |
Get a nested model based on an index. More... | |
const Model * | ModelByName (const std::string &_name) const |
Get a nested model based on a name. More... | |
uint64_t | ModelCount () const |
Get the number of nested models. More... | |
bool | ModelNameExists (const std::string &_name) const |
Get whether a nested model name exists. More... | |
std::string | Name () const |
Get the name of the model. More... | |
Model & | operator= (Model &&_model) |
Move assignment operator. More... | |
Model & | operator= (const Model &_model) |
Copy assignment operator. More... | |
const std::string & | PoseRelativeTo () const |
Get the name of the coordinate frame relative to which this object's pose is expressed. More... | |
const ignition::math::Pose3d & | RawPose () const |
Get the pose of the model. More... | |
bool | SelfCollide () const |
Check if this model should self-collide. More... | |
sdf::SemanticPose | SemanticPose () const |
Get SemanticPose object of this object to aid in resolving poses. More... | |
void | SetAllowAutoDisable (bool _allowAutoDisable) |
Set this model to allow auto-disabling. More... | |
void | SetCanonicalLinkName (const std::string &_canonicalLink) |
Set the name of the model's canonical link. More... | |
void | SetEnableWind (bool _enableWind) |
Set whether this model should be subject to wind. More... | |
void | SetName (const std::string &_name) |
Set the name of the model. More... | |
void | SetPoseRelativeTo (const std::string &_frame) |
Set the name of the coordinate frame relative to which this object's pose is expressed. More... | |
void | SetRawPose (const ignition::math::Pose3d &_pose) |
Set the pose of the model. More... | |
void | SetSelfCollide (bool _selfCollide) |
Set this model to self-collide or not self-collide. More... | |
void | SetStatic (bool _static) |
Set this model to be static or not static. More... | |
bool | Static () const |
Check if this model should be static. More... | |
Friends | |
std::pair< const Link *, std::string > | modelCanonicalLinkAndRelativeName (const Model *) |
Allow helper function in FrameSemantics.cc to call CanonicalLinkAndRelativeName. More... | |
sdf::v10::Model::Model | ( | ) |
Default constructor.
sdf::v10::Model::Model | ( | const Model & | _model | ) |
Copy constructor.
[in] | _model | Model to copy. |
|
noexcept |
Move constructor.
[in] | _model | Model to move. |
sdf::v10::Model::~Model | ( | ) |
Destructor.
bool sdf::v10::Model::AllowAutoDisable | ( | ) | const |
Check if this model should be allowed to auto-disable.
If auto-disable is allowed, a model that is at rest can choose to not update its dynamics.
const Link* sdf::v10::Model::CanonicalLink | ( | ) | const |
Get the model's canonical link.
const std::string& sdf::v10::Model::CanonicalLinkName | ( | ) | const |
Get the name of the model's canonical link.
An empty value indicates that the first link in the model or the first link found in a depth first search of nested models is the canonical link.
sdf::ElementPtr sdf::v10::Model::Element | ( | ) | const |
bool sdf::v10::Model::EnableWind | ( | ) | const |
Check if this model should be subject to wind.
If true, all links in the model should be affected by the wind. This can be overridden per link.
const Frame* sdf::v10::Model::FrameByIndex | ( | const uint64_t | _index | ) | const |
Get an explicit frame based on an index.
[in] | _index | Index of the explicit frame. The index should be in the range [0..FrameCount()). |
const Frame* sdf::v10::Model::FrameByName | ( | const std::string & | _name | ) | const |
Get an explicit frame based on a name.
[in] | _name | Name of the explicit frame. |
uint64_t sdf::v10::Model::FrameCount | ( | ) | const |
Get the number of explicit frames.
bool sdf::v10::Model::FrameNameExists | ( | const std::string & | _name | ) | const |
Get whether an explicit frame name exists.
[in] | _name | Name of the explicit frame to check. |
const Joint* sdf::v10::Model::JointByIndex | ( | const uint64_t | _index | ) | const |
Get a joint based on an index.
[in] | _index | Index of the joint. The index should be in the range [0..JointCount()). |
const Joint* sdf::v10::Model::JointByName | ( | const std::string & | _name | ) | const |
Get a joint based on a name.
[in] | _name | Name of the joint. |
uint64_t sdf::v10::Model::JointCount | ( | ) | const |
Get the number of joints.
bool sdf::v10::Model::JointNameExists | ( | const std::string & | _name | ) | const |
Get whether a joint name exists.
[in] | _name | Name of the joint to check. |
const Link* sdf::v10::Model::LinkByIndex | ( | const uint64_t | _index | ) | const |
Get a link based on an index.
[in] | _index | Index of the link. The index should be in the range [0..LinkCount()). |
const Link* sdf::v10::Model::LinkByName | ( | const std::string & | _name | ) | const |
Get a link based on a name.
[in] | _name | Name of the link. |
uint64_t sdf::v10::Model::LinkCount | ( | ) | const |
Get the number of links.
bool sdf::v10::Model::LinkNameExists | ( | const std::string & | _name | ) | const |
Get whether a link name exists.
[in] | _name | Name of the link to check. |
Errors sdf::v10::Model::Load | ( | ElementPtr | _sdf | ) |
const Model* sdf::v10::Model::ModelByIndex | ( | const uint64_t | _index | ) | const |
Get a nested model based on an index.
[in] | _index | Index of the nested model. The index should be in the range [0..ModelCount()). |
const Model* sdf::v10::Model::ModelByName | ( | const std::string & | _name | ) | const |
Get a nested model based on a name.
[in] | _name | Name of the nested model. |
uint64_t sdf::v10::Model::ModelCount | ( | ) | const |
Get the number of nested models.
bool sdf::v10::Model::ModelNameExists | ( | const std::string & | _name | ) | const |
Get whether a nested model name exists.
[in] | _name | Name of the nested model to check. |
std::string sdf::v10::Model::Name | ( | ) | const |
Get the name of the model.
The name of the model should be unique within the scope of a World.
const std::string& sdf::v10::Model::PoseRelativeTo | ( | ) | const |
Get the name of the coordinate frame relative to which this object's pose is expressed.
An empty value indicates that the frame is relative to the parent model/world coordinate frame.
const ignition::math::Pose3d& sdf::v10::Model::RawPose | ( | ) | const |
Get the pose of the model.
This is the pose of the model as specified in SDF (<model> <pose> ... </pose></model>), and is typically used to express the position and rotation of a model in a global coordinate frame.
bool sdf::v10::Model::SelfCollide | ( | ) | const |
Check if this model should self-collide.
A self-colliding model is a model whose links will collide if they come into contact. If a model is not self-colliding, its links will pass through each other.
sdf::SemanticPose sdf::v10::Model::SemanticPose | ( | ) | const |
Get SemanticPose object of this object to aid in resolving poses.
void sdf::v10::Model::SetAllowAutoDisable | ( | bool | _allowAutoDisable | ) |
Set this model to allow auto-disabling.
[in] | _allowAutoDisable | True or false depending on whether the model should be allowed to auto-disable. |
void sdf::v10::Model::SetCanonicalLinkName | ( | const std::string & | _canonicalLink | ) |
Set the name of the model's canonical link.
An empty value indicates that the first link in the model or the first link found in a depth first search of nested models is the canonical link.
[in] | _canonicalLink | The name of the canonical link. |
void sdf::v10::Model::SetEnableWind | ( | bool | _enableWind | ) |
Set whether this model should be subject to wind.
[in] | _enableWind | True or false depending on whether the model should be subject to wind. |
void sdf::v10::Model::SetName | ( | const std::string & | _name | ) |
Set the name of the model.
The name of the model should be unique within the scope of a World.
[in] | _name | Name of the model. |
void sdf::v10::Model::SetPoseRelativeTo | ( | const std::string & | _frame | ) |
Set the name of the coordinate frame relative to which this object's pose is expressed.
An empty value indicates that the frame is relative to the parent model/world coordinate frame.
[in] | _frame | The name of the pose relative-to frame. |
void sdf::v10::Model::SetRawPose | ( | const ignition::math::Pose3d & | _pose | ) |
Set the pose of the model.
[in] | _pose | The new model pose. |
void sdf::v10::Model::SetSelfCollide | ( | bool | _selfCollide | ) |
Set this model to self-collide or not self-collide.
[in] | _selfCollide | True or false depending on whether the model should self-collide. |
void sdf::v10::Model::SetStatic | ( | bool | _static | ) |
Set this model to be static or not static.
[in] | _static | True or false depending on whether the model should be static. |
bool sdf::v10::Model::Static | ( | ) | const |
Check if this model should be static.
A static model is one that is not subject to physical forces (in other words, it's purely kinematic instead of dynamic).
Allow helper function in FrameSemantics.cc to call CanonicalLinkAndRelativeName.