stateObservation::TiltEstimator Class Reference

Description is pending. More...

#include <state-observation/observer/tilt-estimator.hpp>

Inheritance diagram for stateObservation::TiltEstimator:
Collaboration diagram for stateObservation::TiltEstimator:

Public Member Functions

 TiltEstimator (double alpha, double beta, double gamma)
 
void initEstimator (Vector3 x1=Vector3::Zero(), Vector3 x2_prime=Vector3::UnitZ(), Vector3 x2=Vector3::UnitZ())
 initializes the state vector. More...
 
void setAlpha (const double alpha)
 set the gain of x1_hat variable More...
 
double getAlpha () const
 
void setBeta (const double beta)
 set the gain of x2prime_hat variable More...
 
double getBeta () const
 
void setGamma (const double gamma)
 set the gain of x2_hat variable More...
 
double getGamma () const
 
void setSamplingTime (const double dt)
 set the sampling time of the measurements More...
 
double getSamplingTime () const
 
void setMeasurement (const Vector3 &yv_k, const Vector3 &ya_k, const Vector3 &yg_k, TimeIndex k)
 sets ths measurement (accelero and gyro stacked in one vector) More...
 
- Public Member Functions inherited from stateObservation::ZeroDelayObserver
 ZeroDelayObserver (Index n, Index m, Index p=0)
 
 ZeroDelayObserver ()
 Default constructor (default values for n,m,p are zero) More...
 
virtual ~ZeroDelayObserver ()
 Destructor. More...
 
virtual void setState (const ObserverBase::StateVector &x_k, TimeIndex k)
 Set the value of the state vector at time index k. More...
 
virtual void setCurrentState (const ObserverBase::StateVector &x_k)
 Modify the value of the state vector at the current time. More...
 
virtual void clearStates ()
 Removes the state estimation. More...
 
bool stateIsSet () const
 Returns if the state is set or not. The state being set is mandatory to start the estimator. More...
 
virtual void setMeasurement (const ObserverBase::MeasureVector &y_k, TimeIndex k)
 
virtual void pushMeasurement (const ObserverBase::MeasureVector &y_k)
 Sets the measurement value at the next time index. More...
 
virtual void clearMeasurements ()
 Remove all the given values of the measurements. More...
 
virtual void setInput (const ObserverBase::InputVector &u_k, TimeIndex k)
 
virtual void pushInput (const ObserverBase::InputVector &u_k)
 Set the input value at the next time indext. More...
 
virtual void clearInputs ()
 
virtual void clearInputsAndMeasurements ()
 Remove all the given values of the inputs and measurements. More...
 
virtual TimeIndex estimateState ()
 run the observer until the measurement vector is depleted. More...
 
virtual ObserverBase::StateVector getEstimatedState (TimeIndex k)
 getestimated State More...
 
virtual ObserverBase::StateVector getCurrentEstimatedState () const
 Get the Current Estimated State. More...
 
virtual TimeIndex getCurrentTime () const
 Get the value of the time index of the current state estimation. More...
 
Vector getInput (TimeIndex k) const
 Get the value of the input of the time index k. More...
 
virtual TimeSize getInputsNumber () const
 Get the number of available inputs. More...
 
virtual TimeIndex getInputTime () const
 Get the time index of the last given input. More...
 
Vector getMeasurement (TimeIndex k) const
 Get the measurement of the time index k. More...
 
virtual TimeIndex getMeasurementTime () const
 Get the time index of the last given measurement. More...
 
virtual TimeSize getMeasurementsNumber () const
 Gets the number of regitered measurements. More...
 
virtual void setStateSize (Index n)
 changes the size of the state vector: resets the stored state vector More...
 
virtual void setMeasureSize (Index m)
 changes the size of the measurement vector: reset the stored measurement vectors More...
 
virtual void setInputSize (Index p)
 changes the size of the input vector: reset the stored input vectors More...
 
- Public Member Functions inherited from stateObservation::ObserverBase
 ObserverBase (Index n, Index m, Index p=0)
 
 ObserverBase ()
 default constructor (default values for n,m,p are zero) More...
 
virtual ~ObserverBase ()
 Destructor. More...
 
virtual Index getStateSize () const
 gets the size of the state vector More...
 
virtual Index getMeasureSize () const
 gets the size of the measurement vector More...
 
virtual Index getInputSize () const
 gets the size of the input vector More...
 
virtual void reset ()
 
virtual StateVector stateVectorConstant (double c) const
 
virtual StateVector stateVectorRandom () const
 Gives a vector of state vector size having random values. More...
 
virtual StateVector stateVectorZero () const
 Gives a vector of state vector size having zero values. More...
 
virtual bool checkStateVector (const StateVector &v) const
 Tells whether or not the vector has the dimensions of a state vector. More...
 
virtual MeasureVector measureVectorConstant (double c) const
 Gives a vector of measurement vector size having duplicated "c" value. More...
 
virtual MeasureVector measureVectorRandom () const
 Gives a vector of measurement vector size having random values. More...
 
virtual MeasureVector measureVectorZero () const
 Gives a vector of measurement vector size having zero values. More...
 
virtual bool checkMeasureVector (const MeasureVector &) const
 Tells whether or not the vector has the dimensions of a measurement vector. More...
 
