1D version of the estimation of a bias betweeen the divergent component of motion and the corresponding zero moment point for a linearized inverted pendulum model. More...
#include <state-observation/dynamics-estimators/unidim-lipm-dcm-estimator.hpp>
Public Member Functions | |
UnidimLipmDcmEstimator (double dt=defaultDt_, double omega_0=defaultOmega_, double biasDriftPerSecondStd=defaultBiasDriftSecond, double initDcm=0, double initZMP=0, double initBias=0, double dcmMeasureErrorStd=defaultDcmErrorStd, double zmpMeasureErrorStd=defaultZmpErrorStd, double initDcmUncertainty=defaultDCMUncertainty, double initBiasUncertainty=defaultBiasUncertainty) | |
Construct a new Unidimensional Lipm Dcm Estimator. More... | |
void | resetWithInputs (double measuredDcm, double measuredZMP, bool measurementIsWithBias=true, double biasDriftPerSecondStd=defaultBiasDriftSecond, double dcmMeasureErrorStd=defaultDcmErrorStd, double zmpMeasureErrorStd=defaultZmpErrorStd, double initBias=0, double initBiasuncertainty=defaultBiasUncertainty) |
Construct a new Lipm Dcm Bias Estimator object. More... | |
~UnidimLipmDcmEstimator () | |
Destroy the Lipm Dcm Bias Estimator object. More... | |
void | setLipmNaturalFrequency (double omega_0) |
Set the Lipm Natural Frequency. More... | |
void | setSamplingTime (double dt) |
Set the Sampling Time. More... | |
void | setBias (double bias) |
Set the Bias object from a guess. More... | |
void | setBias (double bias, double uncertainty) |
Set the Bias object from a guess. More... | |
void | setBiasDriftPerSecond (double driftPerSecond) |
Set the Bias Drift Per Second. More... | |
void | setUnbiasedDCM (double dcm) |
set the real DCM position from a guess More... | |
void | setUnbiasedDCM (double dcm, double uncertainty) |
set the real DCM position from a guess More... | |
void | setZmpMeasureErrorStd (double) |
Set the Zmp Measurement Error Stamdard devbiation. More... | |
void | setDcmMeasureErrorStd (double) |
Set the Dcm Measurement Error Standard. More... | |
void | setInputs (double dcm, double zmp) |
Set the Inputs of the estimator. More... | |
Vector2 | update () |
Runs the estimation. Needs to be called every timestep. More... | |
double | getUnbiasedDCM () const |
Get the Unbiased DCM filtered by the estimator. More... | |
double | getBias () const |
Get the estimated Bias. 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 | defaultBiasDriftSecond = 0.002 |
default expected drift of the bias every second More... | |
constexpr static double | defaultZmpErrorStd = 0.005 |
default error in the estimation of the sensors More... | |
constexpr static double | defaultDcmErrorStd = 0.01 |
constexpr static double | defaultDCMUncertainty = 0.01 |
default uncertainty in the initial values of DCM and Bias More... | |
constexpr static double | defaultBiasUncertainty = 0.01 |
1D version of the estimation of a bias betweeen the divergent component of motion and the corresponding zero moment point for a linearized inverted pendulum model.
A humanoid robot can be modeled as an inverted pendulum. The dynamics can be linearized to obtain a dynamics with a convergent and a divergent component of motion (DCN). The dynamics of the DCM depends on the Zero Moment Point. The DCM can be measured using the CoM and its velocity, but the CoM position can be biased. This estimator uses Kalman Filtering to estimate this bias in one axis.
stateObservation::UnidimLipmDcmEstimator::UnidimLipmDcmEstimator | ( | double | dt = defaultDt_ , |
double | omega_0 = defaultOmega_ , |
||
double | biasDriftPerSecondStd = defaultBiasDriftSecond , |
||
double | initDcm = 0 , |
||
double | initZMP = 0 , |
||
double | initBias = 0 , |
||
double | dcmMeasureErrorStd = defaultDcmErrorStd , |
||
double | zmpMeasureErrorStd = defaultZmpErrorStd , |
||
double | initDcmUncertainty = defaultDCMUncertainty , |
||
double | initBiasUncertainty = defaultBiasUncertainty |
||
) |
Construct a new Unidimensional Lipm Dcm Estimator.
dt | the sampling time in seconds |
omega_0 | the natural frequency of the DCM (rad/s) |
biasDriftPerSecondStd | the standard deviation of the drift (m/s) |
initDcm | the initial value of the DCM |
initZMP | the initial value of the ZMP |
initBias | the initial value of the bias |
dcmMeasureErrorStd | the standard deviation of the dcm estimation error, NOT including the bias (m) |
zmpMeasureErrorStd | the standard deviaiton of the zmp estimation error (m) |
initDcmUncertainty | the uncertainty in the DCM initial value in meters |
initBiasUncertainty | the uncertainty in the bias initial value in meters |
|
inline |
Destroy the Lipm Dcm Bias Estimator object.
double stateObservation::UnidimLipmDcmEstimator::getBias | ( | ) | const |
Get the estimated Bias.
|
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.
double stateObservation::UnidimLipmDcmEstimator::getUnbiasedDCM | ( | ) | const |
Get the Unbiased DCM filtered by the estimator.
@detailt This is the recommended output to take
void stateObservation::UnidimLipmDcmEstimator::resetWithInputs | ( | double | measuredDcm, |
double | measuredZMP, | ||
bool | measurementIsWithBias = true , |
||
double | biasDriftPerSecondStd = defaultBiasDriftSecond , |
||
double | dcmMeasureErrorStd = defaultDcmErrorStd , |
||
double | zmpMeasureErrorStd = defaultZmpErrorStd , |
||
double | initBias = 0 , |
||
double | initBiasuncertainty = defaultBiasUncertainty |
||
) |
Construct a new Lipm Dcm Bias Estimator object.
Use this when initializing with an available DCM (biased) measurement
measurementIsWithBias | sets if yes or no the measurement is with the bias. It is better set to true than trying to remove it beforehand |
measuredDcm | the the measured position of the DCM |
omega_0 | the natural frequency of the DCM (rad/s) |
dt | the sampling time in seconds |
biasDriftPerSecondStd | the standard deviation of the drift (m/s) |
zmpMeasureErrorStd | the standard deviaiton of the zmp estimation error (m) |
scmMeasureErrorStd | the standard deviation of the dcm estimation error, NOT including the bias (m) |
initBias | the initial value of the drift |
initBiasUncertainty | the uncertainty in the bias initial value in meters |
void stateObservation::UnidimLipmDcmEstimator::setBias | ( | double | bias | ) |
Set the Bias object from a guess.
bias | guess |
void stateObservation::UnidimLipmDcmEstimator::setBias | ( | double | bias, |
double | uncertainty | ||
) |
Set the Bias object from a guess.
bias | guess |
the | uncertainty you have in this guess in meters |
void stateObservation::UnidimLipmDcmEstimator::setBiasDriftPerSecond | ( | double | driftPerSecond | ) |
Set the Bias Drift Per Second.
driftPerSecond | the standard deviation of the drift (m/s) |
void stateObservation::UnidimLipmDcmEstimator::setDcmMeasureErrorStd | ( | double | ) |
Set the Dcm Measurement Error Standard.
void stateObservation::UnidimLipmDcmEstimator::setInputs | ( | double | dcm, |
double | zmp | ||
) |
Set the Inputs of the estimator.
dcm | |
zmp |
void stateObservation::UnidimLipmDcmEstimator::setLipmNaturalFrequency | ( | double | omega_0 | ) |
Set the Lipm Natural Frequency.
omega_0 | is the sampling time in seconds |
void stateObservation::UnidimLipmDcmEstimator::setSamplingTime | ( | double | dt | ) |
Set the Sampling Time.
dt | sampling time |
void stateObservation::UnidimLipmDcmEstimator::setUnbiasedDCM | ( | double | dcm | ) |
set the real DCM position from a guess
dcm | guess |
void stateObservation::UnidimLipmDcmEstimator::setUnbiasedDCM | ( | double | dcm, |
double | uncertainty | ||
) |
set the real DCM position from a guess
dcm | guess |
dcm | |
uncertainty | the uncertainty in this guess |
void stateObservation::UnidimLipmDcmEstimator::setZmpMeasureErrorStd | ( | double | ) |
Set the Zmp Measurement Error Stamdard devbiation.
|
inline |
Runs the estimation. Needs to be called every timestep.
|
staticconstexpr |
default expected drift of the bias every second
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
default uncertainty in the initial values of DCM and Bias
|
staticconstexpr |
default error in the estimation of the sensors