Public Member Functions | List of all members
sdf::v11::Frame Class Reference

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 ignition::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 ignition::math::Pose3d &_pose)
 Set the raw pose of the frame object. More...
 

Detailed Description

A Frame element descibes the properties associated with an explicit frame defined in a Model or World.

Constructor & Destructor Documentation

◆ Frame()

sdf::v11::Frame::Frame ( )

Default constructor.

Member Function Documentation

◆ AttachedTo()

const std::string& sdf::v11::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.

Returns
The name of the attached-to frame.

◆ Element()

sdf::ElementPtr sdf::v11::Frame::Element ( ) const

Get a pointer to the SDF element that was used during load.

Returns
SDF element pointer. The value will be nullptr if Load has not been called.

◆ Load()

Errors sdf::v11::Frame::Load ( ElementPtr  _sdf)

Load the frame based on a element pointer.

This is not the usual entry point. Typical usage of the SDF DOM is through the Root object.

Parameters
[in]_sdfThe SDF Element pointer
Returns
Errors, which is a vector of Error objects. Each Error includes an error code and message. An empty vector indicates no error.

◆ Name()

const std::string& sdf::v11::Frame::Name ( ) const

Get the name of the frame.

The name of the frame must be unique within the scope of its siblings.

Returns
Name of the frame.

◆ PoseRelativeTo()

const std::string& sdf::v11::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.

Returns
The name of the relative-to frame.

◆ RawPose()

const ignition::math::Pose3d& sdf::v11::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.

Returns
The pose of the frame object.

◆ ResolveAttachedToBody()

Errors sdf::v11::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".

Parameters
[out]_bodyName of body to which this frame is attached.
Returns
Errors.

◆ SemanticPose()

sdf::SemanticPose sdf::v11::Frame::SemanticPose ( ) const

Get SemanticPose object of this object to aid in resolving poses.

Returns
SemanticPose object for this link.

◆ SetAttachedTo()

void sdf::v11::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.

Parameters
[in]_frameThe name of the attached-to frame.

◆ SetName()

void sdf::v11::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.

Parameters
[in]_nameName of the frame.

◆ SetPoseRelativeTo()

void sdf::v11::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.

Parameters
[in]_frameThe name of the relative-to frame.

◆ SetRawPose()

void sdf::v11::Frame::SetRawPose ( const ignition::math::Pose3d &  _pose)

Set the raw pose of the frame object.

This is interpreted relative to the frame named in the //pose/ attribute.

See also
const ignition::math::Pose3d &RawPose() const
Parameters
[in]_poseThe pose of the frame object.

The documentation for this class was generated from the following file: