Class ThrunRecoveryProbabilityEstimator

Class Documentation

class ThrunRecoveryProbabilityEstimator

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.

Public Functions

inline constexpr ThrunRecoveryProbabilityEstimator(double alpha_slow, double alpha_fast) noexcept

Constructor.

Parameters:
  • alpha_slow – Decay rate for the long-term average.

  • alpha_fast – Decay rate for the short-term average.

inline constexpr void reset() noexcept

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.

template<class Range>
inline constexpr double operator()(Range &&range)

Update the estimation based on a particle range.

Parameters:

range – A range containing particles.

Returns:

The estimated random state probability to be used by the particle filter.