pinocchio  1.2.6-7-g6de3e-dirty
ForceBase< Derived > Class Template Reference

Base interface for forces representation. More...

#include <spatial/force.hpp>

Public Member Functions

Derived_t & derived ()
 
const Derived_t & derived () const
 
ConstAngular_t angular () const
 Return the angular part of the force vector. More...
 
ConstLinear_t linear () const
 Return the linear part of the force vector. More...
 
Angular_t angular ()
 Return the angular part of the force vector. More...
 
Linear_t linear ()
 Return the linear part of the force vector. More...
 
void angular (const Vector3 &n)
 Set the angular part of the force vector. More...
 
void linear (const Vector3 &f)
 Set the linear part of the force vector. More...
 
const Vector6 & toVector () const
 Return the force. More...
 
Vector6 & toVector ()
 Return the force. More...
 
 operator Vector6 () const
 
bool operator== (const Derived_t &other) const
 
bool operator!= (const Derived_t &other) const
 
bool isApprox (const Derived &other, const Scalar &prec=Eigen::NumTraits< Scalar >::dummy_precision()) const
 
Derived_t & operator= (const Derived_t &other)
 Copies the Derived Force into *this. More...
 
Derived_t & operator+= (const Derived_t &phi)
 Replaces *this by *this + other. More...
 
Derived_t & operator-= (const Derived_t &phi)
 Replaces *this by *this - other. More...
 
Derived_t operator+ (const Derived_t &phi) const
 
Derived_t operator* (double a) const
 
Derived_t operator- () const
 
Derived_t operator- (const Derived_t &phi) const
 
Scalar dot (const Motion &m) const
 
Derived_t se3Action (const SE3 &m) const
 Transform from A to B coordinates the Force represented by *this such that

\begin{equation*} \leftidx{^B}f = \leftidx{^B}X_A^* * \leftidx{^A}f \end{equation*}

. More...

 
Derived_t se3ActionInverse (const SE3 &m) const
 Transform from B to A coordinates the Force represented by *this such that

\begin{equation*} \leftidx{^A}f = \leftidx{^A}X_B^* * \leftidx{^A}f \end{equation*}

. More...

 
void disp (std::ostream &os) const
 

Protected Types

typedef Derived Derived_t
 

Protected Member Functions

 SPATIAL_TYPEDEF_TEMPLATE (Derived_t)
 

Friends

std::ostream & operator<< (std::ostream &os, const ForceBase< Derived_t > &X)
 

Detailed Description

template<class Derived>
class se3::ForceBase< Derived >

Base interface for forces representation.

The Class implements all

Template Parameters
Derived{ description }

Definition at line 47 of file force.hpp.

Member Function Documentation

ConstAngular_t angular ( ) const
inline

Return the angular part of the force vector.

Returns
The 3D vector associated to the angular part of the 6D force vector

Definition at line 64 of file force.hpp.

Referenced by ActuatorDCNonLinearMotorModel< Scalar_ >::calc().

Angular_t angular ( )
inline

Return the angular part of the force vector.

Returns
The 3D vector associated to the angular part of the 6D force vector

Definition at line 74 of file force.hpp.

void angular ( const Vector3 &  n)
inline

Set the angular part of the force vector.

Parameters
[in]n

Definition at line 85 of file force.hpp.

Scalar dot ( const Motion m) const
inline
Returns
the dot product of *this with m *

Definition at line 169 of file force.hpp.

Referenced by ForceBase< ForceTpl< _Scalar, _Options > >::dot(), and ForceTpl< _Scalar, _Options >::linear_impl().

bool isApprox ( const Derived &  other,
const Scalar &  prec = Eigen::NumTraits<Scalar>::dummy_precision() 
) const
inline
Returns
true if *this is approximately equal to other, within the precision given by prec.

Definition at line 131 of file force.hpp.

ConstLinear_t linear ( ) const
inline

Return the linear part of the force vector.

