Visual Servoing Platform version 3.7.0
Loading...
Searching...
No Matches
vpKalmanFilter.h
1/*
2 * ViSP, open source Visual Servoing Platform software.
3 * Copyright (C) 2005 - 2024 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
38
39#ifndef VP_KALMAN_FILTER_H
40#define VP_KALMAN_FILTER_H
41
42#include <visp3/core/vpColVector.h>
43#include <visp3/core/vpMatrix.h>
44
45#include <math.h>
46
105class VISP_EXPORT vpKalmanFilter
106{
107protected:
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
124public:
126 VP_EXPLICIT vpKalmanFilter(unsigned int n_signal);
127 vpKalmanFilter(unsigned int size_state, unsigned int size_measure, unsigned int n_signal);
129#if (VISP_CXX_STANDARD > VISP_CXX_STANDARD_98)
130 vpKalmanFilter(const vpKalmanFilter &) = default;
131 virtual ~vpKalmanFilter() = default;
132#else
133 virtual ~vpKalmanFilter() { }
134#endif
138 void setNumberOfSignal(unsigned int n_signal) { this->nsignal = n_signal; }
139
140 // int init() { return init_done ; }
141 void init(unsigned int size_state, unsigned int size_measure, unsigned int n_signal);
142 void prediction();
143 void filtering(const vpColVector &z);
147 unsigned int getStateSize() { return size_state; }
151 unsigned int getMeasureSize() { return size_measure; }
155 unsigned int getNumberOfSignal() { return nsignal; }
159 long getIteration() { return iter; }
160
161#if (VISP_CXX_STANDARD > VISP_CXX_STANDARD_98)
163#endif
169 void verbose(bool on) { verbose_mode = on; }
170
171public:
186
189
197 double dt;
205
212
213protected:
220
223};
224END_VISP_NAMESPACE
225#endif
Implementation of column vector and the associated operations.
unsigned int size_state
Size of the state vector .
vpColVector Xpre
long iter
Filter step or iteration. When set to zero, initialize the filter.
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)
vpKalmanFilter & operator=(const vpKalmanFilter &)=default
vpKalmanFilter(const vpKalmanFilter &)=default
vpColVector Xest
unsigned int size_measure
Size of the measure vector .
unsigned int getNumberOfSignal()
virtual ~vpKalmanFilter()=default
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:175