jelfring/particle-filter-tutorial

Error in APF update

Closed this issue · 2 comments

Thanks for your great paper and this repo. Looks like you made a type-o in the APF update step at

likelihood = self.compute_likelihood(mu, measurements, landmarks) * par[0]

by multiplying the compute_likelihood by the previous weight par[0] to form the current tmp_likelihood estimate. As such, your temporary weight uses $w_{k-1}^2$ and your final weight is (with simplified notation) $\frac{p(x|y)}{w_{k-1}p(\mu|y}$.

Yes, you are right. The multiplication with par[0] is currently present twice and can be removed in line 78. Thanks for noticing. It would be great if you can create a pull request for fixing the typo.

I pushed the change to a local fork and make a pull request.