state-observation 1.7.0
General implementation of observers.
Loading...
Searching...
No Matches
tilt-estimator-humanoid.hpp
1
12
13#ifndef TILTESTIMATORHUMANOIDHPP
14#define TILTESTIMATORHUMANOIDHPP
15
16#include <state-observation/api.h>
19
20namespace stateObservation
21{
22
28class STATE_OBSERVATION_DLLAPI TiltEstimatorHumanoid : public TiltEstimator
29{
30public:
37 TiltEstimatorHumanoid(double alpha, double beta, double gamma, double dt);
38
41 {
42 p_S_C_ = p;
43 }
44
45 Vector3 getSensorPositionInC()
46 {
47 return p_S_C_;
48 }
49
52 {
53 R_S_C_ = R;
54 }
55 Matrix3 getSensorOrientationInC()
56 {
57 return R_S_C_;
58 }
59
60 Vector3 getVirtualLocalVelocityMeasurement()
61 {
62 return x1_;
63 }
64
67 {
68 v_S_C_ = v;
69 }
70
71 Vector3 getSensorLinearVelocityInC()
72 {
73 return v_S_C_;
74 }
75
78 {
79 w_S_C_ = w;
80 }
81 Vector3 getSensorAngularVelocityInC()
82 {
83 return w_S_C_;
84 }
85
89 {
90 v_C_ = v;
91 }
92 Vector3 getControlOriginVelocityInW()
93 {
94 return v_C_;
95 }
96
101
103#if defined(__clang__)
104# pragma clang diagnostic push
105# pragma clang diagnostic ignored "-Woverloaded-virtual"
106#else
107# if defined(__GNUC__)
108# pragma GCC diagnostic push
109# pragma GCC diagnostic ignored "-Woverloaded-virtual"
110# endif
111#endif
112
113 // we also want to use the function setMeasurement from the TiltEstimator class, that is hidden by the following
116 void setMeasurement(const Vector3 & ya_k, const Vector3 & yg_k, TimeIndex k);
117
118#if defined(__clang__)
119# pragma clang diagnostic pop
120#else
121# if defined(__GNUC__)
122# pragma GCC diagnostic pop
123# endif
124#endif
125
126public:
127protected:
130
133
136
139
142
144 bool resetX1hat_ = false;
145
150};
151
152} // namespace stateObservation
153
154#endif // TILTESTIMATORHUMANOIDHPP
void resetImuLocVelHat()
informs the estimator that x1hat (the estimate of the local linear velocity of the IMU in the world) ...
void checkResetX1hat()
Checks if x1hat needs to be reset and if yes, resets it with the current value of x1.
Vector3 v_S_C_
Linear velocity of the IMU in the control frame.
Vector3 p_S_C_
Position of the IMU in the control frame.
void setSensorPositionInC(const Vector3 &p)
sets the position of the IMU sensor in the control frame
void setMeasurement(const Vector3 &ya_k, const Vector3 &yg_k, TimeIndex k)
sets ths measurement (accelero and gyro stacked in one vector)
void setSensorOrientationInC(const Matrix3 &R)
sets the oriantation of the IMU sensor in the control frame
void setSensorAngularVelocityInC(const Vector3 &w)
sets the angular velocity of the IMU sensor in the control frame
Vector3 v_C_
Linear velocity of the control frame.
TiltEstimatorHumanoid(double alpha, double beta, double gamma, double dt)
Vector3 w_S_C_
Angular velocity of the IMU in the control frame.
bool resetX1hat_
indicates that x1hat needs to be reset
void setSensorLinearVelocityInC(const Vector3 &v)
sets teh linear velocity of the IMU sensor in the control frame
Matrix3 R_S_C_
Orientation of the IMU in the control frame.
TiltEstimator(double alpha, double beta, double gamma, double dt)
void setMeasurement(const Vector3 &yv_k, const Vector3 &ya_k, const Vector3 &yg_k, TimeIndex k)
sets ths measurement (accelero and gyro stacked in one vector)
Filtering of divergent component of motion (DCM) and estimation of a bias betweeen the DCM and the co...
Eigen::Vector3d Vector3
3D vector
Eigen::Matrix3d Matrix3
3x3 Scalar Matrix
Version of the Tilt Estimator that implements all the necessary functions to perform the estimation f...
Defines the base class of online zero delay observers. Zero delay observers are the classical state o...