/*! @file PositionVelocityEstimator.h * @brief All State Estimation Algorithms * * This file will contain all state estimation algorithms. * PositionVelocityEstimators should compute: * - body position/velocity in world/body frames * - foot positions/velocities in body/world frame */ #ifndef PROJECT_POSITIONVELOCITYESTIMATOR_H #define PROJECT_POSITIONVELOCITYESTIMATOR_H #include "Controllers/StateEstimatorContainer.h" /*! * Position and velocity estimator based on a Kalman Filter. * This is the algorithm used in Mini Cheetah and Cheetah 3. */ template class LinearKFPositionVelocityEstimator : public GenericEstimator { public: EIGEN_MAKE_ALIGNED_OPERATOR_NEW LinearKFPositionVelocityEstimator(); virtual void run(); virtual void setup(); private: Eigen::Matrix _xhat; Eigen::Matrix _ps; Eigen::Matrix _vs; Eigen::Matrix _A; Eigen::Matrix _Q0; Eigen::Matrix _P; Eigen::Matrix _R0; Eigen::Matrix _B; Eigen::Matrix _C; }; /*! * "Cheater" position and velocity estimator which will return the correct position and * velocity when running in simulation. */ template class CheaterPositionVelocityEstimator : public GenericEstimator { public: virtual void run(); virtual void setup() {} }; #endif // PROJECT_POSITIONVELOCITYESTIMATOR_H