From 0be3ea3cf43e8109a74d7fbd60ac380591b989ee Mon Sep 17 00:00:00 2001 From: jennib3 Date: Fri, 24 May 2019 16:16:03 -0600 Subject: [PATCH] Update obstacle map to use appropriate base --- PathPlanning/AStar/a_star.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PathPlanning/AStar/a_star.py b/PathPlanning/AStar/a_star.py index 4498c751be..113031d54b 100644 --- a/PathPlanning/AStar/a_star.py +++ b/PathPlanning/AStar/a_star.py @@ -158,7 +158,7 @@ def calc_obstacle_map(ox, oy, reso, vr): for iox, ioy in zip(ox, oy): d = math.sqrt((iox - x)**2 + (ioy - y)**2) if d <= vr / reso: - obmap[ix][iy] = True + obmap[ix+minx][iy+miny] = True break return obmap, minx, miny, maxx, maxy, xwidth, ywidth