Cheetah Software  1.0
VectorNavOrientationEstimator< T > Class Template Reference

#include <OrientationEstimator.h>

+ Inheritance diagram for VectorNavOrientationEstimator< T >:
+ Collaboration diagram for VectorNavOrientationEstimator< T >:

Public Member Functions

virtual void run ()
 
virtual void setup ()
 
- Public Member Functions inherited from GenericEstimator< T >
void setData (StateEstimatorData< T > data)
 
virtual ~GenericEstimator ()=default
 

Additional Inherited Members

- Public Attributes inherited from GenericEstimator< T >
StateEstimatorData< T > _stateEstimatorData
 

Detailed Description

template<typename T>
class VectorNavOrientationEstimator< T >

Definition at line 25 of file OrientationEstimator.h.

Member Function Documentation

template<typename T >
void VectorNavOrientationEstimator< T >::run ( )
virtual

Implements GenericEstimator< T >.

Definition at line 36 of file OrientationEstimator.cpp.

References ori::quaternionToRotationMatrix(), and ori::quatToRPY().

36  {
37  this->_stateEstimatorData.result->orientation[0] =
38  this->_stateEstimatorData.vectorNavData->quat[3];
39  this->_stateEstimatorData.result->orientation[1] =
40  this->_stateEstimatorData.vectorNavData->quat[0];
41  this->_stateEstimatorData.result->orientation[2] =
42  this->_stateEstimatorData.vectorNavData->quat[1];
43  this->_stateEstimatorData.result->orientation[3] =
44  this->_stateEstimatorData.vectorNavData->quat[2];
46  this->_stateEstimatorData.result->orientation);
47  this->_stateEstimatorData.result->omegaBody =
48  this->_stateEstimatorData.vectorNavData->gyro.template cast<T>();
49  this->_stateEstimatorData.result->omegaWorld =
50  this->_stateEstimatorData.result->rBody.transpose() *
51  this->_stateEstimatorData.result->omegaBody;
52  this->_stateEstimatorData.result->rpy =
53  ori::quatToRPY(this->_stateEstimatorData.result->orientation);
54  this->_stateEstimatorData.result->aBody =
55  this->_stateEstimatorData.vectorNavData->accelerometer.template cast<T>();
56  this->_stateEstimatorData.result->aWorld =
57  this->_stateEstimatorData.result->rBody.transpose() *
58  this->_stateEstimatorData.result->aBody;
59 }
Vec3< typename T::Scalar > quatToRPY(const Eigen::MatrixBase< T > &q)
Mat3< typename T::Scalar > quaternionToRotationMatrix(const Eigen::MatrixBase< T > &q)
StateEstimatorData< T > _stateEstimatorData

+ Here is the call graph for this function:

template<typename T >
virtual void VectorNavOrientationEstimator< T >::setup ( )
inlinevirtual

Implements GenericEstimator< T >.

Definition at line 28 of file OrientationEstimator.h.

28 {}

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