Random particle probability estimator. More...
#include <thrun_recovery_probability_estimator.hpp>
Public Member Functions | |
template<class Range > | |
constexpr double | operator() (Range &&range) |
Update the estimation based on a particle range. More... | |
constexpr void | reset () noexcept |
Reset the internal state of the estimator. More... | |
constexpr | ThrunRecoveryProbabilityEstimator (double alpha_slow, double alpha_fast) noexcept |
Constructor. More... | |
Private Attributes | |
ExponentialFilter | fast_filter_ |
Exponential filter for the short-term average. More... | |
ExponentialFilter | slow_filter_ |
Exponential filter for the long-term average. More... | |
Random particle probability estimator.
This class implements an estimator for what probability to use for injecting random particles (not sampled directly from the particle set) during the resampling step of a particle filter. The inclusion of random samples enhances the filter's ability to recover in case it converges to an incorrect estimate, thereby adding an extra layer of robustness.
This estimator averages the total weight of the particles and computes the ratio between a short-term and a long-term average over time.
See Probabilistic Robotics [thrun2005probabilistic], Chapter 8.3.3.
Definition at line 38 of file thrun_recovery_probability_estimator.hpp.
|
inlineconstexprnoexcept |
Constructor.
alpha_slow | Decay rate for the long-term average. |
alpha_fast | Decay rate for the short-term average. |
Definition at line 45 of file thrun_recovery_probability_estimator.hpp.
|
inlineconstexpr |
Update the estimation based on a particle range.
range | A range containing particles. |
Definition at line 67 of file thrun_recovery_probability_estimator.hpp.
|
inlineconstexprnoexcept |
Reset the internal state of the estimator.
It is recommended to reset the estimator after injecting random particles to avoid spiraling off into complete randomness.
Definition at line 56 of file thrun_recovery_probability_estimator.hpp.
|
private |
Exponential filter for the short-term average.
Definition at line 91 of file thrun_recovery_probability_estimator.hpp.
|
private |
Exponential filter for the long-term average.
Definition at line 90 of file thrun_recovery_probability_estimator.hpp.