Bayes Filters Library
MeasurementModel.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2016-2019 Istituto Italiano di Tecnologia (IIT)
3  *
4  * This software may be modified and distributed under the terms of the
5  * BSD 3-Clause license. See the accompanying LICENSE file for details.
6  */
7 
8 #ifndef MEASUREMENTMODEL_H
9 #define MEASUREMENTMODEL_H
10 
11 #include <BayesFilters/Data.h>
12 #include <BayesFilters/Logger.h>
14 
15 #include <memory>
16 #include <string>
17 #include <utility>
18 
19 #include <Eigen/Dense>
20 
21 namespace bfl {
22  class MeasurementModel;
23 }
24 
25 
30 {
31 public:
32  virtual ~MeasurementModel() noexcept = default;
33 
34  virtual bool freeze(const Data& data = Data()) = 0;
35 
36  virtual std::pair<bool, Data> measure(const Data& data = Data()) const = 0;
37 
38  virtual std::pair<bool, Data> predictedMeasure(const Eigen::Ref<const Eigen::MatrixXd>& cur_states) const = 0;
39 
40  virtual std::pair<bool, Data> innovation(const Data& predicted_measurements, const Data& measurements) const = 0;
41 
42  virtual std::pair<bool, Eigen::MatrixXd> getNoiseCovarianceMatrix() const;
43 
44  virtual bool setProperty(const std::string& property);
45 
46  /* Returns the vector description of the input to the measurement equation. */
47  virtual VectorDescription getInputDescription() const;
48 
49  /* Returns the vector description of the output measurement of the measurement equation. */
51 };
52 
53 #endif /* MEASUREMENTMODEL_H */
bfl::MeasurementModel::getNoiseCovarianceMatrix
virtual std::pair< bool, Eigen::MatrixXd > getNoiseCovarianceMatrix() const
Definition: MeasurementModel.cpp:16
bfl::MeasurementModel::predictedMeasure
virtual std::pair< bool, Data > predictedMeasure(const Eigen::Ref< const Eigen::MatrixXd > &cur_states) const =0
bfl::Data
any::any Data
Definition: Data.h:17
bfl::MeasurementModel::freeze
virtual bool freeze(const Data &data=Data())=0
bfl
Port of boost::any for C++11 compilers.
Definition: AdditiveMeasurementModel.h:13
bfl::MeasurementModel::innovation
virtual std::pair< bool, Data > innovation(const Data &predicted_measurements, const Data &measurements) const =0
bfl::MeasurementModel::getMeasurementDescription
virtual VectorDescription getMeasurementDescription() const
Definition: MeasurementModel.cpp:37
bfl::Logger
Definition: Logger.h:21
Logger.h
bfl::MeasurementModel::setProperty
virtual bool setProperty(const std::string &property)
Definition: MeasurementModel.cpp:22
VectorDescription.h
bfl::MeasurementModel::getInputDescription
virtual VectorDescription getInputDescription() const
Definition: MeasurementModel.cpp:30
bfl::MeasurementModel
This class represent a generic measurement model f(x, w), where x is a state vector and w is random n...
Definition: MeasurementModel.h:29
Data.h
bfl::MeasurementModel::~MeasurementModel
virtual ~MeasurementModel() noexcept=default
bfl::any::any
The class any describes a type-safe container for single values of any type.
Definition: any.h:77
bfl::VectorDescription
Definition: VectorDescription.h:18
bfl::MeasurementModel::measure
virtual std::pair< bool, Data > measure(const Data &data=Data()) const =0