Robot Dynamics Library
Public Member Functions | Protected Attributes | List of all members
RobotDynamics::Math::FrameVectorPair Class Reference

A FrameVector is a pair of 3D vector with a ReferenceFrame. More...

#include <FrameVectorPair.hpp>

Collaboration diagram for RobotDynamics::Math::FrameVectorPair:
Collaboration graph
[legend]

Public Member Functions

 FrameVectorPair ()
 Default constructor. Initializes its ReferenceFrame to nullptr. More...
 
 FrameVectorPair (const FrameVector &linear, const FrameVector &angular)
 
 FrameVectorPair (ReferenceFramePtr referenceFrame)
 
 FrameVectorPair (const SpatialMotion &v)
 Constructor. More...
 
 FrameVectorPair (ReferenceFramePtr referenceFrame, const Vector3d &linear, const Vector3d &angular)
 Constructor. More...
 
 FrameVectorPair (ReferenceFramePtr referenceFrame, const SpatialVector &v)
 Constructor. More...
 
virtual ~FrameVectorPair ()
 Destructor. More...
 
void changeFrame (ReferenceFramePtr referenceFrame)
 Change the frame of the two 3d vectors. Equivalent to the following math expression. More...
 
FrameVectorPair changeFrameAndCopy (ReferenceFramePtr referenceFrame) const
 copy into new frame vector and change the frame of that More...
 
void setToZero ()
 Set x, y, and z components of linear and angular to 0. More...
 
void setReferenceFrame (ReferenceFramePtr referenceFrame)
 Set the reference frame. More...
 
void setIncludingFrame (ReferenceFramePtr referenceFrame, const Vector3d &linear, const Vector3d &angular)
 Set the components and the ReferenceFrame these components are expressed in. More...
 
void setIncludingFrame (ReferenceFramePtr referenceFrame, const SpatialVector &v)
 Set the components and the ReferenceFrame these components are expressed in. More...
 
void setIncludingFrame (ReferenceFramePtr referenceFrame, const MotionVector &v)
 Set the components and the ReferenceFrame these components are expressed in. More...
 
void setIncludingFrame (const SpatialMotion &v)
 Set the components and the ReferenceFrame these components are expressed in. More...
 
void setLinearPart (const Vector3d &v)
 Set the linear vector. More...
 
void setAngularPart (const Vector3d &v)
 Set the angular vector. More...
 
FrameVector linear () const
 Get copy of linear component. More...
 
FrameVector angular () const
 Get copy of angular component. More...
 
template<typename T >
void operator*= (const T scale)
 
void operator+= (const FrameVectorPair &v)
 
void operator-= (const FrameVectorPair &v)
 
FrameVectorlinearPtr ()
 Get pointer to linear vector. More...
 
FrameVectorangularPtr ()
 Get pointer to angular vector. More...
 

Protected Attributes

FrameVector lin
 
FrameVector ang
 

Detailed Description

A FrameVector is a pair of 3D vector with a ReferenceFrame.

Constructor & Destructor Documentation

◆ FrameVectorPair() [1/6]

RobotDynamics::Math::FrameVectorPair::FrameVectorPair ( )
inline

Default constructor. Initializes its ReferenceFrame to nullptr.

◆ FrameVectorPair() [2/6]

RobotDynamics::Math::FrameVectorPair::FrameVectorPair ( const FrameVector linear,
const FrameVector angular 
)
inline

◆ FrameVectorPair() [3/6]

RobotDynamics::Math::FrameVectorPair::FrameVectorPair ( ReferenceFramePtr  referenceFrame)
inlineexplicit

◆ FrameVectorPair() [4/6]

RobotDynamics::Math::FrameVectorPair::FrameVectorPair ( const SpatialMotion v)
inlineexplicit

Constructor.

Parameters
vSpatial motion

◆ FrameVectorPair() [5/6]

RobotDynamics::Math::FrameVectorPair::FrameVectorPair ( ReferenceFramePtr  referenceFrame,
const Vector3d linear,
const Vector3d angular 
)
inline

Constructor.

Parameters
referenceFrameA pointer to a ReferenceFrame
linearlinear component
angularangular component

◆ FrameVectorPair() [6/6]

RobotDynamics::Math::FrameVectorPair::FrameVectorPair ( ReferenceFramePtr  referenceFrame,
const SpatialVector v 
)
inline

