Kindr
Kinematics and Dynamics for Robotics
kindr::EulerAnglesXyzDiff< PrimType_ > Class Template Reference

Implementation of time derivatives of Euler angles (X,Y',Z'' / roll,pitch,yaw) based on Eigen::Matrix<Scalar, 3, 1> More...

#include <EulerAnglesXyzDiff.hpp>

Inheritance diagram for kindr::EulerAnglesXyzDiff< PrimType_ >:
Inheritance graph

Public Types

typedef Base Implementation
 The implementation type. The implementation type is always an Eigen object. More...
 
typedef PrimType_ Scalar
 The primitive type. Float/Double. More...
 

Public Member Functions

 EulerAnglesXyzDiff ()
 Default constructor. More...
 
 EulerAnglesXyzDiff (Scalar roll, Scalar pitch, Scalar yaw)
 Constructor using three scalars. More...
 
 EulerAnglesXyzDiff (const Base &other)
 Constructor using Eigen::Matrix. More...
 
template<typename RotationDerived_ , typename OtherDerived_ >
 EulerAnglesXyzDiff (const RotationBase< RotationDerived_ > &rotation, const RotationDiffBase< OtherDerived_ > &other)
 Constructor using a time derivative with a different parameterization. More...
 
template<typename OtherDerived_ , typename RotationDerived_ >
OtherDerived_ cast (const RotationBase< RotationDerived_ > &rotation) const
 Cast to another representation of the time derivative of a rotation. More...
 
BasetoImplementation ()
 Cast to the implementation type. More...
 
const BasetoImplementation () const
 Cast to the implementation type. More...
 
Basevector ()
 
const Basevector () const
 
Scalar roll () const
 Reading access to time derivative of roll (X) angle. More...
 
Scalar pitch () const
 Reading access to time derivative of pitch (Y') angle. More...
 
Scalar yaw () const
 Reading access to time derivative of yaw (Z'') angle. More...
 
Scalarroll ()
 Writing access to time derivative of roll (X) angle. More...
 
Scalarpitch ()
 Writing access to time derivative of pitch (Y') angle. More...
 
Scalaryaw ()
 Writing access to time derivative of yaw (Z'') angle. More...
 
Scalar x () const
 Reading access to time derivative of roll (X) angle. More...
 
Scalar y () const
 Reading access to time derivative of pitch (Y') angle. More...
 
Scalar z () const
 Reading access to time derivative of yaw (Z'') angle. More...
 
Scalarx ()
 Writing access to time derivative of roll (X) angle. More...
 
Scalary ()
 Writing access to time derivative of pitch (Y') angle. More...
 
Scalarz ()
 Writing access to time derivative of yaw (Z'') angle. More...
 
EulerAnglesXyzDiffsetZero ()
 Sets all time derivatives to zero. More...
 
Eigen::Matrix< PrimType_, 3, 3 > getMappingFromLocalAngularVelocityToSecondDiff (const EulerAnglesXyz< PrimType_ > &rotation) const
 
Eigen::Matrix< PrimType_, 3, 3 > getMappingFromSecondDiffToLocalAngularVelocity (const EulerAnglesXyz< PrimType_ > &rotation) const
 
Eigen::Matrix< PrimType_, 3, 3 > getMappingFromGlobalAngularVelocityToSecondDiff (const EulerAnglesXyz< PrimType_ > &rotation) const
 
Eigen::Matrix< PrimType_, 3, 3 > getMappingFromSecondDiffToGlobalAngularVelocity (const EulerAnglesXyz< PrimType_ > &rotation) const
 
- Public Member Functions inherited from kindr::RotationDiffBase< EulerAnglesXyzDiff< PrimType_ > >
 RotationDiffBase ()=default
 Default constructor. More...
 
 RotationDiffBase (const EulerAnglesXyzDiff< PrimType_ > &)=delete
 Constructor from derived time derivative of a rotation. More...
 
 operator EulerAnglesXyzDiff< PrimType_ > & ()
 Gets the derived time derivative of a rotation. (only for advanced users) More...
 
 operator const EulerAnglesXyzDiff< PrimType_ > & () const
 Gets the derived time derivative of a rotation. (only for advanced users) More...
 
const EulerAnglesXyzDiff< PrimType_ > & derived () const
 Gets the derived time derivative of a rotation. (only for advanced users) More...
 
EulerAnglesXyzDiff< PrimType_ > & setZero ()
 Sets the time derivative of a rotation to zero. More...
 
EulerAnglesXyzDiff< PrimType_ > operator+ (const RotationDiffBase< OtherDerived_ > &other) const
 Addition of two time derivatives. More...
 
EulerAnglesXyzDiff< PrimType_ > operator- (const RotationDiffBase< OtherDerived_ > &other) const
 Subtraction of two time derivatives. More...
 
EulerAnglesXyzDiff< PrimType_ > & operator+= (const RotationDiffBase< OtherDerived_ > &other)
 Addition and assignment. More...
 
EulerAnglesXyzDiff< PrimType_ > & operator-= (const RotationDiffBase< OtherDerived_ > &other)
 Subtraction and assignment. More...
 

Private Types

typedef Eigen::Matrix< PrimType_, 3, 1 > Base
 The base type. More...
 

Private Attributes

Base xyzDiff_
 data container [roll; pitch; yaw] More...
 

Friends

std::ostream & operator<< (std::ostream &out, const EulerAnglesXyzDiff &diff)
 Used for printing the object with std::cout. More...
 

Detailed Description

template<typename PrimType_>
class kindr::EulerAnglesXyzDiff< PrimType_ >

Implementation of time derivatives of Euler angles (X,Y',Z'' / roll,pitch,yaw) based on Eigen::Matrix<Scalar, 3, 1>

The following two typedefs are provided for convenience:

  • EulerAnglesXyzDiffAD for primitive type double
  • EulerAnglesXyzDiffAF for primitive type float
    Template Parameters
    PrimType_the primitive type of the data (double or float)

Definition at line 51 of file EulerAnglesXyzDiff.hpp.

Member Typedef Documentation

◆ Base

template<typename PrimType_ >
typedef Eigen::Matrix<PrimType_, 3, 1> kindr::EulerAnglesXyzDiff< PrimType_ >::Base
private

The base type.

Definition at line 55 of file EulerAnglesXyzDiff.hpp.

◆ Implementation

template<typename PrimType_ >
typedef Base kindr::EulerAnglesXyzDiff< PrimType_ >::Implementation

The implementation type. The implementation type is always an Eigen object.

Definition at line 64 of file EulerAnglesXyzDiff.hpp.

◆ Scalar

template<typename PrimType_ >
typedef PrimType_ kindr::EulerAnglesXyzDiff< PrimType_ >::Scalar

The primitive type. Float/Double.

Definition at line 68 of file EulerAnglesXyzDiff.hpp.

Constructor & Destructor Documentation

◆ EulerAnglesXyzDiff() [1/4]

template<typename PrimType_ >
kindr::EulerAnglesXyzDiff< PrimType_ >::EulerAnglesXyzDiff ( )
inline

Default constructor.

Definition at line 72 of file EulerAnglesXyzDiff.hpp.

◆ EulerAnglesXyzDiff() [2/4]

template<typename PrimType_ >
kindr::EulerAnglesXyzDiff< PrimType_ >::EulerAnglesXyzDiff ( Scalar  roll,
Scalar  pitch,
Scalar  yaw 
)
inline

Constructor using three scalars.

Parameters
rolltime derivative of first rotation angle around X axis
pitchtime derivative of second rotation angle around Y' axis
yawtime derivative of third rotation angle around Z'' axis

Definition at line 81 of file EulerAnglesXyzDiff.hpp.

◆ EulerAnglesXyzDiff() [3/4]

template<typename PrimType_ >
kindr::EulerAnglesXyzDiff< PrimType_ >::EulerAnglesXyzDiff ( const Base other)
inlineexplicit

Constructor using Eigen::Matrix.

Parameters
otherEigen::Matrix<PrimType_,3,1> [roll; pitch; yaw]

Definition at line 88 of file EulerAnglesXyzDiff.hpp.

◆ EulerAnglesXyzDiff() [4/4]

template<typename PrimType_ >
template<typename RotationDerived_ , typename OtherDerived_ >
kindr::EulerAnglesXyzDiff< PrimType_ >::EulerAnglesXyzDiff ( const RotationBase< RotationDerived_ > &  rotation,
const RotationDiffBase< OtherDerived_ > &  other 
)
inlineexplicit

Constructor using a time derivative with a different parameterization.

Parameters
rotationrotation
otherother time derivative

Definition at line 99 of file EulerAnglesXyzDiff.hpp.

Member Function Documentation

◆ cast()

template<typename PrimType_ >
template<typename OtherDerived_ , typename RotationDerived_ >
OtherDerived_ kindr::EulerAnglesXyzDiff< PrimType_ >::cast ( const RotationBase< RotationDerived_ > &  rotation) const
inline

Cast to another representation of the time derivative of a rotation.

Parameters
otherother rotation
Returns
reference

Definition at line 108 of file EulerAnglesXyzDiff.hpp.

◆ getMappingFromGlobalAngularVelocityToSecondDiff()

template<typename PrimType_ >
Eigen::Matrix<PrimType_, 3, 3> kindr::EulerAnglesXyzDiff< PrimType_ >::getMappingFromGlobalAngularVelocityToSecondDiff ( const EulerAnglesXyz< PrimType_ > &  rotation) const
inline

Definition at line 283 of file EulerAnglesXyzDiff.hpp.

◆ getMappingFromLocalAngularVelocityToSecondDiff()

template<typename PrimType_ >
Eigen::Matrix<PrimType_, 3, 3> kindr::EulerAnglesXyzDiff< PrimType_ >::getMappingFromLocalAngularVelocityToSecondDiff ( const EulerAnglesXyz< PrimType_ > &  rotation) const
inline

Definition at line 233 of file EulerAnglesXyzDiff.hpp.

◆ getMappingFromSecondDiffToGlobalAngularVelocity()

template<typename PrimType_ >
Eigen::Matrix<PrimType_, 3, 3> kindr::EulerAnglesXyzDiff< PrimType_ >::getMappingFromSecondDiffToGlobalAngularVelocity ( const EulerAnglesXyz< PrimType_ > &  rotation) const
inline

Definition at line 311 of file EulerAnglesXyzDiff.hpp.

◆ getMappingFromSecondDiffToLocalAngularVelocity()

template<typename PrimType_ >
Eigen::Matrix<PrimType_, 3, 3> kindr::EulerAnglesXyzDiff< PrimType_ >::getMappingFromSecondDiffToLocalAngularVelocity ( const EulerAnglesXyz< PrimType_ > &  rotation) const
inline

Definition at line 261 of file EulerAnglesXyzDiff.hpp.

◆ pitch() [1/2]

template<typename PrimType_ >
Scalar kindr::EulerAnglesXyzDiff< PrimType_ >::pitch ( ) const
inline

Reading access to time derivative of pitch (Y') angle.

Returns
pitch angle (scalar) with reading access

Definition at line 146 of file EulerAnglesXyzDiff.hpp.

◆ pitch() [2/2]

template<typename PrimType_ >
Scalar& kindr::EulerAnglesXyzDiff< PrimType_ >::pitch ( )
inline

Writing access to time derivative of pitch (Y') angle.

Returns
pitch angle (scalar) with writing access

Definition at line 167 of file EulerAnglesXyzDiff.hpp.

◆ roll() [1/2]

template<typename PrimType_ >
Scalar kindr::EulerAnglesXyzDiff< PrimType_ >::roll ( ) const
inline

Reading access to time derivative of roll (X) angle.

Returns
roll angle (scalar) with reading access

Definition at line 139 of file EulerAnglesXyzDiff.hpp.

◆ roll() [2/2]

template<typename PrimType_ >
Scalar& kindr::EulerAnglesXyzDiff< PrimType_ >::roll ( )
inline

Writing access to time derivative of roll (X) angle.

Returns
roll angle (scalar) with writing access

Definition at line 160 of file EulerAnglesXyzDiff.hpp.

◆ setZero()

template<typename PrimType_ >
EulerAnglesXyzDiff& kindr::EulerAnglesXyzDiff< PrimType_ >::setZero ( )
inline

Sets all time derivatives to zero.

Returns
reference

Definition at line 223 of file EulerAnglesXyzDiff.hpp.

◆ toImplementation() [1/2]

template<typename PrimType_ >
Base& kindr::EulerAnglesXyzDiff< PrimType_ >::toImplementation ( )
inline

Cast to the implementation type.

Returns
the implementation for direct manipulation (recommended only for advanced users)

Definition at line 116 of file EulerAnglesXyzDiff.hpp.

◆ toImplementation() [2/2]

template<typename PrimType_ >
const Base& kindr::EulerAnglesXyzDiff< PrimType_ >::toImplementation ( ) const
inline

Cast to the implementation type.

Returns
the implementation for direct manipulation (recommended only for advanced users)

Definition at line 123 of file EulerAnglesXyzDiff.hpp.

◆ vector() [1/2]

template<typename PrimType_ >
Base& kindr::EulerAnglesXyzDiff< PrimType_ >::vector ( )
inline

Definition at line 127 of file EulerAnglesXyzDiff.hpp.

◆ vector() [2/2]

template<typename PrimType_ >
const Base& kindr::EulerAnglesXyzDiff< PrimType_ >::vector ( ) const
inline

Definition at line 131 of file EulerAnglesXyzDiff.hpp.

◆ x() [1/2]

template<typename PrimType_ >
Scalar kindr::EulerAnglesXyzDiff< PrimType_ >::x ( ) const
inline

Reading access to time derivative of roll (X) angle.

Returns
roll angle (scalar) with reading access

Definition at line 181 of file EulerAnglesXyzDiff.hpp.

◆ x() [2/2]

template<typename PrimType_ >
Scalar& kindr::EulerAnglesXyzDiff< PrimType_ >::x ( )
inline

Writing access to time derivative of roll (X) angle.

Returns
roll angle (scalar) with writing access

Definition at line 202 of file EulerAnglesXyzDiff.hpp.

◆ y() [1/2]

template<typename PrimType_ >
Scalar kindr::EulerAnglesXyzDiff< PrimType_ >::y ( ) const
inline

Reading access to time derivative of pitch (Y') angle.

Returns
pitch angle (scalar) with reading access

Definition at line 188 of file EulerAnglesXyzDiff.hpp.

◆ y() [2/2]

template<typename PrimType_ >
Scalar& kindr::EulerAnglesXyzDiff< PrimType_ >::y ( )
inline

Writing access to time derivative of pitch (Y') angle.

Returns
pitch angle (scalar) with writing access

Definition at line 209 of file EulerAnglesXyzDiff.hpp.

◆ yaw() [1/2]

template<typename PrimType_ >
Scalar kindr::EulerAnglesXyzDiff< PrimType_ >::yaw ( ) const
inline

Reading access to time derivative of yaw (Z'') angle.

Returns
yaw angle (scalar) with reading access

Definition at line 153 of file EulerAnglesXyzDiff.hpp.

◆ yaw() [2/2]

template<typename PrimType_ >
Scalar& kindr::EulerAnglesXyzDiff< PrimType_ >::yaw ( )
inline

Writing access to time derivative of yaw (Z'') angle.

Returns
yaw angle (scalar) with writing access

Definition at line 174 of file EulerAnglesXyzDiff.hpp.

◆ z() [1/2]

template<typename PrimType_ >
Scalar kindr::EulerAnglesXyzDiff< PrimType_ >::z ( ) const
inline

Reading access to time derivative of yaw (Z'') angle.

Returns
yaw angle (scalar) with reading access

Definition at line 195 of file EulerAnglesXyzDiff.hpp.

◆ z() [2/2]

template<typename PrimType_ >
Scalar& kindr::EulerAnglesXyzDiff< PrimType_ >::z ( )
inline

Writing access to time derivative of yaw (Z'') angle.

Returns
yaw angle (scalar) with writing access

Definition at line 216 of file EulerAnglesXyzDiff.hpp.

Friends And Related Function Documentation

◆ operator<<

template<typename PrimType_ >
std::ostream& operator<< ( std::ostream &  out,
const EulerAnglesXyzDiff< PrimType_ > &  diff 
)
friend

Used for printing the object with std::cout.

Prints: roll pitch yaw

Returns
std::stream object

Definition at line 338 of file EulerAnglesXyzDiff.hpp.

Member Data Documentation

◆ xyzDiff_

template<typename PrimType_ >
Base kindr::EulerAnglesXyzDiff< PrimType_ >::xyzDiff_
private

data container [roll; pitch; yaw]

Definition at line 59 of file EulerAnglesXyzDiff.hpp.


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