diff --git a/occupancy_grids.py b/occupancy_grids.py index 32504ed..bb26a7b 100644 --- a/occupancy_grids.py +++ b/occupancy_grids.py @@ -1,3 +1,22 @@ -def yea (awesomeness): - jeg_er = awesomeness - return jeg_er \ No newline at end of file +from matplotlib.backend_bases import NonGuiException +import matplotlib.pyplot as plt +import numpy as np +from numpy.random import uniform + + +def Binary_Baye_Filter (I, zt, x): + It = I + log()/log() + return jeg_er + +def invserse_sensor_model(m, x, z): + noget = noget + return noget + + +def update(particles, weights, z, R, landmarks): + for i, landmark in enumerate(landmarks): + distance = np.linalg.norm(particles[:, 0:2] - landmark, axis=1) + weights *= np.scipy.stats.norm(distance, R).pdf(z[i]) + + weights += 1.e-300 # avoid round-off to zero + weights /= sum(weights) # normalize \ No newline at end of file