You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bidirectional A* raises AttributeError when the goal is unreachable #1504
BidirectionalAStarPlanner.planning in PathPlanning/BidirectionalAStar/bidirectional_a_star.py raises AttributeError: 'NoneType' object has no attribute 'x' when the goal cannot be reached.
When either open set is exhausted the loop prints "Open set A/B is empty.." and breaks, but meet_point_A / meet_point_B are still None, so calc_final_bidirectional_path -> calc_final_path fails on goal_node.x.
Reproduce
fromPathPlanning.BidirectionalAStarimportbidirectional_a_starasmm.show_animation=False# square boundary 0..10 with an inner wall at x = 5ox, oy= [], []
foriinrange(11):
ox+= [0.0, 10.0, float(i), float(i), 5.0]
oy+= [float(i), float(i), 0.0, 10.0, float(i)]
planner=m.BidirectionalAStarPlanner(ox, oy, 1.0, 0.5)
planner.planning(2.0, 5.0, 8.0, 5.0) # AttributeError: 'NoneType' object has no attribute 'x'
Expected
Return empty lists [], [] when no path exists, consistent with the proposed Dijkstra fix in #1418.
There is also currently no test file for bidirectional A* under tests/.
Activity