From 98c05192aa4e9f133ff9580792940cf838cedb39 Mon Sep 17 00:00:00 2001 From: pkwiecinski12 <72197165+pkwiecinski12@users.noreply.github.com> Date: Fri, 9 Apr 2021 17:55:38 -0500 Subject: [PATCH] Update vision.py Added robot location to obstacle location to reflect location with respect to arena. --- robot/vision.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/robot/vision.py b/robot/vision.py index 8fe821c..057e0de 100644 --- a/robot/vision.py +++ b/robot/vision.py @@ -184,7 +184,9 @@ def detect(self, theta): x = dist * math.sin(angle) y = dist * math.cos(angle) - # TODO: Add to robot.x and robot.y + #Add to robot location to obstacle location + x = self.x + x + y = self.y + y # Round x and y to nearest ROUND_TO x = math.floor(x / self.ROUND_TO) * self.ROUND_TO