diff --git a/Simulation/location_monitor/scripts/location_monitor_node.py b/Simulation/location_monitor/scripts/location_monitor_node.py deleted file mode 100644 index 850f2d7e297118c6a72509f5452913b2f2a5914d..0000000000000000000000000000000000000000 --- a/Simulation/location_monitor/scripts/location_monitor_node.py +++ /dev/null @@ -1,35 +0,0 @@ -#!/usr/bin/env python - -import math -import rospy -from nav_msgs.msg import Odometry - -ob = [] -ob.append((0.00 , -0.70)); #Beispeiele, befinden sich auf der X Linie -ob.append((0.00 , 0.00)); -ob.append((0.00 , 0.80)); - -def distance(x1, y1, x2, y2): - xd = x1 - x2 - yd = y1 - y2 - return math.sqrt(xd*xd + yd*yd) - - -def callback(msg): - x = msg.pose.pose.position.x - y = msg.pose.pose.position.y - - - for l_x, l_y in ob: - dist = distance(x, y, l_x, l_y) - if dist < 0.20: #muss individuell angepasst wreden - rospy.loginfo("Collision!") - - -def main(): - rospy.init_node('location_monitor') - rospy.Subscriber("/odom", Odometry, callback) - rospy.spin() - -if __name__ == '__main__': - main()