ekf_cal  0.4.0
A Kalman filter-based sensor calibration package
updater.hpp
1 // Copyright 2023 Jacob Hartzer
2 //
3 // This program is free software: you can redistribute it and/or modify
4 // it under the terms of the GNU General Public License as published by
5 // the Free Software Foundation, either version 3 of the License, or
6 // (at your option) any later version.
7 //
8 // This program is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 // GNU General Public License for more details.
12 //
13 // You should have received a copy of the GNU General Public License
14 // along with this program. If not, see <https://www.gnu.org/licenses/>.
15 
16 #ifndef EKF__UPDATE__UPDATER_HPP_
17 #define EKF__UPDATE__UPDATER_HPP_
18 
19 #include <memory>
20 
21 #include "ekf/ekf.hpp"
22 #include "infrastructure/debug_logger.hpp"
23 
28 class Updater
29 {
30 public:
36  explicit Updater(unsigned int sensor_id, std::shared_ptr<DebugLogger> logger);
37 
39  // Updater(EKF & ekf, unsigned int sensor_id);
40 
41  void KalmanUpdate(
42  EKF & ekf,
43  const Eigen::MatrixXd & jacobian,
44  const Eigen::VectorXd & residual,
45  const Eigen::MatrixXd & measurement_noise);
46 
47 protected:
48  unsigned int m_id;
49  std::shared_ptr<DebugLogger> m_logger;
50 };
51 
52 #endif // EKF__UPDATE__UPDATER_HPP_
Calibration EKF class.
Definition: ekf.hpp:39
Base class for EKF updater classes.
Definition: updater.hpp:29
Updater(unsigned int sensor_id, std::shared_ptr< DebugLogger > logger)
EKF Updater constructor.
Definition: updater.cpp:22
void KalmanUpdate(EKF &ekf, const Eigen::MatrixXd &jacobian, const Eigen::VectorXd &residual, const Eigen::MatrixXd &measurement_noise)
Definition: updater.cpp:26
std::shared_ptr< DebugLogger > m_logger
Debug logger.
Definition: updater.hpp:49
unsigned int m_id
Associated sensor ID.
Definition: updater.hpp:48