#include <state-observation/dynamics-estimators/zmp-tracking-gain-estimator.hpp>
Public Member Functions | |
| ZmpTrackingGainEstimator (double dt=defaultDt_, const Vector2 &zmpMeasureErrorStd=Vector2::Constant(defaultZmpMeasurementErrorStd), const Vector3 &gainDriftPerSecond=Vector3::Constant(defaultGainDriftSecond), const Vector2 &zmpProcessErrorStd=Vector2::Constant(defaultZmpProcessErrorStd), double minimumGain=defaultGainMinimum, const Vector2 &initZMP=Vector2::Zero(), const Vector3 &initGain=Vector3::Zero(), const Vector2 &initZMPUncertainty=Vector2::Constant(defaultZmpUncertainty), const Vector3 &initGainUncertainty=Vector3::Constant(defaultGainUncertainty)) | |
| Construct a new ZMP Gain Estimator object. More... | |
| void | resetWithMeasurements (const Vector2 &initZMP=Vector2::Zero(), const Vector3 &initGain=Vector3::Zero(), const Matrix2 &yaw=Matrix2::Identity(), const Vector2 &initZMPUncertainty=Vector2::Constant(defaultZmpUncertainty), const Vector3 &initGainUncertainty=Vector3::Constant(defaultGainUncertainty)) |
| Resets the estimator. More... | |
| void | resetWithMeasurements (const Vector2 &initZMP, const Vector3 &initGain, double yaw, const Vector2 &initZMPUncertainty=Vector2::Constant(defaultZmpUncertainty), const Vector3 &initGainUncertainty=Vector3::Constant(defaultGainUncertainty)) |
| Resets the estimator. More... | |
| void | resetWithMeasurements (const Vector2 &initZMP, const Vector3 &initGain, const Matrix3 &rotation, const Vector2 &initZMPUncertainty=Vector2::Constant(defaultZmpUncertainty), const Vector3 &initGainUncertainty=Vector3::Constant(defaultGainUncertainty)) |
| Resets the estimator with first measurements. More... | |
| ~ZmpTrackingGainEstimator () | |
| Destroy the Lipm Dcm Bias Estimator object. More... | |
| void | setSamplingTime (double dt) |
| Set the Sampling Time. More... | |
| void | setGain (const Vector3 &gain) |
| Set the Gain from a guess. More... | |
| void | setGain (const Vector3 &gain, const Vector3 &uncertainty) |
| Set the Gain from a guess. More... | |
| void | setGainDriftPerSecond (const Vector3 &) |
| Set the Gain Drift Per Second. More... | |
| void | setMinimumGain (const double &minGain) |
| Set the Gain Limit. More... | |
| void | setZMPProcesError (const Vector2 &) |
| Set the covariance of the zmp process linear dynamics error. More... | |
| void | setZmpMeasureErrorStd (const Vector2 &) |
| Set the Zmp Measurement Error Stamdard deviation. More... | |
| void | setInputs (const Vector2 &zmpErr, const Vector2 &zmp, const Matrix3 &orientation) |
| Set the Inputs of the estimator. More... | |
| void | setInputs (const Vector2 &zmpErr, const Vector2 &zmp, double yaw) |
| Set the Inputs of the estimator. More... | |
| void | setInputs (const Vector2 &zmpErr, const Vector2 &zmp, const Matrix2 &R=Matrix2::Identity()) |
| Set the Inputs of the estimator. More... | |
| void | update () |
| Runs the estimation. Needs to be called every timestep. More... | |
| Matrix2 | getEstimatedGain () const |
| Get the Unbiased DCM filtered by the estimator. More... | |
| Matrix2 | getEstimatedLocalGain () const |
| Get the estimated Bias expressed in the local frame of the robot. More... | |
| LinearKalmanFilter & | getFilter () |
| Get the Kalman Filter object This can be used to run specific Advanced Kalman filter related funcions. More... | |
| const LinearKalmanFilter & | getFilter () const |
| Get the Kalman Filter object This can be used to run specific Advanced Kalman filter related funcions. More... | |
Static Public Attributes | |
| constexpr static double | defaultGainDriftSecond = 0.002 |
| default expected drift of the bias every second More... | |
| constexpr static double | defaultZmpProcessErrorStd = 0.005 |
| default error in the process linear dynamics of the zmp (in meters) More... | |
| constexpr static double | defaultZmpMeasurementErrorStd = 0.005 |
| default error in the measurements of the zmp More... | |
| constexpr static double | defaultGainMinimum = .01 |
| constexpr static double | defaultZmpUncertainty = 0.005 |
| default valu for the initial ZMP uncertainty. It should be quite low since this is supposed to be measured More... | |
| constexpr static double | defaultGainUncertainty = 20 |
| default value for the uncertainty of the Gain More... | |
Protected Types | |
| typedef Eigen::Matrix< double, 2, 5 > | Matrix25 |
| typedef Eigen::Matrix< double, 2, 3 > | Matrix23 |
Protected Member Functions | |
| void | updateR_ () |
| void | updateQ_ () |
Static Protected Member Functions | |
| static Matrix2 | Vec2ToSqDiag_ (const Vector2 &v) |
| builds a diagonal out of the square valued of the Vec2 More... | |
| static Matrix3 | Vec3ToSqDiag_ (const Vector3 &v) |
| builds a diagonal out of the square valued of the Vec3 More... | |
Protected Attributes | |
| double | dt_ |
| double | minimumGain_ |
| Vector2 | zmpMeasureErrorstd_ |
| Vector3 | gainDriftPerSecondStd_ |
| Vector2 | zmpProcessErrorStd_ |
| Matrix2 | yaw_ |
| LinearKalmanFilter | filter_ |
| Matrix4 | A_ |
| Matrix25 | C_ |
| The B matrix is zero. More... | |
| Matrix2 | R_ |
| measurement noise More... | |
| Matrix5 | Q_ |
| process noise More... | |
| Matrix2 | previousOrientation_ |
|
protected |
|
protected |
| stateObservation::ZmpTrackingGainEstimator::ZmpTrackingGainEstimator | ( | double | dt = defaultDt_, |
| const Vector2 & | zmpMeasureErrorStd = Vector2::Constant(defaultZmpMeasurementErrorStd), |
||
| const Vector3 & | gainDriftPerSecond = Vector3::Constant(defaultGainDriftSecond), |
||
| const Vector2 & | zmpProcessErrorStd = Vector2::Constant(defaultZmpProcessErrorStd), |
||
| double | minimumGain = defaultGainMinimum, |
||
| const Vector2 & | initZMP = Vector2::Zero(), |
||
| const Vector3 & | initGain = Vector3::Zero(), |
||
| const Vector2 & | initZMPUncertainty = Vector2::Constant(defaultZmpUncertainty), |
||
| const Vector3 & | initGainUncertainty = Vector3::Constant(defaultGainUncertainty) |
||
| ) |
Construct a new ZMP Gain Estimator object.
| dt | the sampling time in seconds |
| zmpMeasureErrorStd | the standard deviation of the zmp estimation error (m) |
| gainDriftPerSecond | the standard deviation of the gain drift (1/s). The components of this vetor represent respectively the diagonal components then the nondiagonal one |
| zmpProcessErrorStd | the standard deviation of the process linear dynamics of the zmp (m) |
| minimumGain | minimum, the gain has to be a positive definite matrix with the smallest eigenvalue bigger than this value |
| initZMP | the initial value of the ZMP (m) |
| initGain | the initial value of the Gain (Vector3 :two diagonals first then the nondiagonal term) |
| biasLimit | the X and Y (expressed in local frame) largest accepted absolute values of the bias (zero means no limit) |
| initZMPUncertainty | the uncertainty in the ZMP initial value in meters |
| initGainUncertainty | the uncertainty in the Gain initial value in (1/s) |
|
inline |
Destroy the Lipm Dcm Bias Estimator object.
|
inline |
Get the Unbiased DCM filtered by the estimator.
@detailt This is the recommended output to take
the meaning is previousOrientation_ * getLocalGain() * previousOrientation_.transpose();
| Matrix2 stateObservation::ZmpTrackingGainEstimator::getEstimatedLocalGain | ( | ) | const |
Get the estimated Bias expressed in the local frame of the robot.
|
inline |
Get the Kalman Filter object This can be used to run specific Advanced Kalman filter related funcions.
|
inline |
Get the Kalman Filter object This can be used to run specific Advanced Kalman filter related funcions.
|
inline |
Resets the estimator with first measurements.
Use this when initializing with an available DCM (biased / or not) measurement
| initZMP | the initial value of the ZMP (m) |
| initGain | the initial value of the Gain (Vector3 :two diagonals first then the nondiagonal term) |
| rotation | the 3d orientation from which the initial yaw angle will be extracted using the angle agnostic approach. This orientation is from local to global. i.e. zmp_global == orientation * zmp_local |
| zmpMeasureErrorStd | the standard deviation of the zmp estimation error (m) |
| initZMPUncertainty | the uncertainty in the ZMP initial value in meters |
| initGainUncertainty | the uncertainty in the Gain initial value in (1/s) |
|
inline |
Resets the estimator.
| initZMP | the initial value of the ZMP (m) |
| initGain | the initial value of the Gain (Vector3 :two diagonals first then the nondiagonal term) |
| yaw | the yaw angle |
| zmpMeasureErrorStd | the standard deviation of the zmp estimation error (m) |
| initZMPUncertainty | the uncertainty in the ZMP initial value in meters |
| initGainUncertainty | the uncertainty in the Gain initial value in (1/s) |
| void stateObservation::ZmpTrackingGainEstimator::resetWithMeasurements | ( | const Vector2 & | initZMP = Vector2::Zero(), |
| const Vector3 & | initGain = Vector3::Zero(), |
||
| const Matrix2 & | yaw = Matrix2::Identity(), |
||
| const Vector2 & | initZMPUncertainty = Vector2::Constant(defaultZmpUncertainty), |
||
| const Vector3 & | initGainUncertainty = Vector3::Constant(defaultGainUncertainty) |
||
| ) |
Resets the estimator.
| initZMP | the initial value of the ZMP (m) |
| initGain | the initial value of the Gain (Vector3 :two diagonals first then the nondiagonal term) |
| yaw | the yaw expressed as a 2d matrix (a rotation in the X Y plane) |
| zmpMeasureErrorStd | the standard deviation of the zmp estimation error (m) |
| initZMPUncertainty | the uncertainty in the ZMP initial value in meters |
| initGainUncertainty | the uncertainty in the Gain initial value in (1/s) |
| void stateObservation::ZmpTrackingGainEstimator::setGain | ( | const Vector3 & | gain | ) |
Set the Gain from a guess.
| gain | guess in the world frame. The two first components are the diagonal ones and the last one is the non diagonal scalar |
| void stateObservation::ZmpTrackingGainEstimator::setGain | ( | const Vector3 & | gain, |
| const Vector3 & | uncertainty | ||
| ) |
Set the Gain from a guess.
| gain | guess in the world frame. The two first components are the diagonal ones and the last one is the non diagonal scalar |
| the | uncertainty you have in this guess in meters |
| void stateObservation::ZmpTrackingGainEstimator::setGainDriftPerSecond | ( | const Vector3 & | ) |
Set the Gain Drift Per Second.
| driftPerSecond | the expectation of the drift of the gain per second. The components of this vetor represent respectively the diagonal components then the nondiagonal one |
| void stateObservation::ZmpTrackingGainEstimator::setInputs | ( | const Vector2 & | zmpErr, |
| const Vector2 & | zmp, | ||
| const Matrix2 & | R = Matrix2::Identity() |
||
| ) |
Set the Inputs of the estimator.
| zmperr | measurement of the DCM in the world frame |
| zmp | mesaurement of the ZMP in the world frame |
| R | the 2x2 Matrix'representing the yaw angle i.e. bias_global == R * bias*local |
|
inline |
Set the Inputs of the estimator.
The yaw will be extracted from the orientation using the axis agnostic approach.
| zmperr | measurement of zmp error (zmp-zmp^{ref}) |
| zmp | mesaurement of the ZMP in the world frame |
| orientation | the 3d orientation from which the yaw will be extracted. This orientation is from local to global. i.e. bias_global == orientation * bias*local |
|
inline |
Set the Inputs of the estimator.
| zmperr | measurement of zmp error (zmp-zmp^{ref}) |
| zmp | mesaurement of the ZMP in the world frame |
| yaw | is the yaw angle to be used. This orientation is from local to global. i.e. bias_global == R * bias*local |
| void stateObservation::ZmpTrackingGainEstimator::setMinimumGain | ( | const double & | minGain | ) |
Set the Gain Limit.
| minGain | the minimal value of the gain |
| void stateObservation::ZmpTrackingGainEstimator::setSamplingTime | ( | double | dt | ) |
Set the Sampling Time.
| dt | sampling time |
| void stateObservation::ZmpTrackingGainEstimator::setZmpMeasureErrorStd | ( | const Vector2 & | ) |
Set the Zmp Measurement Error Stamdard deviation.
| void stateObservation::ZmpTrackingGainEstimator::setZMPProcesError | ( | const Vector2 & | ) |
Set the covariance of the zmp process linear dynamics error.
| processErrorStd | the standard deviation of the process dynamcis error |
| void stateObservation::ZmpTrackingGainEstimator::update | ( | ) |
Runs the estimation. Needs to be called every timestep.
|
inlineprotected |
|
inlineprotected |
|
inlinestaticprotected |
builds a diagonal out of the square valued of the Vec2
|
inlinestaticprotected |
builds a diagonal out of the square valued of the Vec3
|
protected |
|
protected |
The B matrix is zero.
|
staticconstexpr |
default expected drift of the bias every second
|
staticconstexpr |
default value for gain minimum, the gain has to be a positive definite matrix with the smallest eigenvalue bigger than this value
|
staticconstexpr |
default value for the uncertainty of the Gain
|
staticconstexpr |
default error in the measurements of the zmp
|
staticconstexpr |
default error in the process linear dynamics of the zmp (in meters)
|
staticconstexpr |
default valu for the initial ZMP uncertainty. It should be quite low since this is supposed to be measured
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
process noise
|
protected |
measurement noise
|
protected |
|
protected |
|
protected |