From b3aaf4048778be2b8742372b0e75c73892bff64a Mon Sep 17 00:00:00 2001 From: NikolajDanger Date: Mon, 10 Oct 2022 14:32:50 +0200 Subject: [PATCH] :sparkles: --- selflocalization/selflocalize.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/selflocalization/selflocalize.py b/selflocalization/selflocalize.py index b4e7850..aa0f6e8 100644 --- a/selflocalization/selflocalize.py +++ b/selflocalization/selflocalize.py @@ -254,7 +254,8 @@ try: particle.add_uncertainty(particles, SIGMA, SIGMA_THETA) est_pose = particle.estimate_pose(particles) # The estimate of the robots current pose calc_weight(est_pose, landmark_values) - print("est_pose weight: ", est_pose.weight) + if est_pose.weight > 10**-23: + break if showGUI: # Draw map