Constructor.

Parameters
referenceFrame
v

◆ ~FrameVectorPair()

virtual RobotDynamics::Math::FrameVectorPair::~FrameVectorPair ( )
inlinevirtual

Destructor.

Member Function Documentation

◆ angular()

FrameVector RobotDynamics::Math::FrameVectorPair::angular ( ) const
inline

Get copy of angular component.

Returns
Copy of angular component

◆ angularPtr()

FrameVector* RobotDynamics::Math::FrameVectorPair::angularPtr ( )
inline

Get pointer to angular vector.

Returns
pointer

◆ changeFrame()

void RobotDynamics::Math::FrameVectorPair::changeFrame ( ReferenceFramePtr  referenceFrame)
inline

Change the frame of the two 3d vectors. Equivalent to the following math expression.

\[ \begin{bmatrix} E & 0 \\ 0 & E \end{bmatrix} \begin{bmatrix} angular \\ linear \end{bmatrix} \]

Parameters
referenceFrame

◆ changeFrameAndCopy()

FrameVectorPair RobotDynamics::Math::FrameVectorPair::changeFrameAndCopy ( ReferenceFramePtr  referenceFrame) const
inline

copy into new frame vector and change the frame of that

Parameters
referenceFrame
Returns
Copy of frame vector pair expressed in new frame

◆ linear()

FrameVector RobotDynamics::Math::FrameVectorPair::linear ( ) const
inline

Get copy of linear component.

Returns
Copy of linear part

◆ linearPtr()

FrameVector* RobotDynamics::Math::FrameVectorPair::linearPtr ( )
inline

Get pointer to linear vector.

Returns
pointer

◆ operator*=()

template<typename T >
void RobotDynamics::Math::FrameVectorPair::operator*= ( const T  scale)
inline

◆ operator+=()

void RobotDynamics::Math::FrameVectorPair::operator+= ( const FrameVectorPair v)
inline

◆ operator-=()

void RobotDynamics::Math::FrameVectorPair::operator-= ( const FrameVectorPair v)
inline

◆ setAngularPart()

void RobotDynamics::Math::FrameVectorPair::setAngularPart ( const Vector3d v)
inline

Set the angular vector.

Parameters
v

◆ setIncludingFrame() [1/4]

void RobotDynamics::Math::FrameVectorPair::setIncludingFrame ( const SpatialMotion v)
inline

Set the components and the ReferenceFrame these components are expressed in.

Parameters
vspatial motion

◆ setIncludingFrame() [2/4]

void RobotDynamics::Math::FrameVectorPair::setIncludingFrame ( ReferenceFramePtr  referenceFrame,
const MotionVector v 
)
inline

Set the components and the ReferenceFrame these components are expressed in.

Parameters
vMotion vector
referenceFramepointer to a reference frame

◆ setIncludingFrame() [3/4]

void RobotDynamics::Math::FrameVectorPair::setIncludingFrame ( ReferenceFramePtr  referenceFrame,
const SpatialVector v 
)
inline

Set the components and the ReferenceFrame these components are expressed in.

Parameters
vspatial vector
referenceFramePointer to a ReferenceFrame this point is expressed in

◆ setIncludingFrame() [4/4]

void RobotDynamics::Math::FrameVectorPair::setIncludingFrame ( ReferenceFramePtr  referenceFrame,
const Vector3d linear,
const Vector3d angular 
)
inline

Set the components and the ReferenceFrame these components are expressed in.

Parameters
linearLinear component
angularAngular component
referenceFramePointer to a ReferenceFrame this point is expressed in

◆ setLinearPart()

void RobotDynamics::Math::FrameVectorPair::setLinearPart ( const Vector3d v)
inline

Set the linear vector.

Parameters
v

◆ setReferenceFrame()

void RobotDynamics::Math::FrameVectorPair::setReferenceFrame ( ReferenceFramePtr  referenceFrame)
inline

Set the reference frame.

Parameters
referenceFrame

◆ setToZero()

void RobotDynamics::Math::FrameVectorPair::setToZero ( )
inline

Set x, y, and z components of linear and angular to 0.

Member Data Documentation

◆ ang

FrameVector RobotDynamics::Math::FrameVectorPair::ang
protected

Angular component

◆ lin

FrameVector RobotDynamics::Math::FrameVectorPair::lin
protected

Linear component


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