stateObservation::kine::LocalKinematics Struct Reference

Class facilitating the manipulation of the local kinematics of a frame within another and the associated operations. More...

#include <state-observation/tools/rigid-body-kinematics.hpp>

Inheritance diagram for stateObservation::kine::LocalKinematics:
Collaboration diagram for stateObservation::kine::LocalKinematics:

Public Member Functions

 LocalKinematics ()
 
 LocalKinematics (const Vector &v, Flags::Byte flags)
 
 LocalKinematics (const LocalKinematics &multiplier1, const LocalKinematics &multiplier2)
 constructor of a LocalKinematics object resulting from the composition of two others. More...
 
 LocalKinematics (const CheckedVector3 &position, const CheckedVector3 &linVel, const CheckedVector3 &linAcc, const Orientation &orientation, const CheckedVector3 &angVel, const CheckedVector3 &angAcc)
 constructor of a Kinematics object given each variable independently. More...
 
 LocalKinematics (const Kinematics &kin)
 constructor of a LocalKinematics object given its equivalent in the global frame. More...
 
LocalKinematicsoperator= (const Kinematics &kine)
 fills the LocalKinematics object given its equivalent in the global frame. More...
 
template<typename t = Quaternion>
LocalKinematicssetZero (Flags::Byte=Flags::all)
 
const LocalKinematicsintegrate (double dt)
 integrates the current local kinematics over the timestep dt. More...
 
const LocalKinematicsupdate (const LocalKinematics &newValue, double dt, Flags::Byte=Flags::all)
 updates the current local kinematics (k) with the new ones (k+1). More...
 
LocalKinematics getInverse () const
 returns the inverse of the current local kinematics. More...
 
LocalKinematics operator* (const LocalKinematics &) const
 composition of transformation More...
 
LocalKinematicssetToProductNoAlias (const LocalKinematics &operand1, const LocalKinematics &operand2)
 computes the composition of two LocalKinematics object. More...
 
LocalKinematicssetToDiffNoAlias (const LocalKinematics &multiplier1, const LocalKinematics &multiplier2)
 
LocalKinematicssetToDiffNoAliasLinPart (const LocalKinematics &multiplier1, const LocalKinematics &multiplier2)
 Linear part of the setToDiffNoAlias(const LocalKinematics &, const LocalKinematics &) function. More...
 
LocalKinematicssetToDiffNoAliasAngPart (const LocalKinematics &multiplier1, const LocalKinematics &multiplier2)
 Angular part of the setToDiffNoAlias(const LocalKinematics &, const LocalKinematics &) function. More...
 
- Public Member Functions inherited from stateObservation::kine::internal::KinematicsInternal< LocalKinematics >
 KinematicsInternal ()
 
 KinematicsInternal (const CheckedVector3 &position, const CheckedVector3 &linVel, const CheckedVector3 &linAcc, const Orientation &orientation, const CheckedVector3 &angVel, const CheckedVector3 &angAcc)
 constructor of a Kinematics object given each variable independently. More...
 
void reset ()
 
LocalKinematicsfromVector (const Vector &v, typename Flags::Byte=Flags::all)
 
LocalKinematicssetZero (typename Flags::Byte=Flags::all)
 
Vector toVector (typename Flags::Byte) const
 
Vector toVector () const
 

Protected Attributes

Vector3 tempVec_
 
Vector3 tempVec_2
 
Vector3 tempVec_3
 
Vector3 tempVec_4
 
Vector3 tempVec_5
 

Additional Inherited Members

- Static Public Member Functions inherited from stateObservation::kine::internal::KinematicsInternal< LocalKinematics >
static LocalKinematics zeroKinematics (typename Flags::Byte=Flags::all)
 returns an object corresponding to zero kinematics on the desired variables. More...
 
- Public Attributes inherited from stateObservation::kine::internal::KinematicsInternal< LocalKinematics >
CheckedVector3 position
 
Orientation orientation
 
CheckedVector3 linVel
 
CheckedVector3 angVel
 
CheckedVector3 linAcc
 
CheckedVector3 angAcc
 

Detailed Description

Class facilitating the manipulation of the local kinematics of a frame within another and the associated operations.

The Kinematics object contains the position, the orientation, the velocities and the accelerations of a frame 1 within another frame 2. The object Kinematics is the expression of these kinematics in the global frame 2, while the LocalKinematics object is their expression in the local frame 1.

Constructor & Destructor Documentation

◆ LocalKinematics() [1/5]

stateObservation::kine::LocalKinematics::LocalKinematics ( )
inline

◆ LocalKinematics() [2/5]

stateObservation::kine::LocalKinematics::LocalKinematics ( const Vector v,
Flags::Byte  flags 
)
inline

Constructor from a vector the flags show which parts of the kinematics to be loaded from the vector the order of the vector is position orientation (quaternion) linevel angvel linAcc angAcc use the flags to define the structure of the vector

◆ LocalKinematics() [3/5]

