mrs_lib
Various reusable classes, functions and utilities for use in MRS projects
|
Public Types | |
using | Base_class = UKF< n, m, p > |
using | x_t = typename Base_class::x_t |
using | u_t = typename Base_class::u_t |
using | z_t = typename Base_class::z_t |
using | P_t = typename Base_class::P_t |
using | R_t = typename Base_class::R_t |
using | Q_t = typename Base_class::Q_t |
using | statecov_t = typename Base_class::statecov_t |
using | transition_model_t = typename Base_class::transition_model_t |
using | observation_model_t = typename Base_class::observation_model_t |
using | X_t = typename Base_class::X_t |
using | Z_t = typename Base_class::Z_t |
using | Pzz_t = typename Base_class::Pzz_t |
using | K_t = typename Base_class::K_t |
Public Types inherited from mrs_lib::UKF< n_states, n_inputs, n_measurements > | |
using | x_t = typename Base_class::x_t |
state vector n*1 typedef | |
using | u_t = typename Base_class::u_t |
input vector m*1 typedef | |
using | z_t = typename Base_class::z_t |
measurement vector p*1 typedef | |
using | P_t = typename Base_class::P_t |
state covariance n*n typedef | |
using | R_t = typename Base_class::R_t |
measurement covariance p*p typedef | |
using | Q_t = typename Base_class::Q_t |
process covariance n*n typedef | |
using | W_t = typename Eigen::Matrix< double, w, 1 > |
weights vector (2n+1)*1 typedef | |
using | statecov_t = typename Base_class::statecov_t |
typedef of a helper struct for state and covariance | |
using | transition_model_t = typename std::function< x_t(const x_t &, const u_t &, double)> |
function of the state transition model typedef | |
using | observation_model_t = typename std::function< z_t(const x_t &)> |
function of the observation model typedef | |
Public Member Functions | |
NCUKF (const transition_model_t &transition_model, const observation_model_t &observation_model, const double l, const double alpha=1e-3, const double kappa=1, const double beta=2) | |
virtual statecov_t | correct (const statecov_t &sc, const z_t &z, const R_t &R) const override |
Implements the state correction step (measurement update). More... | |
Public Member Functions inherited from mrs_lib::UKF< n_states, n_inputs, n_measurements > | |
UKF () | |
Convenience default constructor. More... | |
UKF (const transition_model_t &transition_model, const observation_model_t &observation_model, const double alpha=1e-3, const double kappa=1, const double beta=2) | |
The main constructor. More... | |
virtual statecov_t | predict (const statecov_t &sc, const u_t &u, const Q_t &Q, double dt) const override |
Implements the state prediction step (time update). More... | |
void | setConstants (const double alpha, const double kappa, const double beta) |
Changes the Unscented Transform parameters. More... | |
void | setTransitionModel (const transition_model_t &transition_model) |
Changes the transition model function. More... | |
void | setObservationModel (const observation_model_t &observation_model) |
Changes the observation model function. More... | |
Static Public Attributes | |
static const int | n = n_states |
static const int | m = n_inputs |
static const int | p = n_measurements |
Protected Member Functions | |
virtual K_t | computeKalmanGain (const x_t &x, const z_t &inn, const K_t &Pxz, const Pzz_t &Pzz) const override |
Protected Member Functions inherited from mrs_lib::UKF< n_states, n_inputs, n_measurements > | |
void | computeWeights () |
X_t | computeSigmas (const x_t &x, const P_t &P) const |
P_t | computePaSqrt (const P_t &P) const |
Pzz_t | computeInverse (const Pzz_t &Pzz) const |
virtual K_t | computeKalmanGain ([[maybe_unused]] const x_t &x, [[maybe_unused]] const z_t &inn, const K_t &Pxz, const Pzz_t &Pzz) const |
Protected Attributes | |
double | l |
Protected Attributes inherited from mrs_lib::UKF< n_states, n_inputs, n_measurements > | |
double | m_alpha |
double | m_kappa |
double | m_beta |
double | m_lambda |
W_t | m_Wm |
W_t | m_Wc |
transition_model_t | m_transition_model |
observation_model_t | m_observation_model |
Additional Inherited Members | |
Protected Types inherited from mrs_lib::UKF< n_states, n_inputs, n_measurements > | |
using | Base_class = KalmanFilter< n, m, p > |
Base class of this class. | |
using | X_t = typename Eigen::Matrix< double, n, w > |
State sigma points matrix. | |
using | Z_t = typename Eigen::Matrix< double, p, w > |
Measurement sigma points matrix. | |
using | Pzz_t = typename Eigen::Matrix< double, p, p > |
Pzz helper matrix. | |
using | K_t = typename Eigen::Matrix< double, n, p > |
Kalman gain matrix. | |
Static Protected Attributes inherited from mrs_lib::UKF< n_states, n_inputs, n_measurements > | |
static constexpr int | n = n_states |
Length of the state vector of the system. | |
static constexpr int | m = n_inputs |
Length of the input vector of the system. | |
static constexpr int | p = n_measurements |
Length of the measurement vector of the system. | |
static constexpr int | w = 2 * n + 1 |
Number of sigma points/weights. | |
|
inlineoverridevirtual |
Implements the state correction step (measurement update).
sc | Previous estimate of the state and covariance. |
z | Measurement vector. |
R | Measurement covariance matrix. |
Reimplemented from mrs_lib::UKF< n_states, n_inputs, n_measurements >.