Kalman-and-Bayesian-Filters-in-Python icon indicating copy to clipboard operation
Kalman-and-Bayesian-Filters-in-Python copied to clipboard

Chapter 12 Complete example prediction

Open dimidagd opened this issue 6 years ago • 1 comments

Prediction line: predict(particles, u=(0.00, 1.414), std=(.2, .05))

When you propagate the particles diagonally to (x+1,x+1) , shouldn't you issue a prediction with an input argument u = (np.pi/4 , 1.414) in the first iteration?

I understand that the filter is robust enough to manage to converge, but I feel that this solution is pushing towards degeneracy, and for instructional purposes the initial rotation should be included.

dimidagd avatar Apr 17 '19 00:04 dimidagd

You can't really do that. The particles are created with completely random headings from [0, 2pi) via the call to create_uniform_particles. Adding 45 degrees just rotates that random heading for every particle, which is pointless at this point.

Now, if you have better knowledge about the robots behavior it may make sense to generate particles with a narrower range of headings, maybe from 30 to 60 degrees or something.

I probably won't update this with a further example, but I'll leave this open as a reminder to myself.

rlabbe avatar May 04 '20 23:05 rlabbe