A Frame element descibes the properties associated with an explicit frame defined in a Model or World. More...
#include <Frame.hh>
Public Member Functions | |
Frame () | |
Default constructor. More... | |
const std::string & | AttachedTo () const |
Get the name of the coordinate frame to which this frame is attached. More... | |
sdf::ElementPtr | Element () const |
Get a pointer to the SDF element that was used during load. More... | |
Errors | Load (ElementPtr _sdf) |
Load the frame based on a element pointer. More... | |
const std::string & | Name () const |
Get the name of the frame. More... | |
const std::string & | PoseRelativeTo () const |
Get the name of the coordinate frame relative to which this frame's pose is expressed. More... | |
const gz::math::Pose3d & | RawPose () const |
Get the pose of the frame object. More... | |
Errors | ResolveAttachedToBody (std::string &_body) const |
Resolve the attached-to body of this frame from the FrameAttachedToGraph. More... | |
sdf::SemanticPose | SemanticPose () const |
Get SemanticPose object of this object to aid in resolving poses. More... | |
void | SetAttachedTo (const std::string &_frame) |
Set the name of the coordinate frame to which this frame is attached. More... | |
void | SetName (const std::string &_name) |
Set the name of the frame. More... | |
void | SetPoseRelativeTo (const std::string &_frame) |
Set the name of the coordinate frame relative to which this frame's pose is expressed. More... | |
void | SetRawPose (const gz::math::Pose3d &_pose) |
Set the raw pose of the frame object. More... | |
sdf::ElementPtr | ToElement () const |
Create and return an SDF element filled with data from this frame. More... | |
A Frame element descibes the properties associated with an explicit frame defined in a Model or World.
sdf::SDF_VERSION_NAMESPACE::Frame::Frame | ( | ) |
Default constructor.
const std::string& sdf::SDF_VERSION_NAMESPACE::Frame::AttachedTo | ( | ) | const |
Get the name of the coordinate frame to which this frame is attached.
The interpretation of an empty value depends on whether the frame is contained in a model or world element. For a frame that is a child of <model>, an empty value indicates that the frame is attached to the canonical link of the model. For a frame that is a child of <world> an empty value indicates that the frame is attached to the world frame.
sdf::ElementPtr sdf::SDF_VERSION_NAMESPACE::Frame::Element | ( | ) | const |
Errors sdf::SDF_VERSION_NAMESPACE::Frame::Load | ( | ElementPtr | _sdf | ) |
const std::string& sdf::SDF_VERSION_NAMESPACE::Frame::Name | ( | ) | const |
Get the name of the frame.
The name of the frame must be unique within the scope of its siblings.
const std::string& sdf::SDF_VERSION_NAMESPACE::Frame::PoseRelativeTo | ( | ) | const |
Get the name of the coordinate frame relative to which this frame's pose is expressed.
An empty value indicates that the frame is expressed relative to the attached-to link.
const gz::math::Pose3d& sdf::SDF_VERSION_NAMESPACE::Frame::RawPose | ( | ) | const |
Get the pose of the frame object.
This is the pose of the frame as specified in SDF (<frame><pose> ... </pose></frame>). Use SemanticPose to compute the pose relative to a specific frame.
Errors sdf::SDF_VERSION_NAMESPACE::Frame::ResolveAttachedToBody | ( | std::string & | _body | ) | const |
Resolve the attached-to body of this frame from the FrameAttachedToGraph.
Generally, it resolves to the name of a link, but if it is in the world scope, it can resolve to "world".
[out] | _body | Name of body to which this frame is attached. |
sdf::SemanticPose sdf::SDF_VERSION_NAMESPACE::Frame::SemanticPose | ( | ) | const |
Get SemanticPose object of this object to aid in resolving poses.
void sdf::SDF_VERSION_NAMESPACE::Frame::SetAttachedTo | ( | const std::string & | _frame | ) |
Set the name of the coordinate frame to which this frame is attached.
The interpretation of an empty value depends on whether the frame is contained in a model or world element. For a frame that is a child of <model>, an empty value indicates that the frame is attached to the canonical link of the model. For a frame that is a child of <world> an empty value indicates that the frame is attached to the world frame.
[in] | _frame | The name of the attached-to frame. |
void sdf::SDF_VERSION_NAMESPACE::Frame::SetName | ( | const std::string & | _name | ) |
Set the name of the frame.
The name of the frame must be unique within the scope of its siblings.
[in] | _name | Name of the frame. |
void sdf::SDF_VERSION_NAMESPACE::Frame::SetPoseRelativeTo | ( | const std::string & | _frame | ) |
Set the name of the coordinate frame relative to which this frame's pose is expressed.
An empty value indicates that the frame is expressed relative to the attached-to link.
[in] | _frame | The name of the relative-to frame. |
void sdf::SDF_VERSION_NAMESPACE::Frame::SetRawPose | ( | const gz::math::Pose3d & | _pose | ) |
Set the raw pose of the frame object.
This is interpreted relative to the frame named in the //pose/@relative_to attribute.
[in] | _pose | The pose of the frame object. |
sdf::ElementPtr sdf::SDF_VERSION_NAMESPACE::Frame::ToElement | ( | ) | const |