Public Member Functions | List of all members
sdf::v9::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...
 
 Frame (const Frame &_frame)
 Copy constructor. More...
 
 Frame (Frame &&_frame)
 Move constructor. More...
 
 ~Frame ()
 Destructor. 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...
 
Frameoperator= (Frame &&_frame)
 Move assignment operator. More...
 
Frameoperator= (const Frame &_frame)
 Assignment operator. 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) const
 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() [1/3]

sdf::v9::Frame::Frame ( )

Default constructor.

◆ Frame() [2/3]

sdf::v9::Frame::Frame ( const Frame _frame)

Copy constructor.

Parameters
[in]_frameFrame to copy.

◆ Frame() [3/3]

sdf::v9::Frame::Frame ( Frame &&  _frame)

Move constructor.

Parameters
[in]_frameFrame to move.

◆ ~Frame()

sdf::v9::Frame::~Frame ( )

Destructor.

Member Function Documentation

◆ AttachedTo()

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

◆ operator=() [1/2]

Frame& sdf::v9::Frame::operator= ( Frame &&  _frame)

Move assignment operator.

Parameters
[in]_frameFrame to move.
Returns
Reference to this.

◆ operator=() [2/2]

Frame& sdf::v9::Frame::operator= ( const Frame _frame)

Assignment operator.

Parameters
[in]_frameThe frame to set values from.
Returns
*this

◆ PoseRelativeTo()

const std::string& sdf::v9::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::v9::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::v9::Frame::ResolveAttachedToBody ( std::string &  _body) const

Resolve the attached-to body of this frame from the FrameAttachedToGraph.

If this is in a model scope, it returns the name of a link. In the world scope, it returns the name of a model or the world.

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

◆ SemanticPose()

sdf::SemanticPose sdf::v9::Frame::SemanticPose ( ) const

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

Returns
SemanticPose object for this link.

◆ SetAttachedTo()

void sdf::v9::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::v9::Frame::SetName ( const std::string &  _name) const

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::v9::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::v9::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: