Resurgence (PY2022)
Codebase for the Husky Robotics 2021-2022 rover Resurgence
Loading...
Searching...
No Matches
filters::KalmanFilterBase< stateDim, inputDim > Class Template Referenceabstract

Base class for Kalman Filters. More...

#include <KalmanFilterBase.h>

Inheritance diagram for filters::KalmanFilterBase< stateDim, inputDim >:
Collaboration diagram for filters::KalmanFilterBase< stateDim, inputDim >:

Public Member Functions

virtual void predict (const Eigen::Matrix< double, inputDim, 1 > &input)=0
 Use the model to predict the next system state, given the current inputs.
 
void reset ()
 Reset the filter.
 
void reset (const Eigen::Matrix< double, stateDim, 1 > &state)
 Reset the filter.
 
void reset (const Eigen::Matrix< double, stateDim, 1 > &state, const Eigen::Matrix< double, stateDim, 1 > &stdDevs)
 Reset the filter.
 
void reset (const Eigen::Matrix< double, stateDim, 1 > &state, const Eigen::Matrix< double, stateDim, stateDim > &estCovMat)
 Reset the filter.
 
Eigen::Matrix< double, stateDim, 1 > getState () const
 Gets the current state estimate.
 
Eigen::Matrix< double, stateDim, stateDim > getEstimateCovarianceMat () const
 Get the current estimate covariance matrix.
 

Protected Attributes

Eigen::Matrix< double, stateDim, stateDim > P
 
Eigen::Matrix< double, stateDim, 1 > xHat
 

Detailed Description

template<int stateDim, int inputDim>
class filters::KalmanFilterBase< stateDim, inputDim >

Base class for Kalman Filters.

Template Parameters
stateDimThe dimension of the state vector.
inputDimThe dimension of the input vector, or system actions.

Member Function Documentation

◆ getEstimateCovarianceMat()

template<int stateDim, int inputDim>
Eigen::Matrix< double, stateDim, stateDim > filters::KalmanFilterBase< stateDim, inputDim >::getEstimateCovarianceMat ( ) const
inline

Get the current estimate covariance matrix.

This is an indication of the uncertainty of the pose estimate.

Returns
The estimate covariance matrix, AKA the P matrix.

◆ getState()

template<int stateDim, int inputDim>
Eigen::Matrix< double, stateDim, 1 > filters::KalmanFilterBase< stateDim, inputDim >::getState ( ) const
inline

Gets the current state estimate.

Returns
The state estimate.

◆ predict()

template<int stateDim, int inputDim>
virtual void filters::KalmanFilterBase< stateDim, inputDim >::predict ( const Eigen::Matrix< double, inputDim, 1 > & input)
pure virtual

Use the model to predict the next system state, given the current inputs.

Parameters
inputThe current inputs to the system.

Implemented in filters::ExtendedKalmanFilter< stateDim, inputDim, outputDim, processNoiseDim, outputNoiseDim >, and filters::KalmanFilter< stateDim, inputDim, outputDim >.

◆ reset() [1/4]

template<int stateDim, int inputDim>
void filters::KalmanFilterBase< stateDim, inputDim >::reset ( )
inline

Reset the filter.

Sets the state estimate to the zero vector and resets the estimate covariance matrix to a diagonal matrix with large values.

◆ reset() [2/4]

template<int stateDim, int inputDim>
void filters::KalmanFilterBase< stateDim, inputDim >::reset ( const Eigen::Matrix< double, stateDim, 1 > & state)
inline

Reset the filter.

Sets the state estimate to the supplied vector and resets the estimate covariance matrix to a diagonal matrix with large values.

Parameters
stateThe state to which the state estimate will be set.

◆ reset() [3/4]

template<int stateDim, int inputDim>
void filters::KalmanFilterBase< stateDim, inputDim >::reset ( const Eigen::Matrix< double, stateDim, 1 > & state,
const Eigen::Matrix< double, stateDim, 1 > & stdDevs )
inline

Reset the filter.

Sets the state estimate to the supplied vector with the given uncertainty.

Parameters
stateThe state to set the vector to.
stdDevsThe standard deviation of the measurement of each element in the state vector. This should not be the zero vector. If you want to represent high certainty, use very small values instead.

◆ reset() [4/4]

template<int stateDim, int inputDim>
void filters::KalmanFilterBase< stateDim, inputDim >::reset ( const Eigen::Matrix< double, stateDim, 1 > & state,
const Eigen::Matrix< double, stateDim, stateDim > & estCovMat )
inline

Reset the filter.

Sets the state estimate to the supplied vector and the estimate covariance matrix to the supplied matrix.

Parameters
stateThe state to set the vector to.
estCovMatThe matrix to set the estimate covariance matrix to. This should not be the zero matrix. If you want to represent high certainty, use a diagonal matrix with very small values.

The documentation for this class was generated from the following file: