23 #include <ignition/math/Pose3.hh>
24 #include <ignition/utils/ImplPtr.hh>
28 #include "sdf/sdf_config.h"
34 inline namespace SDF_VERSION_NAMESPACE {
44 struct PoseRelativeToGraph;
45 struct FrameAttachedToGraph;
46 template <
typename T>
class ScopedGraph;
79 public: std::string
Name()
const;
84 public:
void SetName(
const std::string &_name);
259 public:
const ignition::math::Pose3d &
RawPose()
const;
264 public:
void SetRawPose(
const ignition::math::Pose3d &_pose);
337 const uint64_t _index)
const;
347 const uint64_t _index)
const;
381 private:
void SetPoseRelativeToGraph(
389 private:
void SetFrameAttachedToGraph(
399 IGN_UTILS_IMPL_PTR(dataPtr)
A Frame element descibes the properties associated with an explicit frame defined in a Model or World...
Definition: Frame.hh:43
void SetPoseRelativeTo(const std::string &_frame)
Set the name of the coordinate frame relative to which this object's pose is expressed.
void SetSelfCollide(bool _selfCollide)
Set this model to self-collide or not self-collide.
void SetRawPose(const ignition::math::Pose3d &_pose)
Set the pose of the model.
bool EnableWind() const
Check if this model should be subject to wind.
bool AddLink(const Link &_link)
Add a link to the model.
const Frame * FrameByIndex(const uint64_t _index) const
Get an immediate (not nested) child explicit frame based on an index.
sdf::SemanticPose SemanticPose() const
Get SemanticPose object of this object to aid in resolving poses.
const std::string & CanonicalLinkName() const
Get the name of the model's canonical link.
const ignition::math::Pose3d & RawPose() const
Get the pose of the model.
bool Static() const
Check if this model should be static.
bool ModelNameExists(const std::string &_name) const
Get whether a nested model name exists.
void SetStatic(bool _static)
Set this model to be static or not static.
bool AddModel(const Model &_model)
Add a model to the model.
bool LinkNameExists(const std::string &_name) const
Get whether a link name exists.
const NestedInclude * InterfaceModelNestedIncludeByIndex(const uint64_t _index) const
Get the nested include information of an immediate (not recursively nested) child interface model bas...
void ClearJoints()
Remove all joints.
uint64_t InterfaceModelCount() const
Get the number of nested interface models that are immediate (not recursively nested) children of thi...
bool JointNameExists(const std::string &_name) const
Get whether a joint name exists.
bool AddJoint(const Joint &_joint)
Add a joint to the model.
const Link * LinkByIndex(const uint64_t _index) const
Get an immediate (not nested) child link based on an index.
const std::string & PoseRelativeTo() const
Get the name of the coordinate frame relative to which this object's pose is expressed.
const Link * CanonicalLink() const
Get the model's canonical link.
bool AllowAutoDisable() const
Check if this model should be allowed to auto-disable.
Model()
Default constructor.
void ClearLinks()
Remove all links.
const Model * ModelByName(const std::string &_name) const
Get a nested model based on a name.
Errors ValidateGraphs() const
Check that the FrameAttachedToGraph and PoseRelativeToGraph are valid.
bool SelfCollide() const
Check if this model should self-collide.
const Joint * JointByName(const std::string &_name) const
Get a joint based on a name.
uint64_t FrameCount() const
Get the number of explicit frames that are immediate (not nested) children of this Model object.
void ClearModels()
Remove all models.
bool FrameNameExists(const std::string &_name) const
Get whether an explicit frame name exists.
std::string Name() const
Get the name of the model.
const Model * ModelByIndex(const uint64_t _index) const
Get an immediate (not recursively nested) child model based on an index.
std::pair< const Link *, std::string > CanonicalLinkAndRelativeName() const
Get the model's canonical link and the nested name of the link relative to the current model,...
uint64_t LinkCount() const
Get the number of links that are immediate (not nested) children of this Model object.
Errors Load(ElementPtr _sdf)
Load the model based on a element pointer.
void SetName(const std::string &_name)
Set the name of the model.
Errors Load(sdf::ElementPtr _sdf, const ParserConfig &_config)
Load the model based on a element pointer.
const Joint * JointByIndex(const uint64_t _index) const
Get an immediate (not nested) child joint based on an index.
void SetAllowAutoDisable(bool _allowAutoDisable)
Set this model to allow auto-disabling.
uint64_t ModelCount() const
Get the number of nested models that are immediate (not recursively nested) children of this Model ob...
void SetCanonicalLinkName(const std::string &_canonicalLink)
Set the name of the model's canonical link.
void SetPlacementFrameName(const std::string &_name)
Set the name of the placement frame of the model.
std::shared_ptr< const InterfaceModel > InterfaceModelByIndex(const uint64_t _index) const
Get an immediate (not recursively nested) child interface model based on an index.
const Link * LinkByName(const std::string &_name) const
Get a link based on a name.
const Frame * FrameByName(const std::string &_name) const
Get an explicit frame based on a name.
sdf::ElementPtr Element() const
Get a pointer to the SDF element that was used during load.
uint64_t JointCount() const
Get the number of joints that are immediate (not nested) children of this Model object.
const std::string & PlacementFrameName() const
Get the name of the placement frame of the model.
void SetEnableWind(bool _enableWind)
Set whether this model should be subject to wind.
Contains the necessary information about an included model file for custom model parsers to be able t...
Definition: InterfaceElements.hh:45
This class contains configuration options for the libsdformat parser.
Definition: ParserConfig.hh:85
Root class that acts as an entry point to the SDF document model.
Definition: Root.hh:55
Definition: Collision.hh:39
SemanticPose is a data structure that can be used by different DOM objects to resolve poses on a Pose...
Definition: SemanticPose.hh:55
std::vector< Error > Errors
A vector of Error.
Definition: Types.hh:106
std::shared_ptr< Element > ElementPtr
Definition: Element.hh:54
namespace for Simulation Description Format parser
Definition: Actor.hh:34
#define SDFORMAT_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system_util.hh:41