Bayes Filters Library
sigma_point.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2016-2019 Istituto Italiano di Tecnologia (IIT)
3  *
4  * This software may be modified and distributed under the terms of the
5  * BSD 3-Clause license. See the accompanying LICENSE file for details.
6  */
7 
8 #ifndef SIGMAPOINT_H
9 #define SIGMAPOINT_H
10 
13 #include <BayesFilters/Data.h>
19 
20 #include <functional>
21 
22 #include <Eigen/Dense>
23 
24 
25 namespace bfl
26 {
27 namespace sigma_point
28 {
35  using FunctionEvaluation = std::function<std::tuple<bool, bfl::Data, bfl::VectorDescription>(const Eigen::Ref<const Eigen::MatrixXd>&)>;
36 
37  struct UTWeight
38  {
39  Eigen::VectorXd mean;
40 
41  Eigen::VectorXd covariance;
42 
46  double c;
47 
51  UTWeight(std::size_t dof, const double alpha, const double beta, const double kappa);
52 
57  UTWeight(const VectorDescription& vector_description, const double alpha, const double beta, const double kappa);
58  };
59 
60  void unscented_weights(const std::size_t n, const double alpha, const double beta, const double kappa, Eigen::Ref<Eigen::VectorXd> weight_mean, Eigen::Ref<Eigen::VectorXd> weight_covariance, double& c);
61 
62  Eigen::MatrixXd sigma_point(const GaussianMixture& state, const double c);
63 
64  std::tuple<bool, GaussianMixture, Eigen::MatrixXd> unscented_transform(const GaussianMixture& input, const UTWeight& weight, FunctionEvaluation function);
65 
66  std::pair<GaussianMixture, Eigen::MatrixXd> unscented_transform(const GaussianMixture& state, const UTWeight& weight, StateModel& state_model);
67 
68  std::pair<GaussianMixture, Eigen::MatrixXd> unscented_transform(const GaussianMixture& state, const UTWeight& weight, AdditiveStateModel& state_model);
69 
70  std::tuple<bool, GaussianMixture, Eigen::MatrixXd> unscented_transform(const GaussianMixture& state, const UTWeight& weight, MeasurementModel& meas_model);
71 
72  std::tuple<bool, GaussianMixture, Eigen::MatrixXd> unscented_transform(const GaussianMixture& state, const UTWeight& weight, AdditiveMeasurementModel& meas_model);
73 }
74 }
75 
76 #endif /* SIGMAPOINT_H */
StateModel.h
MeasurementModel.h
bfl::sigma_point::UTWeight::c
double c
c = sqrt(n + lambda) with lambda a ut parameter.
Definition: sigma_point.h:46
bfl
Port of boost::any for C++11 compilers.
Definition: AdditiveMeasurementModel.h:13
AdditiveStateModel.h
bfl::sigma_point::sigma_point
Eigen::MatrixXd sigma_point(const GaussianMixture &state, const double c)
Definition: sigma_point.cpp:84
bfl::sigma_point::unscented_transform
std::tuple< bool, GaussianMixture, Eigen::MatrixXd > unscented_transform(const GaussianMixture &input, const UTWeight &weight, FunctionEvaluation function)
Definition: sigma_point.cpp:126
bfl::sigma_point::UTWeight
Definition: sigma_point.h:37
GaussianMixture.h
VectorDescription.h
bfl::sigma_point::UTWeight::UTWeight
UTWeight(std::size_t dof, const double alpha, const double beta, const double kappa)
Constructs the weights from number of degrees of freedom of the input space and UT parameters alpha,...
Definition: sigma_point.cpp:22
bfl::AdditiveMeasurementModel
This class represent an additive measurement model f(x) + w, where x is a state vector and w is rando...
Definition: AdditiveMeasurementModel.h:21
bfl::StateModel
Definition: StateModel.h:22
bfl::MeasurementModel
This class represent a generic measurement model f(x, w), where x is a state vector and w is random n...
Definition: MeasurementModel.h:29
ExogenousModel.h
bfl::sigma_point::unscented_weights
void unscented_weights(const std::size_t n, const double alpha, const double beta, const double kappa, Eigen::Ref< Eigen::VectorXd > weight_mean, Eigen::Ref< Eigen::VectorXd > weight_covariance, double &c)
bfl::AdditiveStateModel
Definition: AdditiveStateModel.h:19
bfl::sigma_point::UTWeight::covariance
Eigen::VectorXd covariance
Definition: sigma_point.h:41
bfl::sigma_point::UTWeight::mean
Eigen::VectorXd mean
Definition: sigma_point.h:39
AdditiveMeasurementModel.h
Data.h
bfl::sigma_point::FunctionEvaluation
std::function< std::tuple< bool, bfl::Data, bfl::VectorDescription >(const Eigen::Ref< const Eigen::MatrixXd > &)> FunctionEvaluation
A FunctionEvaluation return.
Definition: sigma_point.h:35
bfl::GaussianMixture
Definition: GaussianMixture.h:20
bfl::VectorDescription
Definition: VectorDescription.h:18