state-observation 1.7.0
Loading...
Searching...
No Matches
sensor-base.hpp
Go to the documentation of this file.
1
10#ifndef SIMULATIONSENSORBASEHPP
11#define SIMULATIONSENSORBASEHPP
12
13#include <boost/assert.hpp>
14#include <Eigen/Core>
15
16#include <state-observation/api.h>
18
19namespace stateObservation
20{
31{
32public:
35
37 virtual ~SensorBase() {}
38
41 virtual Vector getMeasurements(bool noisy = true) = 0;
42
44 virtual void setState(const Vector & state, TimeIndex k) = 0;
45
48 virtual void setNoise(NoiseBase *);
49
51 virtual NoiseBase * getNoise() const;
52
54 virtual void resetNoise();
55
57 virtual TimeIndex getTime() const = 0;
58
60 virtual Index getStateSize() const = 0;
61
63 virtual Index getMeasurementSize() const = 0;
64
66 virtual Vector stateVectorZero() const;
67
69 virtual bool checkStateVector(const Vector &) const;
70
71protected:
73};
74
75} // namespace stateObservation
76
77#endif // SIMULATIONSENSORBASEHPP
Definition noise-base.hpp:29
The base class for sensors. This must be derived to implement a sensor.
Definition sensor-base.hpp:31
virtual bool checkStateVector(const Vector &) const
checks whether a vector is correctly sized or not
NoiseBase * noise_
Definition sensor-base.hpp:72
virtual void setState(const Vector &state, TimeIndex k)=0
Sets the value of the state at instant k.
virtual NoiseBase * getNoise() const
gets the pointer on the measurements noise
virtual Index getMeasurementSize() const =0
get the size of the measurements. Pure virtual method.
virtual void setNoise(NoiseBase *)
virtual Index getStateSize() const =0
gets the state vector size. Pure virtual method.
virtual Vector getMeasurements(bool noisy=true)=0
virtual ~SensorBase()
virtual destructor
Definition sensor-base.hpp:37
virtual Vector stateVectorZero() const
gets a zero vector of the size of a state vector
SensorBase()
default constructor
virtual TimeIndex getTime() const =0
gets the current time, pure virtual method
virtual void resetNoise()
removes the noise
Definition bidim-elastic-inv-pendulum-dyn-sys.hpp:21
long int TimeIndex
Definition definitions.hpp:139
Eigen::MatrixXd Matrix
Dynamic sized Matrix.
Definition definitions.hpp:100
Eigen::Index Index
Definition definitions.hpp:138
Eigen::VectorXd Vector
Dynamic sized scalar vector.
Definition definitions.hpp:76