state-observation 1.7.0
Loading...
Searching...
No Matches
imu-dynamical-system.hpp
Go to the documentation of this file.
1
13#ifndef IMU_DYNAMICAL_SYSTEM_HPP
14#define IMU_DYNAMICAL_SYSTEM_HPP
15
16#include <state-observation/api.h>
21
22namespace stateObservation
23{
24
34class STATE_OBSERVATION_DLLAPI IMUDynamicalSystem : public DynamicalSystemFunctorBase
35{
36public:
38 IMUDynamicalSystem(bool withGyroBias = false);
39
42
44 virtual Vector stateDynamics(const Vector & x, const Vector & u, TimeIndex k);
45
47 virtual Vector measureDynamics(const Vector & x, const Vector & u, TimeIndex k);
48
50 virtual void setProcessNoise(NoiseBase *);
52 virtual void resetProcessNoise();
54 virtual NoiseBase * getProcessNoise() const;
55
59 virtual void resetMeasurementNoise();
61 virtual NoiseBase * getMeasurementNoise() const;
62
64 virtual void setSamplingPeriod(double dt);
65
67 virtual Index getStateSize() const;
69 virtual Index getInputSize() const;
71 virtual Index getMeasurementSize() const;
72
74 void setWithGyroBias(bool);
75
77 {
78 if(withGyroBias_)
79 {
80 statesize_ = stateSizeBase_ + 3;
81 }
82 else
83 {
84 statesize_ = stateSizeBase_;
85 }
86 }
87
88 struct indexes : public kine::indexes<kine::rotationVector>
89 {
90 static const Index gyroBias = 18;
91 };
92
93protected:
95
97
98 double dt_;
99
102
104
105 static const Index stateSizeBase_ = 18;
107 static const Index inputSize_ = 6;
108 static const Index measurementSize_ = 6;
109
111
113 static constexpr double one_ = 0.9999;
114
115private:
116public:
117 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
118};
119} // namespace stateObservation
120#endif // IMU-DYNAMICAL-SYSTEM_HPP
Implements the accelerometer-gyrometer inertial measuremen.
Implements the accelerometer-gyrometer measurements.
Definition accelerometer-gyrometer.hpp:36
This is the base class of any functor that describes the dynamics of the state and the measurement....
Definition dynamical-system-functor-base.hpp:33
The class is an implementation of the dynamical system defined by an inertial measurement unit (IMU) ...
Definition imu-dynamical-system.hpp:35
bool withGyroBias_
Definition imu-dynamical-system.hpp:110
double dt_
Definition imu-dynamical-system.hpp:98
virtual Index getStateSize() const
Gets the state size.
virtual NoiseBase * getMeasurementNoise() const
Gets a pointer on the measurement noise.
virtual void setMeasurementNoise(NoiseBase *)
Sets a noise which disturbs the measurements.
virtual Vector stateDynamics(const Vector &x, const Vector &u, TimeIndex k)
Description of the state dynamics.
virtual void resetProcessNoise()
Removes the process noise.
virtual Vector measureDynamics(const Vector &x, const Vector &u, TimeIndex k)
Description of the sensor's dynamics.
Quaternion computeQuaternion_(const Vector3 &x)
QuaternionUnaligned quaternion_
Definition imu-dynamical-system.hpp:101
virtual void resetMeasurementNoise()
Removes the measurement noise.
virtual Index getInputSize() const
Gets the input size.
NoiseBase * processNoise_
Definition imu-dynamical-system.hpp:96
void setWithGyroBias(bool)
Set whether we use Gyro Bias.
Index statesize_
the state size may be bigger if the bias is considered
Definition imu-dynamical-system.hpp:106
virtual NoiseBase * getProcessNoise() const
Gets the process noise.
virtual void setProcessNoise(NoiseBase *)
Sets a noise which disturbs the state dynamics.
virtual void setSamplingPeriod(double dt)
Set the period of the time discretization.
Vector3Unaligned orientationVector_
Definition imu-dynamical-system.hpp:100
AccelerometerGyrometer sensor_
Definition imu-dynamical-system.hpp:94
virtual ~IMUDynamicalSystem()
The virtual destructor.
virtual Index getMeasurementSize() const
Gets the measurement size.
void updatestatesize()
Definition imu-dynamical-system.hpp:76
IMUDynamicalSystem(bool withGyroBias=false)
The constructor.
Definition noise-base.hpp:29
Definition bidim-elastic-inv-pendulum-dyn-sys.hpp:21
Eigen::Quaterniond Quaternion
Quaternion.
Definition definitions.hpp:127
long int TimeIndex
Definition definitions.hpp:139
Eigen::Vector3d Vector3
3D vector
Definition definitions.hpp:85
Eigen::Matrix< double, 3, 1, Eigen::DontAlign > Vector3Unaligned
3D vector unaligned
Definition definitions.hpp:88
Eigen::Index Index
Definition definitions.hpp:138
Eigen::VectorXd Vector
Dynamic sized scalar vector.
Definition definitions.hpp:76
Eigen::Quaternion< double, Eigen::DontAlign > QuaternionUnaligned
Quaternion Unaligned.
Definition definitions.hpp:130
Implements integrators for the kinematics, in terms or rotations and translations.
Definition imu-dynamical-system.hpp:89
Definition rigid-body-kinematics.hpp:320