Visual Servoing Platform  version 3.6.1 under development (2024-11-14)
vpKalmanFilter.h
1 /*
2  * ViSP, open source Visual Servoing Platform software.
3  * Copyright (C) 2005 - 2023 by Inria. All rights reserved.
4  *
5  * This software is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  * See the file LICENSE.txt at the root directory of this source
10  * distribution for additional information about the GNU GPL.
11  *
12  * For using ViSP with software that can not be combined with the GNU
13  * GPL, please contact Inria about acquiring a ViSP Professional
14  * Edition License.
15  *
16  * See https://visp.inria.fr for more information.
17  *
18  * This software was developed at:
19  * Inria Rennes - Bretagne Atlantique
20  * Campus Universitaire de Beaulieu
21  * 35042 Rennes Cedex
22  * France
23  *
24  * If you have questions regarding the use of this file, please contact
25  * Inria at visp@inria.fr
26  *
27  * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
28  * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
29  *
30  * Description:
31  * Kalman filtering.
32  */
33 
39 #ifndef vpKalmanFilter_h
40 #define vpKalmanFilter_h
41 
42 #include <visp3/core/vpColVector.h>
43 #include <visp3/core/vpMatrix.h>
44 
45 #include <math.h>
46 
47 BEGIN_VISP_NAMESPACE
105 class VISP_EXPORT vpKalmanFilter
106 {
107 protected:
108  // bool init_done ;
109 
111  long iter;
112 
114  unsigned int size_state;
116  unsigned int size_measure;
118  unsigned int nsignal;
119 
123 
124 public:
125  vpKalmanFilter();
126  VP_EXPLICIT vpKalmanFilter(unsigned int n_signal);
127  vpKalmanFilter(unsigned int size_state, unsigned int size_measure, unsigned int n_signal);
129  virtual ~vpKalmanFilter() { };
133  void setNumberOfSignal(unsigned int n_signal) { this->nsignal = n_signal; }
134 
135  // int init() { return init_done ; }
136  void init(unsigned int size_state, unsigned int size_measure, unsigned int n_signal);
137  void prediction();
138  void filtering(const vpColVector &z);
142  unsigned int getStateSize() { return size_state; };
146  unsigned int getMeasureSize() { return size_measure; };
150  unsigned int getNumberOfSignal() { return nsignal; };
154  long getIteration() { return iter; }
160  void verbose(bool on) { verbose_mode = on; };
161 
162 public:
177 
180 
188  double dt;
196 
203 
204 protected:
211 
214 };
215 END_VISP_NAMESPACE
216 #endif
Implementation of column vector and the associated operations.
Definition: vpColVector.h:191
This class provides a generic Kalman filtering algorithm along with some specific state model (consta...
unsigned int size_state
Size of the state vector .
vpColVector Xpre
long iter
Filter step or iteration. When set to zero, initialize the filter.
virtual ~vpKalmanFilter()
unsigned int getMeasureSize()
vpMatrix R
Measurement noise covariance matrix .
void verbose(bool on)
unsigned int nsignal
Number of signal to filter.
vpMatrix Q
Process noise covariance matrix .
void setNumberOfSignal(unsigned int n_signal)
vpColVector Xest
unsigned int size_measure
Size of the measure vector .
unsigned int getNumberOfSignal()
vpMatrix I
Identity matrix .
vpMatrix H
Matrix that describes the evolution of the measurements.
unsigned int getStateSize()
Implementation of a matrix and operations on matrices.
Definition: vpMatrix.h:169