|
state-observation 1.8.0
General implementation of observers.
|
Classes | |
| struct | InputWaiko |
Public Member Functions | |
| WaikoHumanoid (double alpha, double beta, double gamma, double rho, double mu, double psi=0.0) | |
| virtual | ~WaikoHumanoid () |
| Destroys the observer. | |
| void | initEstimator (const Vector3 &x1, const Vector3 &x2, const Vector4 &ori, const Vector3 &pos) |
| initializes the state vector. | |
| void | setInput (double dt, const Vector3 &imuAnchorPos, const Vector3 &imuAnchorLinVel, const Vector3 &ya_k, const Vector3 &yg_k, TimeIndex k, bool resetImuLocVelHat=false) |
| sets the input | |
| void | setInput (double dt, const Vector3 &yv_k, const Vector3 &ya_k, const Vector3 &yg_k, TimeIndex k, bool resetImuLocVelHat=false) |
| sets the input | |
| void | addPosInput (const Vector3 &poseInput, TimeIndex k) |
| set position, orientation, or pose inputs | |
| void | addOriInput (const Matrix3 &oriInput, TimeIndex k) |
| void | addPoseInput (const Matrix3 &oriInput, const Vector3 &posInput, TimeIndex k) |
| void | addContactPosInput (const Vector3 &refPose, const Vector3 &imuContactPos, double lambda, TimeIndex k) |
| adds a position measurement coming from contacts | |
| void | setAlpha (const double alpha) |
| set the gain of x1_hat variable | |
| double | getAlpha () |
| void | setBeta (const double beta) |
| set the gain of x2prime_hat variable | |
| double | getBeta () |
| void | setRho (const double rho) |
| set rho | |
| double | getRho () |
| void | setGamma (const double gamma) |
| set lambda | |
| double | getGamma () |
| void | setMu (const double mu) |
| set mu | |
| double | getMu () |
| void | setPsi (const double psi) |
| set psi | |
| double | getPsi () |
| void | setWithOriCorrectFromContactPos (bool withCorrection) |
| bool | getWithOriCorrectFromContactPos () |
| const Eigen::VectorBlock< ObserverBase::StateVector, sizeX1 > | getEstimatedLocLinVel () |
| const Eigen::VectorBlock< ObserverBase::StateVector, sizeX2 > | getEstimatedTilt () |
| Matrix3 | getEstimatedOrientation () const |
| const Eigen::VectorBlock< ObserverBase::StateVector, sizePos > | getEstimatedLocPosition () |
| Vector3 | getEstimatedWorldPosition () |
| const Vector3 & | getPositionAnchor () const |
| void | resetPositionAnchor (const Vector3 &newPositionAnchor) |
| double | getLastPositionAnchorResetJump () const |
| double | getLastPositionAnchorResetLocalNormBefore () const |
| double | getLastPositionAnchorResetLocalNormAfter () const |
| std::size_t | getPositionAnchorResetCount () const |
| const stateObservation::Vector3 & | getPosCorrectionFromContactPos () |
| const stateObservation::Vector3 & | getOriCorrectionFromContactPos () |
| const stateObservation::Vector3 & | getOriCorrFromOriMeas () |
| virtual void | setInput (const InputBase &u_k, TimeIndex k) |
| Public Member Functions inherited from stateObservation::ZeroDelayObserver | |
| ZeroDelayObserver (Index n, Index m, const std::shared_ptr< IndexedInputArrayInterface > input) | |
| ZeroDelayObserver (const std::shared_ptr< IndexedInputArrayInterface > input) | |
| Default constructor (default values for n,m are zero). | |
| virtual | ~ZeroDelayObserver () |
| Destructor. | |
| ZeroDelayObserver (const ZeroDelayObserver &)=delete | |
| Not copyable: the copy would share the buffer of inputs. | |
| ZeroDelayObserver & | operator= (const ZeroDelayObserver &)=delete |
| virtual void | setState (const ObserverBase::StateVector &x_k, TimeIndex k) |
| Set the value of the state vector at time index k. | |
| virtual void | setCurrentState (const ObserverBase::StateVector &x_k) |
| Modify the value of the state vector at the current time. | |
| virtual void | clearStates () |
| Removes the state estimation. | |
| bool | stateIsSet () const |
| Returns if the state is set or not. The state being set is mandatory to start the estimator. | |
| 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. | |
| virtual void | clearMeasurements () |
| Remove all the given values of the measurements. | |
| virtual void | pushInput (const InputBase &u_k) |
| Set the input value at the next time indext. | |
| virtual void | clearInputs () |
| virtual void | clearInputsAndMeasurements () |
| Remove all the given values of the inputs and measurements. | |
| virtual TimeIndex | estimateState () |
| run the observer until the measurement vector is depleted. | |
| virtual const ObserverBase::StateVector & | getEstimatedState (TimeIndex k) |
| getestimated State | |
| virtual const ObserverBase::StateVector & | getCurrentEstimatedState () const |
| Get the Current Estimated State. | |
| virtual ObserverBase::StateVector & | getCurrentEstimatedState () |
| Get the Current Estimated State. | |
| virtual TimeIndex | getCurrentTime () const |
| Get the value of the time index of the current state estimation. | |
| const InputBase & | getInput (TimeIndex k) const |
| Get the value of the input of the time index k. | |
| InputBase & | getInput (TimeIndex k) |
| Get the value of the input of the time index k. | |
| virtual TimeSize | getInputsNumber () const |
| Get the number of available inputs. | |
| virtual TimeIndex | getInputTime () const |
| Get the time index of the last given input. | |
| const Vector & | getMeasurement (TimeIndex k) const |
| Get the measurement of the time index k. | |
| virtual TimeIndex | getMeasurementTime () const |
| Get the time index of the last given measurement. | |
| virtual TimeSize | getMeasurementsNumber () const |
| Gets the number of regitered measurements. | |
| virtual void | setStateSize (Index n) |
| changes the size of the state vector: resets the stored state vector | |
| virtual void | setMeasureSize (Index m) |
| changes the size of the measurement vector: reset the stored measurement vectors | |
| Public Member Functions inherited from stateObservation::ObserverBase | |
| ObserverBase (Index n, Index m) | |
| InputVector is the type of the input vector. | |
| ObserverBase () | |
| default constructor (default values for n,m are zero) | |
| virtual | ~ObserverBase () |
| Destructor. | |
| virtual Index | getStateSize () const |
| gets the size of the state vector | |
| virtual Index | getMeasureSize () const |
| gets the size of the measurement vector | |
| virtual void | reset () |
| virtual StateVector | stateVectorConstant (double c) const |
| virtual StateVector | stateVectorRandom () const |
| Gives a vector of state vector size having random values. | |
| virtual StateVector | stateVectorZero () const |
| Gives a vector of state vector size having zero values. | |
| virtual bool | checkStateVector (const StateVector &v) const |
| Tells whether or not the vector has the dimensions of a state vector. | |
| virtual MeasureVector | measureVectorConstant (double c) const |
| Gives a vector of measurement vector size having duplicated "c" value. | |
| virtual MeasureVector | measureVectorRandom () const |
| Gives a vector of measurement vector size having random values. | |
| virtual MeasureVector | measureVectorZero () const |
| Gives a vector of measurement vector size having zero values. | |
| virtual bool | checkMeasureVector (const MeasureVector &) const |
| Tells whether or not the vector has the dimensions of a measurement vector. | |
Static Public Attributes | |
| static constexpr Index | sizeX1 = 3 |
| static constexpr Index | sizeX2 = 3 |
| static constexpr Index | sizeOri = 4 |
| static constexpr Index | sizePos = 3 |
| static constexpr Index | sizeX1Tangent = 3 |
| static constexpr Index | sizeX2Tangent = 3 |
| static constexpr Index | sizeOriTangent = 3 |
| static constexpr Index | sizePosTangent = 3 |
| static constexpr Index | x1Index = 0 |
| static constexpr Index | x2Index = sizeX1 |
| static constexpr Index | posIndex = x2Index + sizeX2 |
| static constexpr Index | x1IndexTangent = 0 |
| static constexpr Index | x2IndexTangent = sizeX1Tangent |
| static constexpr Index | oriIndexTangent = x2IndexTangent + sizeX2Tangent |
| static constexpr Index | posIndexTangent = oriIndexTangent + sizeOriTangent |
Protected Member Functions | |
| StateVector | oneStepEstimation_ () override |
| Runs one loop of the estimator. | |
| StateVector & | computeStateDynamics_ () |
| Computes the dynamics of the state at the desired iteration. | |
| void | integrateState_ () |
| Integrates the computed state dynamics. | |
| void | addCorrectionTerms () |
| Add the correction terms coming from the input to the computed state dynamics. | |
| void | startNewIteration_ () |
Protected Attributes | |
| double | alpha_ |
| double | beta_ |
| double | gamma_ |
| double | rho_ |
| double | mu_ |
| double | psi_ |
| Vector | dx_hat_ |
| kine::Orientation | state_ori_ |
| Vector3 | positionAnchor_ = Vector3::Zero() |
| double | lastPositionAnchorResetJump_ = 0.0 |
| double | lastPositionAnchorResetLocalNormBefore_ = 0.0 |
| double | lastPositionAnchorResetLocalNormAfter_ = 0.0 |
| std::size_t | positionAnchorResetCount_ = 0 |
| Vector3 | oriCorrFromOriMeas_ = Vector3::Zero() |
| Vector3 | posCorrFromContactPos_ = Vector3::Zero() |
| Vector3 | oriCorrFromContactPos_ = Vector3::Zero() |
| bool | withOriCorrectFromContactPos_ = false |
| Protected Attributes inherited from stateObservation::ZeroDelayObserver | |
| IndexedVector | x_ |
| while the measurements and iputs are put in lists | |
| IndexedVectorArray | y_ |
| Container for the measurements. | |
| std::shared_ptr< IndexedInputArrayInterface > | u_ |
| Container for the inputs. | |
| Protected Attributes inherited from stateObservation::ObserverBase | |
| Index | n_ |
| stateSize is the size of the state vector | |
| Index | m_ |
| measureSize is the size of measurements vector | |
Additional Inherited Members | |
| Public Types inherited from stateObservation::ObserverBase | |
| typedef Vector | StateVector |
| StateVector is the type of state vector. | |
| typedef Vector | MeasureVector |
| MeasureVector is the type of measurements vector. | |
Definition at line 29 of file waiko-humanoid.hpp.
| stateObservation::WaikoHumanoid::WaikoHumanoid | ( | double | alpha, |
| double | beta, | ||
| double | gamma, | ||
| double | rho, | ||
| double | mu, | ||
| double | psi = 0.0 ) |
The constructor
| void stateObservation::WaikoHumanoid::initEstimator | ( | const Vector3 & | x1, |
| const Vector3 & | x2, | ||
| const Vector4 & | ori, | ||
| const Vector3 & | pos ) |
initializes the state vector.
| x1 | The initial local linear velocity of the IMU. |
| x2_p | The initial value of the intermediate estimate of the IMU's tilt. |
| x2 | The initial tilt of the IMU. |
| void stateObservation::WaikoHumanoid::setInput | ( | double | dt, |
| const Vector3 & | imuAnchorPos, | ||
| const Vector3 & | imuAnchorLinVel, | ||
| const Vector3 & | ya_k, | ||
| const Vector3 & | yg_k, | ||
| TimeIndex | k, | ||
| bool | resetImuLocVelHat = false ) |
sets the input
version that computes yv from the kinematics of the anchor frame in the IMU frame
| dt | sampling time |
| imuAnchorPos | position of the anchor point in the IMU |
| imuAnchorLinVel | linear velocity of the anchor point in the IMU |
| ya_k | accelerometer measurement |
| yg_k | gryometer measurement |
| k | time index |
| resetImuLocVelHat | Resets x1hat (the estimate of the local linear velocity of the IMU in the world). Avoid discontinuities when the computation mode of the anchor point changes |
| void stateObservation::WaikoHumanoid::setInput | ( | double | dt, |
| const Vector3 & | yv_k, | ||
| const Vector3 & | ya_k, | ||
| const Vector3 & | yg_k, | ||
| TimeIndex | k, | ||
| bool | resetImuLocVelHat = false ) |
sets the input
| dt | sampling time |
| yv_k | local linear velocity measurement |
| ya_k | accelerometer measurement |
| yg_k | gryometer measurement |
| k | time index |
| resetImuLocVelHat | Resets x1hat (the estimate of the local linear velocity of the IMU in the world). Avoid discontinuities when the computation mode of the anchor point changes |
| void stateObservation::WaikoHumanoid::addContactPosInput | ( | const Vector3 & | refPose, |
| const Vector3 & | imuContactPos, | ||
| double | lambda, | ||
| TimeIndex | k ) |
adds a position measurement coming from contacts
this measurement is also used to compute a correction term for the orientation
| refPose | reference position of the contact |
| imuContactPos | position of the contact in the imu frame. |
| lambda | contribution gain of the contact. the lambdas of all contacts must sum up to 1. |
| k | time index |
|
inline |
set the gain of x1_hat variable
Definition at line 161 of file waiko-humanoid.hpp.
|
inline |
Definition at line 165 of file waiko-humanoid.hpp.
|
inline |
set the gain of x2prime_hat variable
Definition at line 171 of file waiko-humanoid.hpp.
|
inline |
Definition at line 175 of file waiko-humanoid.hpp.
|
inline |
set rho
Definition at line 181 of file waiko-humanoid.hpp.
|
inline |
Definition at line 185 of file waiko-humanoid.hpp.
|
inline |
set lambda
Definition at line 191 of file waiko-humanoid.hpp.
|
inline |
Definition at line 195 of file waiko-humanoid.hpp.
|
inline |
set mu
Definition at line 201 of file waiko-humanoid.hpp.
|
inline |
Definition at line 205 of file waiko-humanoid.hpp.
|
inline |
set psi
Definition at line 211 of file waiko-humanoid.hpp.
|
inline |
Definition at line 215 of file waiko-humanoid.hpp.
|
inline |
Definition at line 220 of file waiko-humanoid.hpp.
|
inline |
Definition at line 224 of file waiko-humanoid.hpp.
|
inline |
Definition at line 229 of file waiko-humanoid.hpp.
|
inline |
Definition at line 233 of file waiko-humanoid.hpp.
|
inline |
Definition at line 237 of file waiko-humanoid.hpp.
|
inline |
Definition at line 241 of file waiko-humanoid.hpp.
|
inline |
Definition at line 245 of file waiko-humanoid.hpp.
|
inline |
Definition at line 249 of file waiko-humanoid.hpp.
|
inline |
Definition at line 254 of file waiko-humanoid.hpp.
|
inline |
Definition at line 258 of file waiko-humanoid.hpp.
|
inline |
Definition at line 262 of file waiko-humanoid.hpp.
|
inline |
Definition at line 266 of file waiko-humanoid.hpp.
|
inline |
Definition at line 273 of file waiko-humanoid.hpp.
|
inline |
Definition at line 279 of file waiko-humanoid.hpp.
|
inline |
Definition at line 285 of file waiko-humanoid.hpp.
|
overrideprotectedvirtual |
Runs one loop of the estimator.
Calls computeStateDynamics_ then integrateState_
| it | Iterator that points to the updated state. Points to x_{k} = f(x_{k-1}, u_{k-1}) |
Implements stateObservation::ZeroDelayObserver.
|
protected |
Computes the dynamics of the state at the desired iteration.
Computes x^{dot}_{k-1}
| it | Iterator that points to the updated state. Points to x_{k} = f(x_{k-1}, u_{k-1}) |
|
protected |
Integrates the computed state dynamics.
Computes x_{k} = x_{k-1} + x^{dot}_{k-1} * dt
| it | Iterator that points to the updated state. Points to x_{k} = f(x_{k-1}, u_{k-1}) |
|
virtual |
Set the value of the input vector at time index k. The inputs have to be inserted in chronological order without gaps.
Reimplemented from stateObservation::ZeroDelayObserver.
|
inlinestaticconstexpr |
Definition at line 64 of file waiko-humanoid.hpp.
|
inlinestaticconstexpr |
Definition at line 65 of file waiko-humanoid.hpp.
|
inlinestaticconstexpr |
Definition at line 66 of file waiko-humanoid.hpp.
|
inlinestaticconstexpr |
Definition at line 67 of file waiko-humanoid.hpp.
|
inlinestaticconstexpr |
Definition at line 69 of file waiko-humanoid.hpp.
|
inlinestaticconstexpr |
Definition at line 70 of file waiko-humanoid.hpp.
|
inlinestaticconstexpr |
Definition at line 71 of file waiko-humanoid.hpp.
|
inlinestaticconstexpr |
Definition at line 72 of file waiko-humanoid.hpp.
|
inlinestaticconstexpr |
Definition at line 74 of file waiko-humanoid.hpp.
|
inlinestaticconstexpr |
Definition at line 75 of file waiko-humanoid.hpp.
|
inlinestaticconstexpr |
Definition at line 76 of file waiko-humanoid.hpp.
|
inlinestaticconstexpr |
Definition at line 78 of file waiko-humanoid.hpp.
|
inlinestaticconstexpr |
Definition at line 79 of file waiko-humanoid.hpp.
|
inlinestaticconstexpr |
Definition at line 80 of file waiko-humanoid.hpp.
|
inlinestaticconstexpr |
Definition at line 81 of file waiko-humanoid.hpp.
|
protected |
The parameters of the estimator
Definition at line 324 of file waiko-humanoid.hpp.
|
protected |
Definition at line 324 of file waiko-humanoid.hpp.
|
protected |
Definition at line 324 of file waiko-humanoid.hpp.
|
protected |
Definition at line 324 of file waiko-humanoid.hpp.
|
protected |
Definition at line 324 of file waiko-humanoid.hpp.
|
protected |
Definition at line 324 of file waiko-humanoid.hpp.
|
protected |
Definition at line 325 of file waiko-humanoid.hpp.
|
protected |
Definition at line 326 of file waiko-humanoid.hpp.
|
protected |
Definition at line 327 of file waiko-humanoid.hpp.
|
protected |
Definition at line 328 of file waiko-humanoid.hpp.
|
protected |
Definition at line 329 of file waiko-humanoid.hpp.
|
protected |
Definition at line 330 of file waiko-humanoid.hpp.
|
protected |
Definition at line 331 of file waiko-humanoid.hpp.
|
protected |
Definition at line 335 of file waiko-humanoid.hpp.
|
protected |
Definition at line 338 of file waiko-humanoid.hpp.
|
protected |
Definition at line 341 of file waiko-humanoid.hpp.
|
protected |
Definition at line 343 of file waiko-humanoid.hpp.