virtual InputVector inputVectorConstant (double c) const
 Gives a vector of input vector size having duplicated "c" value. More...
 
virtual InputVector inputVectorRandom () const
 Gives a vector of input vector size having random values. More...
 
virtual InputVector inputVectorZero () const
 Gives a vector of input vector size having zero values. More...
 
virtual bool checkInputVector (const InputVector &) const
 Tells whether or not the vector has the dimensions of a input vector. More...
 

Protected Member Functions

StateVector oneStepEstimation_ ()
 The tilt estimator loop. More...
 

Protected Attributes

double alpha_
 The parameters of the estimator. More...
 
double beta_
 
double gamma_
 
double dt_
 Sampling time. More...
 
Vector3 x1_
 variables used for the computation More...
 
Vector3 x1_hat_
 
Vector3 x2_hat_prime_
 
Vector3 x2_hat_
 
Vector3 dx1_hat
 
- Protected Attributes inherited from stateObservation::ZeroDelayObserver
IndexedVector x_
 while the measurements and iputs are put in lists More...
 
IndexedVectorArray y_
 Container for the measurements. More...
 
IndexedVectorArray u_
 Container for the inputs. More...
 
- Protected Attributes inherited from stateObservation::ObserverBase
Index n_
 stateSize is the size of the state vector More...
 
Index m_
 measureSize is the size of measurements vector More...
 
Index p_
 inputSize is the size of the input vector More...
 

Additional Inherited Members

- Public Types inherited from stateObservation::ObserverBase
typedef Vector StateVector
 StateVector is the type of state vector. More...
 
typedef Vector MeasureVector
 MeasureVector is the type of measurements vector. More...
 
typedef Vector InputVector
 InputVector is the type of the input vector. More...
 

Detailed Description

Description is pending.

use getEstimatedState to obtain the state vector the tilt R.transpose()*e_z is constituted with the last three components of the state vector.

This estimator is based on the work detailed in: Benallegue, Mehdi, et al. "Lyapunov-stable orientation estimator for humanoid robots." IEEE Robotics and Automation Letters 5.4 (2020): 6371-637

Constructor & Destructor Documentation

◆ TiltEstimator()

stateObservation::TiltEstimator::TiltEstimator ( double  alpha,
double  beta,
double  gamma 
)

The constructor

  • alpha : parameter related to the convergence of the linear velocity of the IMU expressed in the control frame
  • beta : parameter related to the fast convergence of the tilt
  • gamma : parameter related to the orthogonality

Member Function Documentation

◆ getAlpha()

double stateObservation::TiltEstimator::getAlpha ( ) const
inline

◆ getBeta()

double stateObservation::TiltEstimator::getBeta ( ) const
inline

◆ getGamma()

double stateObservation::TiltEstimator::getGamma ( ) const
inline

◆ getSamplingTime()

double stateObservation::TiltEstimator::getSamplingTime ( ) const
inline

◆ initEstimator()

void stateObservation::TiltEstimator::initEstimator ( Vector3  x1 = Vector3::Zero(),
Vector3  x2_prime = Vector3::UnitZ(),
Vector3  x2 = Vector3::UnitZ() 
)

initializes the state vector.

Parameters
x1The initial local linear velocity of the IMU.
x2_pThe initial value of the intermediate estimate of the IMU's tilt.
x2The initial tilt of the IMU.

◆ oneStepEstimation_()

StateVector stateObservation::TiltEstimator::oneStepEstimation_ ( )
protectedvirtual

The tilt estimator loop.

Implements stateObservation::ZeroDelayObserver.

◆ setAlpha()

void stateObservation::TiltEstimator::setAlpha ( const double  alpha)
inline

set the gain of x1_hat variable

◆ setBeta()

void stateObservation::TiltEstimator::setBeta ( const double  beta)
inline

set the gain of x2prime_hat variable

◆ setGamma()

void stateObservation::TiltEstimator::setGamma ( const double  gamma)
inline

set the gain of x2_hat variable

◆ setMeasurement()

void stateObservation::TiltEstimator::setMeasurement ( const Vector3 yv_k,
const Vector3 ya_k,
const Vector3 yg_k,
TimeIndex  k 
)

sets ths measurement (accelero and gyro stacked in one vector)

◆ setSamplingTime()

void stateObservation::TiltEstimator::setSamplingTime ( const double  dt)
inline

set the sampling time of the measurements

Member Data Documentation

◆ alpha_

double stateObservation::TiltEstimator::alpha_
protected

The parameters of the estimator.

◆ beta_

double stateObservation::TiltEstimator::beta_
protected

◆ dt_

double stateObservation::TiltEstimator::dt_
protected

Sampling time.

◆ dx1_hat

Vector3 stateObservation::TiltEstimator::dx1_hat
protected

◆ gamma_

double stateObservation::TiltEstimator::gamma_
protected

◆ x1_

Vector3 stateObservation::TiltEstimator::x1_
protected

variables used for the computation

◆ x1_hat_

Vector3 stateObservation::TiltEstimator::x1_hat_
protected

◆ x2_hat_

Vector3 stateObservation::TiltEstimator::x2_hat_
protected

◆ x2_hat_prime_

Vector3 stateObservation::TiltEstimator::x2_hat_prime_
protected

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