fix added for checking if a neighbor is inside openList (#832)

This commit is contained in:
Erkam Kavak
2023-05-16 15:42:18 +03:00
committed by GitHub
parent 29e0bab4e7
commit dd6d046bf9

View File

@@ -311,7 +311,7 @@ def hybrid_a_star_planning(start, goal, ox, oy, xy_resolution, yaw_resolution):
neighbor_index = calc_index(neighbor, config)
if neighbor_index in closedList:
continue
if neighbor not in openList \
if neighbor_index not in openList \
or openList[neighbor_index].cost > neighbor.cost:
heapq.heappush(
pq, (calc_cost(neighbor, h_dp, config),