Drake
RigidBodyFrame< T > Class Template Referencefinal

Multibody systems typically have distinguished frames of interest that need to be monitored. More...

#include <drake/attic/multibody/rigid_body_frame.h>

## Public Member Functions

RigidBodyFrame (const std::string &name, RigidBody< T > *body, const Eigen::Isometry3d &transform_to_body, int model_instance_id=-1)
A constructor where the transform-to-body is specified using an Eigen::Isometry3d matrix. More...

RigidBodyFrame (const std::string &name, RigidBody< T > *body, const Eigen::Vector3d &xyz=Eigen::Vector3d::Zero(), const Eigen::Vector3d &rpy=Eigen::Vector3d::Zero())
A constructor where the transform-to-body is specified using Euler angles. More...

RigidBodyFrame ()
The default constructor. More...

int get_model_instance_id () const
Returns the ID of the model instance to which this rigid body frame belongs. More...

const std::string & get_name () const
Returns the name of this frame. More...

const RigidBody< T > & get_rigid_body () const
Returns the rigid body to which this frame is attached. More...

RigidBody< T > * get_mutable_rigid_body ()
Returns the rigid body to which this frame is attached. More...

const Eigen::Isometry3d & get_transform_to_body () const
Returns the transform between the coordinate frame that belongs to this RigidBodyFrame and the coordinate frame that belongs to the RigidBody to which this frame is attached (which is obtainable by calling RigidBodyFrame::get_rigid_body()). More...

Eigen::Isometry3d * get_mutable_transform_to_body ()
Returns the transform between the coordinate frame that belongs to this RigidBodyFrame and the coordinate frame that belongs to the RigidBody to which this frame is attached. More...

int get_frame_index () const
Returns the index of this RigidBodyFrame within the vector of RigidBodyFrame objects in the RigidBodyTree. More...

void set_name (const std::string &name)
Sets the name of this RigidBodyFrame. More...

void set_rigid_body (RigidBody< T > *rigid_body)
Sets the rigid body to which this frame is attached. More...

bool has_as_rigid_body (RigidBody< T > *rigid_body)
Returns true if this frame's rigid body is equal to the rigid_body. More...

void set_frame_index (int frame_index)
Sets the index of this frame. More...

void set_transform_to_body (const Eigen::Isometry3d &transform_to_body)
Sets the transform to body of this RigidBodyFrame. More...

Implements CopyConstructible, CopyAssignable, MoveConstructible, MoveAssignable
RigidBodyFrame (const RigidBodyFrame &)=default

RigidBodyFrameoperator= (const RigidBodyFrame &)=default

RigidBodyFrame (RigidBodyFrame &&)=default

RigidBodyFrameoperator= (RigidBodyFrame &&)=default

## Detailed Description

### template<typename T> class RigidBodyFrame< T >

Multibody systems typically have distinguished frames of interest that need to be monitored.

A frame is fully described by the body it is rigidly attached to and the pose of this frame with respect to that body. RigidBodyFrame provides an abstraction to describe these frames.

Template Parameters
 T The type being integrated. Must be a valid Eigen scalar.

Instantiated templates for the following kinds of T's are provided:

• double
• AutoDiffXd

They are already available to link against in the containing library. No other values for T are currently supported.

## ◆ RigidBodyFrame() [1/5]

 RigidBodyFrame ( const RigidBodyFrame< T > & )
default

## ◆ RigidBodyFrame() [2/5]

 RigidBodyFrame ( RigidBodyFrame< T > && )
default

## ◆ RigidBodyFrame() [3/5]

 RigidBodyFrame ( const std::string & name, RigidBody< T > * body, const Eigen::Isometry3d & transform_to_body, int model_instance_id = -1 )

A constructor where the transform-to-body is specified using an Eigen::Isometry3d matrix.

## ◆ RigidBodyFrame() [4/5]

 RigidBodyFrame ( const std::string & name, RigidBody< T > * body, const Eigen::Vector3d & xyz = Eigen::Vector3d::Zero(), const Eigen::Vector3d & rpy = Eigen::Vector3d::Zero() )

A constructor where the transform-to-body is specified using Euler angles.

## ◆ RigidBodyFrame() [5/5]

 RigidBodyFrame ( )
inline

The default constructor.

## ◆ get_frame_index()

 int get_frame_index ( ) const
inline

Returns the index of this RigidBodyFrame within the vector of RigidBodyFrame objects in the RigidBodyTree.

## ◆ get_model_instance_id()

 int get_model_instance_id ( ) const

Returns the ID of the model instance to which this rigid body frame belongs.

## ◆ get_mutable_rigid_body()

 RigidBody< T > * get_mutable_rigid_body ( )

Returns the rigid body to which this frame is attached.

## ◆ get_mutable_transform_to_body()

 Eigen::Isometry3d * get_mutable_transform_to_body ( )

Returns the transform between the coordinate frame that belongs to this RigidBodyFrame and the coordinate frame that belongs to the RigidBody to which this frame is attached.

## ◆ get_name()

 const std::string& get_name ( ) const
inline

Returns the name of this frame.

## ◆ get_rigid_body()

 const RigidBody& get_rigid_body ( ) const
inline

Returns the rigid body to which this frame is attached.

## ◆ get_transform_to_body()

 const Eigen::Isometry3d& get_transform_to_body ( ) const
inline

Returns the transform between the coordinate frame that belongs to this RigidBodyFrame and the coordinate frame that belongs to the RigidBody to which this frame is attached (which is obtainable by calling RigidBodyFrame::get_rigid_body()).

Let B be the coordinate frame of the RigidBody to which this RigidBodyFrame is attached and F be the coordinate frame of this RigidBodyFrame. Furthermore, let p_B be the location of a point measured from B's origin and expressed in coordinate frame B, and p_F be the location of the same point but measured from F's origin and expressed in coordinate frame F.

The returned value is T_BF where:

p_B = T_BF * p_F;


## ◆ has_as_rigid_body()

 bool has_as_rigid_body ( RigidBody< T > * rigid_body )

Returns true if this frame's rigid body is equal to the rigid_body.

## ◆ operator=() [1/2]

 RigidBodyFrame& operator= ( const RigidBodyFrame< T > & )
default

## ◆ operator=() [2/2]

 RigidBodyFrame& operator= ( RigidBodyFrame< T > && )
default

## ◆ set_frame_index()

 void set_frame_index ( int frame_index )

Sets the index of this frame.

This is the index in the vector of RigidBodyFrames within the RigidBodyTree.

## ◆ set_name()

 void set_name ( const std::string & name )

Sets the name of this RigidBodyFrame.

## ◆ set_rigid_body()

 void set_rigid_body ( RigidBody< T > * rigid_body )

Sets the rigid body to which this frame is attached.

Parameter rigid_body must remain valid for the lifetime of this RigidBodyFrame object.

## ◆ set_transform_to_body()

 void set_transform_to_body ( const Eigen::Isometry3d & transform_to_body )

Sets the transform to body of this RigidBodyFrame.

This transform must be T_BF as described in method RigidBodyFrame::get_transform_to_body().