Greedy Best-First Search (#315)

This commit is contained in:
Erwin Lejeune
2020-05-05 07:06:01 +02:00
committed by GitHub
parent ab49acb1ac
commit 734f3aed20
5 changed files with 326 additions and 46 deletions

View File

@@ -81,8 +81,9 @@ class DepthFirstSearchPlanner:
self.calc_grid_position(current.y, self.miny), "xc")
# for stopping simulation with the esc key.
plt.gcf().canvas.mpl_connect('key_release_event',
lambda event: [exit(
0) if event.key == 'escape' else None])
lambda event:
[exit(0) if event.key == 'escape'
else None])
plt.pause(0.01)
if current.x == ngoal.x and current.y == ngoal.y:
@@ -213,7 +214,7 @@ def main():
grid_size = 2.0 # [m]
robot_radius = 1.0 # [m]
# set obstable positions
# set obstacle positions
ox, oy = [], []
for i in range(-10, 60):
ox.append(i)