From 64d548ddfa071534321454db0f14633870983ebb Mon Sep 17 00:00:00 2001 From: Frederikke Levinsen Date: Wed, 12 Oct 2022 13:23:20 +0200 Subject: [PATCH] :water: --- occupancy_grids.py | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) 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