state-observation 1.7.0
General implementation of observers.
Loading...
Searching...
No Matches
stateObservation::kine::Orientation Class Reference
Collaboration diagram for stateObservation::kine::Orientation:
[legend]

Public Member Functions

 Orientation (bool initialize=true)
 Orientation (const Vector3 &v)
 this is the rotation vector and NOT Euler angles
 Orientation (const Quaternion &q)
 Orientation (const Matrix3 &m)
 Orientation (const AngleAxis &aa)
 Orientation (const Quaternion &q, const Matrix3 &m)
 Orientation (const double &roll, const double &pitch, const double &yaw)
 Orientation (const Orientation &multiplier1, const Orientation &multiplier2)
Orientationoperator= (const Vector3 &v)
Orientationoperator= (const Quaternion &q)
Orientationoperator= (const Matrix3 &m)
Orientationoperator= (const AngleAxis &aa)
OrientationsetValue (const Quaternion &q, const Matrix3 &m)
OrientationfromVector4 (const Vector4 &v)
OrientationsetRandom ()
template<typename t = Quaternion>
OrientationsetZeroRotation ()
const Matrix3toMatrix3 () const
 get a const reference on the matrix or the quaternion
const QuaterniontoQuaternion () const
 operator const Matrix3 & () const
 operator const Quaternion & () const
Vector4 toVector4 () const
Vector3 toRotationVector () const
Vector3 toRollPitchYaw () const
AngleAxis toAngleAxis () const
Orientation operator* (const Orientation &R2) const
const OrientationsetToProductNoAlias (const Orientation &R1, const Orientation &R2)
 Noalias versions of the operator*.
Orientation inverse () const
const Orientationintegrate (Vector3 dt_x_omega)
const OrientationintegrateRightSide (Vector3 dt_x_omega)
Vector3 differentiate (Orientation R_k1) const
 gives the log (rotation vector) of the "left-side" difference of orientation: log of R_k1*(*this).inverse().
Vector3 differentiateRightSide (Orientation R_k1) const
 gives the log (rotation vector) of the "right-side" difference of orientation: log of (*this).inverse() * R_k1.
Vector3 operator* (const Vector3 &v) const
 Rotate a vector.
bool isSet () const
 checks that the orientation has been assigned a value.
void reset ()
 resets the Orientation object.
bool isMatrixSet () const
 checks that the matrix representation of the orientation has been assigned a value.
bool isQuaternionSet () const
 checks that the quaternion representation of the orientation has been assigned a value.
void setMatrix (bool b=true)
void setQuaternion (bool b=true)
CheckedMatrix3 & getMatrixRefUnsafe ()
 no checks are performed for these functions, use with caution
CheckedQuaternion & getQuaternionRefUnsafe ()
 get a reference to the quaternion representation of the orientation without calling the check functions.
void synchronize ()
 synchronizes the representations (quaternion and rotation matrix)

Static Public Member Functions

static Orientation zeroRotation ()
 retruns a zero rotation
static Orientation randomRotation ()
 Returns a uniformly distributed random rotation.

Protected Member Functions

void check_ () const
const Matrix3quaternionToMatrix_ () const
const QuaternionmatrixToQuaternion_ () const

Protected Attributes

CheckedQuaternion q_
CheckedMatrix3 m_

Detailed Description

Definition at line 354 of file rigid-body-kinematics.hpp.

Constructor & Destructor Documentation

◆ Orientation()

stateObservation::kine::Orientation::Orientation ( bool initialize = true)
explicit

The parameter initialize should be set to true except when it is certain that the initial value will not be used And that the first operation would be to set its value

Member Function Documentation

◆ operator*()

Orientation stateObservation::kine::Orientation::operator* ( const Orientation & R2) const
inline

Multiply the rotation (orientation) by another rotation R2 the non const versions allow to use more optimized methods

◆ integrate()

const Orientation & stateObservation::kine::Orientation::integrate ( Vector3 dt_x_omega)
inline

uses the vector dt_x_omega as the increment of rotation expressed in the world frame. Which gives R_{k+1}=\exp(S(dtxomega))R_k. This function is also used to sum two Orientations expressed in the same frame at the same time k, even for the LocalKinematics (the integration of the orientation is different but not the sum)

◆ integrateRightSide()

const Orientation & stateObservation::kine::Orientation::integrateRightSide ( Vector3 dt_x_omega)
inline

use the vector dt_x_omega as the increment of rotation expressed in the local frame. Which gives R_{k+1}=R_k*exp(S(dtxomega))

◆ differentiate()

Vector3 stateObservation::kine::Orientation::differentiate ( Orientation R_k1) const
inline

gives the log (rotation vector) of the "left-side" difference of orientation: log of R_k1*(*this).inverse().

This function is also used to differentiate two Orientations expressed in the same frame at the same time k, even for the LocalKinematics (the integration of the orientation is different and therefore the associated differentiation also is, but the difference remains the same)

Parameters
R_k1the other orientation with which we compute the difference.
Returns
Vector3

◆ differentiateRightSide()

Vector3 stateObservation::kine::Orientation::differentiateRightSide ( Orientation R_k1) const
inline

gives the log (rotation vector) of the "right-side" difference of orientation: log of (*this).inverse() * R_k1.

This function is also used to differentiate two Orientations expressed in the same frame at the same time k, even for the LocalKinematics (the integration of the orientation is different and therefore the associated differentiation also is, but the difference remains the same)

Parameters
R_k1the other orientation with which we compute the difference.
Returns
Vector3

◆ isSet()

bool stateObservation::kine::Orientation::isSet ( ) const
inline

checks that the orientation has been assigned a value.

Returns
bool

◆ reset()

void stateObservation::kine::Orientation::reset ( )
inline

resets the Orientation object.

The orientation is then considered as outdated and cannot be used until it is assigned a value.

◆ isMatrixSet()

bool stateObservation::kine::Orientation::isMatrixSet ( ) const
inline

checks that the matrix representation of the orientation has been assigned a value.

Returns
bool

◆ isQuaternionSet()

bool stateObservation::kine::Orientation::isQuaternionSet ( ) const
inline

checks that the quaternion representation of the orientation has been assigned a value.

Returns
bool

◆ setMatrix()

void stateObservation::kine::Orientation::setMatrix ( bool b = true)
inline

switch the state of the Matrix or quaternion to set or not this can be used for forward initialization

◆ getMatrixRefUnsafe()

CheckedMatrix3 & stateObservation::kine::Orientation::getMatrixRefUnsafe ( )
inline

no checks are performed for these functions, use with caution

get a reference to the matrix representation of the orientation without calling the check functions.

Has to be used with care as this function doesn't check that the matrix has been assigned values.

Returns
CheckedMatrix3

◆ getQuaternionRefUnsafe()

CheckedQuaternion & stateObservation::kine::Orientation::getQuaternionRefUnsafe ( )
inline

get a reference to the quaternion representation of the orientation without calling the check functions.

Has to be used with care as this function doesn't check that the quaternion has been assigned values.

Returns
CheckedQuaternion

Member Data Documentation

◆ q_

CheckedQuaternion stateObservation::kine::Orientation::q_
mutableprotected

Definition at line 496 of file rigid-body-kinematics.hpp.

◆ m_

CheckedMatrix3 stateObservation::kine::Orientation::m_
mutableprotected

Definition at line 497 of file rigid-body-kinematics.hpp.


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