mc_rbdyn::Frame Struct Reference

#include <mc_rbdyn/Frame.h>

Inheritance diagram for mc_rbdyn::Frame:
Collaboration diagram for mc_rbdyn::Frame:

Classes

struct  NewFrameToken
 

Public Member Functions

 Frame (NewFrameToken, const std::string &name) noexcept
 
 Frame (NewFrameToken, const std::string &name, Frame &parent, sva::PTransformd X_p_f, bool bake) noexcept
 
virtual ~Frame ()
 
 Frame (const Frame &)=delete
 
 Frame (Frame &&)=delete
 
Frameoperator= (const Frame &)=delete
 
Frameoperator= (Frame &&)=delete
 
const std::string & name () const noexcept
 
virtual sva::PTransformd position () const noexcept
 
virtual sva::MotionVecd velocity () const noexcept
 
Frameposition (sva::PTransformd pos) noexcept
 
Framevelocity (sva::MotionVecd velocity) noexcept
 
const FramePtrparent () const noexcept
 
mc_tvm::Frametvm_frame () const
 
- Public Member Functions inherited from mc_rtc::shared< Frame >
 operator std::shared_ptr< Frame > ()
 
 operator std::shared_ptr< const Frame > () const
 

Static Public Member Functions

static FramePtr make (const std::string &name) noexcept
 
static FramePtr make (const std::string &name, Frame &parent, sva::PTransformd X_p_f, bool baked)
 

Protected Member Functions

virtual void init_tvm_frame () const
 

Protected Attributes

std::string name_
 
FramePtr parent_ = nullptr
 
sva::PTransformd position_ = sva::PTransformd::Identity()
 
sva::MotionVecd velocity_ = sva::MotionVecd::Zero()
 
mc_tvm::FramePtr tvm_frame_
 

Additional Inherited Members

- Public Types inherited from mc_rtc::shared< Frame >
using ActualBase = typename std::conditional< std::is_same< void, void >::value, std::enable_shared_from_this< Frame >, void >::type
 

Detailed Description

Represents a frame

This frame is not necessarily associated to a robot as RobotFrame

Its position/velocity/acceleration properties are user-provided

Constructor & Destructor Documentation

◆ Frame() [1/4]

mc_rbdyn::Frame::Frame ( NewFrameToken  ,
const std::string &  name 
)
noexcept

Constructor for a frame with no parent

◆ Frame() [2/4]

mc_rbdyn::Frame::Frame ( NewFrameToken  ,
const std::string &  name,
Frame parent,
sva::PTransformd  X_p_f,
bool  bake 
)
noexcept

Constructor for a frame with a parent

◆ ~Frame()

virtual mc_rbdyn::Frame::~Frame ( )
virtual

◆ Frame() [3/4]

mc_rbdyn::Frame::Frame ( const Frame )
delete

◆ Frame() [4/4]

mc_rbdyn::Frame::Frame ( Frame &&  )
delete

Member Function Documentation

◆ init_tvm_frame()

virtual void mc_rbdyn::Frame::init_tvm_frame ( ) const
protectedvirtual

Initialize the associated tvm Frame

◆ make() [1/2]

static FramePtr mc_rbdyn::Frame::make ( const std::string &  name)
inlinestaticnoexcept

Creates a new frame with no parent

Parameters
nameName of the frame

◆ make() [2/2]

static FramePtr mc_rbdyn::Frame::make ( const std::string &  name,
Frame parent,
sva::PTransformd  X_p_f,
bool  baked 
)
static

Creates a new frame with a parent. The frame is fixed relative to its parent

If parent is a RobotFrame then this function returns a RobotFrame

Parameters
nameName of the new frame
parentParent frame
X_p_fTransformation from the parent to the frame
bakedIf true, don't keep track of the parent in the newly created frame
Exceptions
Ifparent is actually a RobotFrame this creates a new frame name in RoboyFrame, this throws if name is alredy a frame in the robot

◆ name()

const std::string& mc_rbdyn::Frame::name ( ) const
inlinenoexcept

Return the frame's name

◆ operator=() [1/2]

Frame& mc_rbdyn::Frame::operator= ( const Frame )
delete

◆ operator=() [2/2]

Frame& mc_rbdyn::Frame::operator= ( Frame &&  )
delete

◆ parent()

const FramePtr& mc_rbdyn::Frame::parent ( ) const
inlinenoexcept

Access the parent's frame (might be nullptr)

◆ position() [1/2]

virtual sva::PTransformd mc_rbdyn::Frame::position ( ) const
inlinevirtualnoexcept

Compute the current (6D) frame's position in inertial frame

◆ position() [2/2]

Frame& mc_rbdyn::Frame::position ( sva::PTransformd  pos)
inlinenoexcept

Update the frame's position

If this frame has no parent, this sets its absolute position.

Othewise, it sets the relative transformation from it's parent to itself

◆ tvm_frame()

mc_tvm::Frame& mc_rbdyn::Frame::tvm_frame ( ) const
inline

Access the associated TVM frame

See also
mc_rbdyn::Robot for rational on returning a non-const reference from a const method

◆ velocity() [1/2]

virtual sva::MotionVecd mc_rbdyn::Frame::velocity ( ) const
inlinevirtualnoexcept

Compute the current frame's velocity in inertial frame

◆ velocity() [2/2]

Frame& mc_rbdyn::Frame::velocity ( sva::MotionVecd  velocity)
inlinenoexcept

Update the frame's velocity

If this frame has no parent this sets its absolute velocity.

Otherwise this is a no-op

Member Data Documentation

◆ name_

std::string mc_rbdyn::Frame::name_
protected

Name of the frame

◆ parent_

FramePtr mc_rbdyn::Frame::parent_ = nullptr
protected

Direct parent of the frame (if any)

◆ position_

sva::PTransformd mc_rbdyn::Frame::position_ = sva::PTransformd::Identity()
protected

Absolute position for a frame with no parent, relative position otherwise

◆ tvm_frame_

mc_tvm::FramePtr mc_rbdyn::Frame::tvm_frame_
mutableprotected

TVM frame associated to this mc_rbdyn Frame

mutable to allow initialization in const method

◆ velocity_

sva::MotionVecd mc_rbdyn::Frame::velocity_ = sva::MotionVecd::Zero()
protected

Absolute velocity for a frame with no parent, unused otherwise


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