2D-Grid-SLAM
2D-Grid-SLAM copied to clipboard
Crash
I've simply dowloaded the code and tried to run it but i don't understand what it should do, as soon as the two images appear and i press w,a,s,d or i,j,k,l the program closes itself with this error:
C:....\2D-Grid-SLAM-master\ParticleFilter.py:130: RuntimeWarning: invalid value encountered in true_divide
self.weights = field / np.sum(field)
Traceback (most recent call last):
File "test.py", line 123, in
Can you describe your environment in detail ?
in ParticleFilter.py modify as follow: if np.sum(field)!= 0: self.weights = field / np.sum(field)
ParticleFilter.py , line 113 self.weights[np.isnan(self.weights)] = 1 / len(self.weights) re_id = np.random.choice(self.size, self.size, p=list(self.weights))