stateObservation::kine::LocalKinematics::LocalKinematics ( const LocalKinematics multiplier1,
const LocalKinematics multiplier2 
)
inline

constructor of a LocalKinematics object resulting from the composition of two others.

Parameters
multiplier1the first LocalKinematics object used for the composition
multiplier2the second LocalKinematics object used for the composition

◆ LocalKinematics() [4/5]

stateObservation::kine::LocalKinematics::LocalKinematics ( const CheckedVector3 position,
const CheckedVector3 linVel,
const CheckedVector3 linAcc,
const Orientation orientation,
const CheckedVector3 angVel,
const CheckedVector3 angAcc 
)

constructor of a Kinematics object given each variable independently.

Parameters
positionthe position composing the kinematics
linVelthe linear velocity composing the kinematics
linAccthe linear acceleration composing the kinematics
orientationthe orientation composing the kinematics
angVelthe angular velocity composing the kinematics
angAccthe angular acceleration composing the kinematics

◆ LocalKinematics() [5/5]

stateObservation::kine::LocalKinematics::LocalKinematics ( const Kinematics kin)
inlineexplicit

constructor of a LocalKinematics object given its equivalent in the global frame.

performs the conversion from the global to the local expression of the kinematics.

Parameters
locKthe global kinematics to convert

Member Function Documentation

◆ getInverse()

LocalKinematics stateObservation::kine::LocalKinematics::getInverse ( ) const
inline

returns the inverse of the current local kinematics.

if the current object represents the local kinematics of a frame 1 in a frame 2, will return the local kinematics of the frame 2 in 1.

Returns
LocalKinematics

◆ integrate()

const LocalKinematics& stateObservation::kine::LocalKinematics::integrate ( double  dt)
inline

integrates the current local kinematics over the timestep dt.

can be used to predict the future local kinematics from the current ones.

Parameters
dtthe timestep used for the integration
Returns
const LocalKinematics &

◆ operator*()

LocalKinematics stateObservation::kine::LocalKinematics::operator* ( const LocalKinematics ) const
inline

composition of transformation

◆ operator=()

LocalKinematics& stateObservation::kine::LocalKinematics::operator= ( const Kinematics kine)
inline

fills the LocalKinematics object given its equivalent in the global frame.

performs the conversion from the global to the local expression of the kinematics.

Parameters
locKthe global kinematics to convert

◆ setToDiffNoAlias()

LocalKinematics& stateObservation::kine::LocalKinematics::setToDiffNoAlias ( const LocalKinematics multiplier1,
const LocalKinematics multiplier2 
)
inline

Allows to compute the difference between two LocalKinematics objects. Has the same effect that calling setToProductNoAlias(operand1, operand2.getInverse()) but is computationally faster

◆ setToDiffNoAliasAngPart()

LocalKinematics& stateObservation::kine::LocalKinematics::setToDiffNoAliasAngPart ( const LocalKinematics multiplier1,
const LocalKinematics multiplier2 
)
inline

◆ setToDiffNoAliasLinPart()

LocalKinematics& stateObservation::kine::LocalKinematics::setToDiffNoAliasLinPart ( const LocalKinematics multiplier1,
const LocalKinematics multiplier2 
)
inline

◆ setToProductNoAlias()

LocalKinematics& stateObservation::kine::LocalKinematics::setToProductNoAlias ( const LocalKinematics operand1,
const LocalKinematics operand2 
)
inline

computes the composition of two LocalKinematics object.

Parameters
operand1the first LocalKinematics object used in the composition
operand2the second LocalKinematics object used in the composition
Returns
LocalKinematics

◆ setZero()

template<typename t = Quaternion>
LocalKinematics& stateObservation::kine::LocalKinematics::setZero ( Flags::Byte  = Flags::all)

initializes at zero all the flagged fields the typename allows to set if the prefered type for rotation is a Matrix3 or a Quaternion (Quaternion by default)

◆ update()

const LocalKinematics& stateObservation::kine::LocalKinematics::update ( const LocalKinematics newValue,
double  dt,
Flags::Byte  = Flags::all 
)
inline

updates the current local kinematics (k) with the new ones (k+1).

flags allow to chose what variables must be contained in the new local kinematics. If a variable is not given in the updated LocalKinematics object, it computed using either integration or finite differences depending on the available information.

Parameters
newValuethe new values of the local kinematics
dtthe time ellapsed between the current kinematics and the new ones.
Flagsthe flags indicating which variables are desired in the updated local kinematics.
Returns
const LocalKinematics &

Member Data Documentation

◆ tempVec_

Vector3 stateObservation::kine::LocalKinematics::tempVec_
protected

◆ tempVec_2

Vector3 stateObservation::kine::LocalKinematics::tempVec_2
protected

◆ tempVec_3

Vector3 stateObservation::kine::LocalKinematics::tempVec_3
protected

◆ tempVec_4

Vector3 stateObservation::kine::LocalKinematics::tempVec_4
protected

◆ tempVec_5

Vector3 stateObservation::kine::LocalKinematics::tempVec_5
protected

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