Returns
The 3D vector associated to the linear part of the 6D force vector

Definition at line 71 of file force.hpp.

Referenced by ActuatorDCNonLinearMotorModel< Scalar_ >::calc().

Linear_t linear ( )
inline

Return the linear part of the force vector.

Returns
The 3D vector associated to the linear part of the 6D force vector

Definition at line 77 of file force.hpp.

void linear ( const Vector3 &  f)
inline

Set the linear part of the force vector.

Parameters
[in]f

Definition at line 92 of file force.hpp.

bool operator!= ( const Derived_t &  other) const
inline
Returns
true if at least one coefficient of *this and other does not match.

Definition at line 127 of file force.hpp.

Derived_t operator* ( double  a) const
inline
Returns
an expression of *this scaled by the double factor a

Definition at line 157 of file force.hpp.

Derived_t operator+ ( const Derived_t &  phi) const
inline
Returns
an expression of the sum of *this and other

Definition at line 153 of file force.hpp.

Derived_t& operator+= ( const Derived_t &  phi)
inline

Replaces *this by *this + other.

Returns
a reference to *this

Definition at line 143 of file force.hpp.

Derived_t operator- ( ) const
inline
Returns
an expression of the opposite of *this

Definition at line 161 of file force.hpp.

Derived_t operator- ( const Derived_t &  phi) const
inline
Returns
an expression of the difference of *this and phi

Definition at line 165 of file force.hpp.

Derived_t& operator-= ( const Derived_t &  phi)
inline

Replaces *this by *this - other.

Returns
a reference to *this

Definition at line 149 of file force.hpp.

Derived_t& operator= ( const Derived_t &  other)
inline

Copies the Derived Force into *this.

Returns
a reference to *this

Definition at line 137 of file force.hpp.

Referenced by ForceTpl< _Scalar, _Options >::se3Action_impl().

bool operator== ( const Derived_t &  other) const
inline
Returns
true if each coefficients of *this and other are all exactly equal.
Warning
When using floating point scalar values you probably should rather use a fuzzy comparison such as isApprox()

Definition at line 123 of file force.hpp.

Derived_t se3Action ( const SE3 m) const
inline

Transform from A to B coordinates the Force represented by *this such that

\begin{equation*} \leftidx{^B}f = \leftidx{^B}X_A^* * \leftidx{^A}f \end{equation*}

.

Parameters
[in]mThe rigid transformation \( \leftidx{^B}m_A \) whose coordinates transform for forces is {^B}X_A^*
Returns
an expression of the force expressed in the new coordinates

Definition at line 183 of file force.hpp.

Derived_t se3ActionInverse ( const SE3 m) const
inline

Transform from B to A coordinates the Force represented by *this such that

\begin{equation*} \leftidx{^A}f = \leftidx{^A}X_B^* * \leftidx{^A}f \end{equation*}

.

Parameters
[in]mThe rigid transformation \( \leftidx{^B}m_A \) whose coordinates transform for forces is {^B}X_A^*
Returns
an expression of the force expressed in the new coordinates

Definition at line 196 of file force.hpp.

const Vector6& toVector ( ) const
inline

Return the force.

Returns
The 6D vector \( \phi \) such that

\begin{equation*} \leftidx{^A}\phi = \begin{bmatrix} \leftidx{^A}f \\ \leftidx{^A}\tau \end{bmatrix} \end{equation*}

Definition at line 102 of file force.hpp.

Referenced by ActuatorDCNonLinearMotorModel< Scalar_ >::calc(), and ForceBase< ForceTpl< _Scalar, _Options > >::toVector().

Vector6& toVector ( )
inline

Return the force.

Returns
The 6D vector \( \phi \) such that

\begin{equation*} \leftidx{^A}\phi = \begin{bmatrix} \leftidx{^A}f \\ \leftidx{^A}\tau \end{bmatrix} \end{equation*}

Definition at line 105 of file force.hpp.


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