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

8.2.8 Implement the Filter

Open iassenev opened this issue 2 years ago • 3 comments

There is no figure, just the following traceback:

ValueError Traceback (most recent call last) in 32 # run filter 33 robot_tracker = tracker1() ---> 34 mu, cov, _, _ = robot_tracker.batch_filter(zs) 35 36 for x, P in zip(mu, cov): C:\pcloud\filterpy\filterpy\kalman\kalman_filter.py in batch_filter(self, zs, Fs, Qs, Hs, Rs, Bs, us, update_first, saver) 918

8.2. TRACKING A ROBOT 267 919 self.update(z, R=R, H=H) --> 920 means[i, :] = self.x 921 covariances[i, :, :] = self.P 922

ValueError: could not broadcast input array from shape (4,2) into shape (4,1)

iassenev avatar Mar 14 '23 10:03 iassenev

The code runs correctly in the master branch. I've just tested it and it's okay. image

MuhammedM294 avatar Mar 29 '23 00:03 MuhammedM294

I read the book via this link https://drive.google.com/file/d/0By_SW19c1BfhSVFzNHc0SjduNzg/view?usp=sharing&resourcekey=0-41olC9ht9xE3wQe2zHZ45A

iassenev avatar Mar 29 '23 07:03 iassenev

Same error, after self.update(z, R=R, H=H), the self.x's get another column with all negative values, not sure what the new column represents.

ivaquero avatar Nov 02 '23 07:11 ivaquero