Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AMCL pf_resample_limit returns max_samples for k=1 #1159

Open
christofschroeter opened this issue Aug 13, 2021 · 0 comments
Open

AMCL pf_resample_limit returns max_samples for k=1 #1159

christofschroeter opened this issue Aug 13, 2021 · 0 comments

Comments

@christofschroeter
Copy link
Contributor

The function pf_resample_limit implements the adaptive particle number for the particle filter, following Dieter Fox' paper "KLD-Sampling: Adaptive Particle Filters".

It takes as input a number k of supported bins, and computes the number of required particles, basically following eq. (7) from the paper. However, the equation cannot calculate a valid value for k=1 (because of division by k-1).
In the code, the case k=1 is handled specifically, returning max_samples.

I don't think that is a good handling of that case. For k>1, the calculated particle limit increases with k. k=1 actually means the lowest possible uncertainty estimate. It doesn't seem to make any sense to use the lowest number of particles for k=2 supported bins, but when the number of supported bins is further reduced to 1, suddenly the filter increases the number of particles to max.

Since the formula cannot handle a value of k=1, my suggestion would be to calculate with k=2 when the input parameter k is given as 1. That would seem like a slight overestimation of uncertainty, but much less than just returning max_samples.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant