Resurgence (PY2022)
Codebase for the Husky Robotics 2021-2022 rover Resurgence
Loading...
Searching...
No Matches
filters::Output Class Reference

Represent an output for a system. More...

#include <MultiSensorEKF.h>

Collaboration diagram for filters::Output:

Public Types

using outputfunc_t
 

Public Member Functions

 Output (int stateDim, int outputDim, int outputNoiseDim, const outputfunc_t &outputFunc, const statespace::NoiseCovMatX &covMat)
 Create an output for a model.
 
Eigen::MatrixXd outputFuncJacobianX (const Eigen::VectorXd &state)
 Calculate the output function jacobian at the given state wrt state.
 
Eigen::MatrixXd outputFuncJacobianV (const Eigen::VectorXd &state)
 Calculate the output function jacobian at the given state wrt the output noise.
 
Eigen::VectorXd getOutput (const Eigen::VectorXd &state)
 Evaluate the output function at the given state.
 
void setOutputFuncJacobianX (const std::function< Eigen::MatrixXd(const Eigen::VectorXd &, const Eigen::VectorXd &)> &jacobianX)
 Set an analytic solution to dh/dx.
 
void setOutputFuncJacobianV (const std::function< Eigen::MatrixXd(const Eigen::VectorXd &, const Eigen::VectorXd &)> &jacobianV)
 Set an analytic solution to dh/dv.
 

Public Attributes

const int stateDim
 
const int outputDim
 
const int outputNoiseDim
 
const outputfunc_t outputFunc
 
const statespace::NoiseCovMatX covMat
 

Detailed Description

Represent an output for a system.

This represents a sensor.

Member Typedef Documentation

◆ outputfunc_t

using filters::Output::outputfunc_t
Initial value:
std::function<Eigen::VectorXd(const Eigen::VectorXd&, const Eigen::VectorXd&)>

Constructor & Destructor Documentation

◆ Output()

filters::Output::Output ( int stateDim,
int outputDim,
int outputNoiseDim,
const outputfunc_t & outputFunc,
const statespace::NoiseCovMatX & covMat )
inline

Create an output for a model.

Parameters
stateDimThe dimension of the state vector.
outputDimThe dimension of the output vector (measurement).
outputNoiseDimThe dimension of the noise applied to the output.
outputFuncThe output function that takes a state vector and output noise vector and produces an output vector.
covMatThe covariance matrix of the output noise vector. The state dimension must be statedim, the parameter size must outputDim and the size must be outputnoiseDim

Member Function Documentation

◆ getOutput()

Eigen::VectorXd filters::Output::getOutput ( const Eigen::VectorXd & state)
inline

Evaluate the output function at the given state.

Parameters
stateThe state vector to evaluate at.
Returns
Eigen::VectorXd An output vector of dimension outputDim.

◆ outputFuncJacobianV()

Eigen::MatrixXd filters::Output::outputFuncJacobianV ( const Eigen::VectorXd & state)
inline

Calculate the output function jacobian at the given state wrt the output noise.

If an analytic solution has been provided, the jacobian is calculated using that. Otherwise, it is numerically approximated using the output function.

Parameters
stateThe state to evaluate the jacobian at.
Returns
Eigen::MatrixXd The outputDim x processNoiseDim jacobian matrix.

◆ outputFuncJacobianX()

Eigen::MatrixXd filters::Output::outputFuncJacobianX ( const Eigen::VectorXd & state)
inline

Calculate the output function jacobian at the given state wrt state.

If an analytic solution has been provided, the jacobian is calculated using that. Otherwise, it is numerically approximated using the output function.

Parameters
stateThe state to evaluate the jacobian at.
Returns
Eigen::MatrixXd The outputDim x stateDim jacobian matrix.

◆ setOutputFuncJacobianV()

void filters::Output::setOutputFuncJacobianV ( const std::function< Eigen::MatrixXd(const Eigen::VectorXd &, const Eigen::VectorXd &)> & jacobianV)
inline

Set an analytic solution to dh/dv.

Behavior is undefined if the supplied functions do not accept or return vectors/matrices of the correct dimensions.

Parameters
jacobianVThe analytic solution to dh/dv. The jacobian function takes a state vector and an output noise vector and returns a outputDim x outputNoiseDim jacobian matrix.
Warning
Behavior is undefined if the supplied functions do not accept or return vectors/matrices of the correct dimensions.

◆ setOutputFuncJacobianX()

void filters::Output::setOutputFuncJacobianX ( const std::function< Eigen::MatrixXd(const Eigen::VectorXd &, const Eigen::VectorXd &)> & jacobianX)
inline

Set an analytic solution to dh/dx.

Behavior is undefined if the supplied functions do not accept or return vectors/matrices of the correct dimensions.

Parameters
jacobianVThe analytic solution to dh/dx. The jacobian function takes a state vector and an output noise vector and returns a outputDim x stateDim jacobian matrix.
Warning
Behavior is undefined if the supplied functions do not accept or return vectors/matrices of the correct dimensions.

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