13#ifndef FLEXBILITYESTMATOR_MODELBASEEKFFLEXIBILITYESTIMATOR_IMU_H
14#define FLEXBILITYESTMATOR_MODELBASEEKFFLEXIBILITYESTIMATOR_IMU_H
16#include <state-observation/api.h>
19#include <state-observation/flexibility-estimation/imu-elastic-local-frame-dynamical-system.hpp>
24namespace flexibilityEstimation
39 private boost::noncopyable
46 static const unsigned pendulum = IMUElasticLocalFrameDynamicalSystem::contactModel::pendulum;
58 unsigned getContactsNumber()
60 return functor_.getContactsNumber();
70 return functor_.computeAccelerations(getFlexibilityVector(), getInput());
73 void setContactModel(
unsigned nb);
90 virtual Vector getMomentaDotFromForces();
91 virtual Vector getMomentaDotFromKinematics();
92 virtual Vector getForcesAndMoments();
99 for(Index i = 0; i < ekf_.getStateSize(); ++i) Pvec(i) = P(i, i);
135 bool getWithForcesMeasurements();
137 virtual void setWithAbsolutePos(
bool);
139 void setWithUnmodeledForces(
bool b);
141 bool getWithUnmodeledForces()
143 return withUnmodeledForces_;
146 bool getWithAbsolutePos()
148 return withAbsolutePos_;
151 virtual void setWithComBias(
bool b);
153 virtual bool getWithComBias()
158 virtual void setUnmodeledForceVariance(
double d);
159 virtual void setUnmodeledForceProcessVariance(
double d);
166 virtual void setAbsolutePosVariance(
double d);
174 virtual void setKfe(
const Matrix3 & m);
175 virtual void setKfv(
const Matrix3 & m);
176 virtual void setKte(
const Matrix3 & m);
177 virtual void setKtv(
const Matrix3 & m);
179 virtual void setKfeRopes(
const Matrix3 & m);
180 virtual void setKfvRopes(
const Matrix3 & m);
181 virtual void setKteRopes(
const Matrix3 & m);
182 virtual void setKtvRopes(
const Matrix3 & m);
189 virtual Matrix getKfe()
const;
190 virtual Matrix getKfv()
const;
191 virtual Matrix getKte()
const;
192 virtual Matrix getKtv()
const;
196 virtual void resetStateCovarianceMatrix();
198 virtual void setRobotMass(
double m);
199 virtual double getRobotMass()
const
201 return functor_.getRobotMass();
204 void setTorquesLimit(
const Vector3 & v)
209 void setForcesLimit(
const Vector3 & v)
221 return limitTorques_;
224 void setLimitOn(
const bool & b)
229 virtual bool getLimitOn()
const
234 static Matrix getDefaultQ();
236 static Matrix6 getDefaultRIMU();
238 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
241 virtual void updateMeasurementCovarianceMatrix_();
243 IMUElasticLocalFrameDynamicalSystem functor_;
249 const Index stateSize_;
251 static const Index measurementSizeBase_ = 12;
253 static const Index inputSizeBase_ = IMUElasticLocalFrameDynamicalSystem::input::sizeBase;
259 double unmodeledForceVariance_;
261 double absPosVariance_;
265 bool withAbsolutePos_;
267 bool withUnmodeledForces_;
EKFFlexibilityEstimatorBase(Index stateSize, Index measurementSize, Index inputSize, const Vector &dx=Vector::Zero(0))
This class describes the dynamics of a robot's flexibility this dynamics with elastic forces to bring...
virtual ~ModelBaseEKFFlexEstimatorIMU()
Virtual destructor.
virtual void resetCovarianceMatrices()
Resets the covariance matrices to their original values.
virtual Index getStateSize() const
virtual Matrix4 getFlexibility()
Gets an estimation of the flexibility in the form of a homogeneous matrix.
void setOn(bool &b)
Enable or disable the estimation.
virtual void setFlexibilityGuess(const Matrix &x)
virtual Index getInputSize() const
virtual void setMeasurementNoiseCovariance(const Matrix &R)
Sets the measurements covariance matrice.
virtual Matrix getProcessNoiseCovariance() const
gets the covariance matrices for the process noises
virtual void setProcessNoiseCovariance(const Matrix &Q)
Sets the process covariance matrice.
virtual Matrix getMeasurementNoiseCovariance() const
gets the covariance matrices for the sensor noises
void setContactsNumber(unsigned i)
Sets the number of contacts can be changed online.
virtual Index getMeasurementSize() const
virtual void setWithForcesMeasurements(bool)
sets to whether or not the force mesurements are taken into account
virtual const Vector & getFlexibilityVector()
Gets an estimation of the flexibility in the form of a state vector \hat{x_{k+1}}.
virtual void setMeasurement(const Vector &y)
Sets the value of the next sensor measurement y_{k+1}.
virtual void setSamplingPeriod(double)
sets the sampling period
ModelBaseEKFFlexEstimatorIMU(double dt=0.005)
The constructor, it requires the value of the time discretization period.
virtual void setForceVariance(double d)
Declare the class of the flexibility estimation using the extended Kalman Filter.
Filtering of divergent component of motion (DCM) and estimation of a bias betweeen the DCM and the co...
Eigen::Matrix4d Matrix4
4x4 Scalar Matrix
Eigen::Vector3d Vector3
3D vector
Eigen::Matrix3d Matrix3
3x3 Scalar Matrix
Eigen::MatrixXd Matrix
Dynamic sized Matrix.
Eigen::Matrix< double, 6, 6 > Matrix6
6x6 Scalar Matrix
Eigen::VectorXd Vector
Dynamic sized scalar vector.