From 1ae645ac2dfbf2b0a8bf5b703426cc676731829b Mon Sep 17 00:00:00 2001
From: Daniel Christoph <daniel.christoph@informatik.hu-berlin.de>
Date: Tue, 14 Jan 2020 20:27:41 +0100
Subject: [PATCH] Replace location_monitor_node.py

---
 .../location_monitor/scripts/location_monitor_node.py | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/Simulation/location_monitor/scripts/location_monitor_node.py b/Simulation/location_monitor/scripts/location_monitor_node.py
index 3f52696..4eafffa 100644
--- a/Simulation/location_monitor/scripts/location_monitor_node.py
+++ b/Simulation/location_monitor/scripts/location_monitor_node.py
@@ -111,8 +111,15 @@ def distance(x1, y1, x2, y2):
 
 
 def boxkdetection(size, botx, boty, l_x, l_y, simtime):
-  global f
-  global WriteFlag
+ global f
+ global WriteFlag
+ if (size*2.0) > 0.5:
+   print("Box to big, > 0.5")
+   if WriteFlag == 0:
+      f.write("[T:" + str(simtime) + "] " + "Box Invalid (size < 0.5)" + "\n")
+      f.close
+ else:
+  print("SIZEBOX" + str(size))
   cornerdist = (size)/math.sin(math.radians(45))
   safedist = TurtlebotBurger
   #print("Safe " + str(safedist))
-- 
GitLab