18 #ifndef SDF_INTERFACE_MODEL_HH_
19 #define SDF_INTERFACE_MODEL_HH_
26 #include <gz/math/Pose3.hh>
27 #include <gz/utils/ImplPtr.hh>
40 inline namespace SDF_VERSION_NAMESPACE
44 struct PoseRelativeToGraph;
74 const std::string &_canonicalLinkName,
75 const gz::math::Pose3d &_poseInParentFrame = {});
79 public:
const std::string &
Name()
const;
101 public:
const std::vector<sdf::InterfaceModelConstPtr> &
NestedModels()
const;
109 public:
const std::vector<sdf::InterfaceFrame> &
Frames()
const;
117 public:
const std::vector<sdf::InterfaceJoint> &
Joints()
const;
125 public:
const std::vector<sdf::InterfaceLink> &
Links()
const;
138 private:
void InvokeRepostureFunction(
140 const std::optional<std::string> &_name)
const;
145 GZ_UTILS_IMPL_PTR(dataPtr)
Interface element representing an explicit frame.
Definition: InterfaceFrame.hh:35
Interface element representing a Joint.
Definition: InterfaceJoint.hh:35
Interface element representing a Link.
Definition: InterfaceLink.hh:35
Class used in reposture callbacks of custom parsers to resolve poses.
Definition: InterfaceModelPoseGraph.hh:45
Interface element representing a Model.
Definition: InterfaceModel.hh:58
const std::vector< sdf::InterfaceModelConstPtr > & NestedModels() const
Gets registered nested models.
void SetParserSupportsMergeInclude(bool _val)
Set whether the custom parser supports merge-include.
InterfaceModel(const std::string &_name, const sdf::RepostureFunction &_repostureFunction, bool _static, const std::string &_canonicalLinkName, const gz::math::Pose3d &_poseInParentFrame={})
Constructor.
const gz::math::Pose3d & ModelFramePoseInParentFrame() const
Get the pose of this model in the parent frame.
void AddNestedModel(sdf::InterfaceModelConstPtr _nestedModel)
Provided so that hierarchy can still be leveraged from SDFormat.
void AddFrame(sdf::InterfaceFrame _frame)
Add an interface frame.
const std::string & CanonicalLinkName() const
Get the canonical link name.
const std::vector< sdf::InterfaceFrame > & Frames() const
Gets registered frames.
void AddLink(sdf::InterfaceLink _link)
Add an interface link.
bool Static() const
Get whether the model is static.
void AddJoint(sdf::InterfaceJoint _joint)
Add an interface joint.
const std::vector< sdf::InterfaceLink > & Links() const
Gets registered links.
bool ParserSupportsMergeInclude() const
Whether the custom parser supports merge-include.
const std::string & Name() const
Get the name of the model.
const std::vector< sdf::InterfaceJoint > & Joints() const
Gets registered joints.
Definition: Collision.hh:44
std::function< void(const sdf::InterfaceModelPoseGraph &)> RepostureFunction
Function signature for the reposture callback function.
Definition: InterfaceModel.hh:54
std::shared_ptr< const InterfaceModel > InterfaceModelConstPtr
Definition: InterfaceModel.hh:50
std::shared_ptr< InterfaceModel > InterfaceModelPtr
Definition: InterfaceModel.hh:49
namespace for Simulation Description Format parser
Definition: Actor.hh:35
#define SDFORMAT_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system_util.hh:25