Resurgence (PY2022)
Codebase for the Husky Robotics 2021-2022 rover Resurgence
Loading...
Searching...
No Matches
filters::statespace::NoiseCovMat< stateDim, size, paramSize > Class Template Reference

Represents a square noise covariance matrix. More...

#include <StateSpaceUtil.h>

Public Types

using state_t = Eigen::Matrix<double, stateDim, 1>
 
using param_t = Eigen::Matrix<double, paramSize, 1>
 

Public Member Functions

 NoiseCovMat (const Eigen::Matrix< double, size, 1 > &stdDevs)
 Create a time-invariant noise covariance matrix modelling independent noise with the given standard deviations.
 
 NoiseCovMat (const Eigen::Matrix< double, size, size > &mat)
 Create a time-invariant noise covariance matrix equal to the given matrix.
 
 NoiseCovMat (const std::function< Eigen::Matrix< double, size, size >(const state_t &, const param_t &)> &func)
 Create a time-varying noise covariance matrix.
 
Eigen::Matrix< double, size, sizeget (const state_t &x, const param_t &param)
 Gets the noise covariance matrix, given the current state and additonal parameter.
 

Detailed Description

template<int stateDim, int size, int paramSize>
class filters::statespace::NoiseCovMat< stateDim, size, paramSize >

Represents a square noise covariance matrix.

Returning the zero matrix can sometimes be dangerous depending on your model, as it may cause numerical instability or incorrect computations.

Template Parameters
stateDimThe dimension of the state space for this system. This is the number of elements in the state vector.
sizeThe size of this matrix.
paramSizeThe dimension of the vector accepted by get() in addition to a state vector.

Constructor & Destructor Documentation

◆ NoiseCovMat() [1/3]

template<int stateDim, int size, int paramSize>
filters::statespace::NoiseCovMat< stateDim, size, paramSize >::NoiseCovMat ( const Eigen::Matrix< double, size, 1 > & stdDevs)
inlineexplicit

Create a time-invariant noise covariance matrix modelling independent noise with the given standard deviations.

Parameters
stdDevsThe standard deviations of each element.

◆ NoiseCovMat() [2/3]

template<int stateDim, int size, int paramSize>
filters::statespace::NoiseCovMat< stateDim, size, paramSize >::NoiseCovMat ( const Eigen::Matrix< double, size, size > & mat)
inline

Create a time-invariant noise covariance matrix equal to the given matrix.

Parameters
matThe noise covariance matrix.

◆ NoiseCovMat() [3/3]

template<int stateDim, int size, int paramSize>
filters::statespace::NoiseCovMat< stateDim, size, paramSize >::NoiseCovMat ( const std::function< Eigen::Matrix< double, size, size >(const state_t &, const param_t &)> & func)
inline

Create a time-varying noise covariance matrix.

At runtime, the matrix will be calculated when needed using the supplied function.

Parameters
funcThe function that supplies the noise covariance matrix, given the state vector and one additional vector. For process noise, this is usually the input vector. For output noise, this is usually the output vector.

Member Function Documentation

◆ get()

template<int stateDim, int size, int paramSize>
Eigen::MatrixXd filters::statespace::NoiseCovMat< stateDim, size, paramSize >::get ( const state_t & x,
const param_t & param )
inline

Gets the noise covariance matrix, given the current state and additonal parameter.

The matrix may be time-invariant, which case the values of x and param do not matter.

Parameters
xThe current state vector.
paramThe parameter vector, as defined by the use of this matrix. For process noise, this is usually the input vector. For output noise this is usually the output vector.
Returns
The noise covariance matrix.

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