From 7992dd00a0c6a4e9da5be4502d1152f221c3d895 Mon Sep 17 00:00:00 2001 From: Daniel Christoph <daniel.christoph@informatik.hu-berlin.de> Date: Thu, 19 Mar 2020 12:25:38 +0100 Subject: [PATCH] Replace location_monitor_node.py --- .../location_monitor/scripts/location_monitor_node.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/sim/location_monitor/scripts/location_monitor_node.py b/src/sim/location_monitor/scripts/location_monitor_node.py index a7dde16..cf86749 100755 --- a/src/sim/location_monitor/scripts/location_monitor_node.py +++ b/src/sim/location_monitor/scripts/location_monitor_node.py @@ -182,9 +182,9 @@ def objectWithRadiusDetection(radius, cordlist, l_x, l_y, simtime): global logger global SafeDist safedist = radius + SafeDist # Radius/Size + Bot front Rad + safe dist - rospy.loginfo("Safedist: " + str(safedist)) + rospy.loginfo("Safedist: " + str(SafeDist)) if WriteFlag == 0: - logger.info("Safedist.: " + str(safedist)) + logger.info("Safedist.: " + str(SafeDist)) lenght = len(cordlist) distList = [] @@ -212,10 +212,9 @@ def boxkdetection(size, cordlist, l_x, l_y, yaw_degrees, simtime): if WriteFlag == 0: logger.info("[T:" + str(simtime) + "] " + "Box Invalid (size > 5m)") else: - safedist = SafeDist - rospy.loginfo("Safedist: " + str(safedist)) + rospy.loginfo("Safedist: " + str(SafeDist)) if WriteFlag == 0: - logger.info("Safedist.: " + str(safedist)) + logger.info("Safedist.: " + str(SafeDist)) xR = l_x + size * math.cos(math.radians(yaw_degrees)) yL = l_y + size * math.sin(math.radians(yaw_degrees)) @@ -250,7 +249,7 @@ def boxkdetection(size, cordlist, l_x, l_y, yaw_degrees, simtime): if WriteFlag == 0: logger.info("[T:" + str(simtime) + "] " + "Dist. To nearest Bot Collision point: " + str(temp)) rospy.loginfo("Dist to collision point: " + str(temp)) - if temp < safedist: + if temp < SafeDist: rospy.loginfo("Collision!") if WriteFlag == 0: logger.info("[T:" + str(simtime) + "] " + "Collision!") -- GitLab