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

Time derivative of a rotation quaternion. More...

#include <RotationDiff.hpp>

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

Public Types

typedef Base::Implementation Implementation
 The implementation type. The implementation type is always an Eigen object. More...
 
typedef PrimType_ Scalar
 The primitive type. Float/Double. More...
 
typedef Eigen::Matrix< PrimType_, 3, 1 > Imaginary
 the imaginary type, i.e., Eigen::Quaternion<> More...
 
typedef Eigen::Matrix< PrimType_, 4, 1 > Vector4
 quaternion as 4x1 matrix: [w; x; y; z] More...
 

Public Member Functions

 RotationQuaternionDiff ()
 Default constructor sets all derivatives to zero. More...
 
 RotationQuaternionDiff (const Base &other)
 
 RotationQuaternionDiff (Scalar w, Scalar x, Scalar y, Scalar z)
 Constructor using four scalars. More...
 
 RotationQuaternionDiff (const Vector4 &vec)
 
 RotationQuaternionDiff (const Scalar &real, const Imaginary &imag)
 
template<typename RotationDerived_ , typename OtherDerived_ >
 RotationQuaternionDiff (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...
 
ImplementationtoImplementation ()
 Cast to the implementation type. More...
 
const ImplementationtoImplementation () const
 Cast to the implementation type. More...
 
BasetoQuaternion ()
 Cast to the base type. More...
 
const BasetoQuaternion () const
 Cast to the base type. More...
 
RotationQuaternionDiffsetZero ()
 Sets all time derivatives to zero. More...
 
- Public Member Functions inherited from kindr::RotationDiffBase< RotationQuaternionDiff< PrimType_ > >
 RotationDiffBase ()=default
 Default constructor. More...
 
 RotationDiffBase (const RotationQuaternionDiff< PrimType_ > &)=delete
 Constructor from derived time derivative of a rotation. More...
 
 operator RotationQuaternionDiff< PrimType_ > & ()
 Gets the derived time derivative of a rotation. (only for advanced users) More...
 
 operator const RotationQuaternionDiff< PrimType_ > & () const
 Gets the derived time derivative of a rotation. (only for advanced users) More...
 
const RotationQuaternionDiff< PrimType_ > & derived () const
 Gets the derived time derivative of a rotation. (only for advanced users) More...
 
RotationQuaternionDiff< PrimType_ > & setZero ()
 Sets the time derivative of a rotation to zero. More...
 
RotationQuaternionDiff< PrimType_ > operator+ (const RotationDiffBase< OtherDerived_ > &other) const
 Addition of two time derivatives. More...
 
RotationQuaternionDiff< PrimType_ > operator- (const RotationDiffBase< OtherDerived_ > &other) const
 Subtraction of two time derivatives. More...
 
RotationQuaternionDiff< PrimType_ > & operator+= (const RotationDiffBase< OtherDerived_ > &other)
 Addition and assignment. More...
 
RotationQuaternionDiff< PrimType_ > & operator-= (const RotationDiffBase< OtherDerived_ > &other)
 Subtraction and assignment. More...
 

Private Types

typedef Quaternion< PrimType_ > Base
 The base type. More...
 
- Private Types inherited from kindr::Quaternion< PrimType_ >
typedef Base Implementation
 the implementation type, i.e., Eigen::Quaternion<> More...
 
typedef PrimType_ Scalar
 the scalar type, i.e., the type of the coefficients More...
 
typedef Eigen::Matrix< PrimType_, 3, 1 > Imaginary
 the imaginary type, i.e., Eigen::Quaternion<> More...
 
typedef Eigen::Matrix< PrimType_, 4, 1 > Vector4
 quaternion as 4x1 matrix: [w; x; y; z] More...
 

Friends

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

Additional Inherited Members

- Private Member Functions inherited from kindr::Quaternion< PrimType_ >
 Quaternion ()
 Default constructor creates a quaternion with all coefficients equal to zero. More...
 
 Quaternion (Scalar w, Scalar x, Scalar y, Scalar z)
 Constructor using four scalars. More...
 
 Quaternion (Scalar real, const Imaginary &imag)
 Constructor using real and imaginary part. More...
 
 Quaternion (const Vector4 &vector4)
 Constructor using Eigen::Matrix<PrimType_,4,1>. More...
 
 Quaternion (const Base &other)
 
Quaternion inverted () const
 
Quaternioninvert ()
 
Quaternion conjugated () const
 
Quaternionconjugate ()
 
Quaternionoperator= (const Quaternion< PrimType_ > &other)
 
Quaternionoperator= (const UnitQuaternion< PrimType_ > &other)
 
template<typename PrimTypeIn_ >
Quaternionoperator() (const Quaternion< PrimTypeIn_ > &other)
 
template<typename PrimTypeIn_ >
Quaternionoperator() (const UnitQuaternion< PrimTypeIn_ > &other)
 
ImplementationtoImplementation ()
 
const ImplementationtoImplementation () const
 
Scalar w () const
 
Scalar x () const
 
Scalar y () const
 
Scalar z () const
 
Scalarw ()
 
Scalarx ()
 
Scalary ()
 
Scalarz ()
 
Scalar real () const
 
Imaginary imaginary () const
 
Vector4 vector () const
 
Scalar norm () const
 
Quaternion normalized () const
 
Quaternionnormalize ()
 
QuaternionsetZero ()
 
UnitQuaternion< PrimType_ > toUnitQuaternion () const
 
Eigen::Matrix< PrimType_, 4, 4 > getQuaternionMatrix ()
 Returns the quaternion matrix Qleft: q*p = Qleft(q)*p This function can be used to get the derivative of the concatenation with respect to the right quaternion. More...
 
Eigen::Matrix< PrimType_, 4, 4 > getConjugateQuaternionMatrix ()
 Returns the quaternion matrix Qright: q*p = Qright(p)*q This function can be used to get the derivative of the concatenation with respect to the left quaternion. More...
 
- Private Member Functions inherited from kindr::QuaternionBase< Quaternion< PrimType_ > >
Quaternion< PrimType_ > & invert ()
 inverts the quaternion More...
 
Quaternion< PrimType_ > inverted () const
 gets the inverse of the quaternion More...
 
Quaternion< PrimType_ > & conjugate ()
 conjugates the quaternion More...
 
Quaternion< PrimType_ > conjugated () const
 gets the conjugate of the quaternion More...
 
 operator Quaternion< PrimType_ > & ()
 gets the derived quaternion (only for advanced users) More...
 
 operator const Quaternion< PrimType_ > & () const
 gets the derived quaternion (only for advanced users) More...
 
Quaternion< PrimType_ > & derived ()
 gets the derived quaternion (only for advanced users) More...
 
const Quaternion< PrimType_ > & derived () const
 gets the derived quaternion (only for advanced users) More...
 
Quaternion< PrimType_ > operator* (const QuaternionBase< OtherDerived_ > &other) const
 multiplies the quaternion with another quaternion More...
 
bool operator== (const QuaternionBase< OtherDerived_ > &other) const
 compares the quaternion with another quaternion More...
 

Detailed Description

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

Time derivative of a rotation quaternion.

This class implements the time derivative of a rotation quaternion using a Quaternion<Scalar> as data storage.

Template Parameters
PrimType_Primitive data type of the coordinates.

Definition at line 44 of file RotationDiff.hpp.

Member Typedef Documentation

template<typename PrimType_ >
typedef Quaternion<PrimType_> kindr::RotationQuaternionDiff< PrimType_ >::Base
private

The base type.

Definition at line 55 of file RotationQuaternionDiff.hpp.

template<typename PrimType_ >
typedef Eigen::Matrix<PrimType_, 3, 1> kindr::RotationQuaternionDiff< PrimType_ >::Imaginary

the imaginary type, i.e., Eigen::Quaternion<>

Definition at line 69 of file RotationQuaternionDiff.hpp.

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

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

Definition at line 61 of file RotationQuaternionDiff.hpp.

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

The primitive type. Float/Double.

Definition at line 66 of file RotationQuaternionDiff.hpp.

template<typename PrimType_ >
typedef Eigen::Matrix<PrimType_,4,1> kindr::RotationQuaternionDiff< PrimType_ >::Vector4

quaternion as 4x1 matrix: [w; x; y; z]

Definition at line 72 of file RotationQuaternionDiff.hpp.

Constructor & Destructor Documentation

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

Default constructor sets all derivatives to zero.

Definition at line 77 of file RotationQuaternionDiff.hpp.

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

Definition at line 81 of file RotationQuaternionDiff.hpp.

template<typename PrimType_ >
kindr::RotationQuaternionDiff< PrimType_ >::RotationQuaternionDiff ( Scalar  w,
Scalar  x,
Scalar  y,
Scalar  z 
)
inline

Constructor using four scalars.

Parameters
wfirst entry of the derivative of the quaternion
xsecond entry of the derivative of the quaternion
ythird entry of the derivative of the quaternion
zfourth entry of the derivative of the quaternion

Definition at line 91 of file RotationQuaternionDiff.hpp.

template<typename PrimType_ >
kindr::RotationQuaternionDiff< PrimType_ >::RotationQuaternionDiff ( const Vector4 vec)
inline

Definition at line 95 of file RotationQuaternionDiff.hpp.

template<typename PrimType_ >
kindr::RotationQuaternionDiff< PrimType_ >::RotationQuaternionDiff ( const Scalar real,
const Imaginary imag 
)
inline

Definition at line 99 of file RotationQuaternionDiff.hpp.

template<typename PrimType_ >
template<typename RotationDerived_ , typename OtherDerived_ >
kindr::RotationQuaternionDiff< PrimType_ >::RotationQuaternionDiff ( 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 109 of file RotationQuaternionDiff.hpp.

Member Function Documentation

template<typename PrimType_ >
template<typename OtherDerived_ , typename RotationDerived_ >
OtherDerived_ kindr::RotationQuaternionDiff< 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 118 of file RotationQuaternionDiff.hpp.

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

Sets all time derivatives to zero.

Returns
reference

Definition at line 165 of file RotationQuaternionDiff.hpp.

template<typename PrimType_ >
Implementation& kindr::RotationQuaternionDiff< PrimType_ >::toImplementation ( )
inline

Cast to the implementation type.

Returns
the implementation (recommended only for advanced users)

Definition at line 126 of file RotationQuaternionDiff.hpp.

template<typename PrimType_ >
const Implementation& kindr::RotationQuaternionDiff< PrimType_ >::toImplementation ( ) const
inline

Cast to the implementation type.

Returns
the implementation (recommended only for advanced users)

Definition at line 133 of file RotationQuaternionDiff.hpp.

template<typename PrimType_ >
Base& kindr::RotationQuaternionDiff< PrimType_ >::toQuaternion ( )
inline

Cast to the base type.

Returns
the quaternion that contains the derivative (recommended only for advanced users)

Definition at line 140 of file RotationQuaternionDiff.hpp.

template<typename PrimType_ >
const Base& kindr::RotationQuaternionDiff< PrimType_ >::toQuaternion ( ) const
inline

Cast to the base type.

Returns
the quaternion that contains the derivative (recommended only for advanced users)

Definition at line 148 of file RotationQuaternionDiff.hpp.

Friends And Related Function Documentation

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

Used for printing the object with std::cout.

Returns
std::stream object

Definition at line 173 of file RotationQuaternionDiff.hpp.


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