mirror of
https://github.com/AtsushiSakai/PythonRobotics.git
synced 2026-04-22 03:00:22 -04:00
fix behavior when path is not found (#1104)
This commit is contained in:
@@ -97,7 +97,7 @@ def pi_2_pi(angle):
|
||||
def move(x, y, yaw, distance, steer, L=WB):
|
||||
x += distance * cos(yaw)
|
||||
y += distance * sin(yaw)
|
||||
yaw += pi_2_pi(distance * tan(steer) / L) # distance/2
|
||||
yaw = pi_2_pi(yaw + distance * tan(steer) / L) # distance/2
|
||||
|
||||
return x, y, yaw
|
||||
|
||||
|
||||
@@ -282,7 +282,7 @@ def hybrid_a_star_planning(start, goal, ox, oy, xy_resolution, yaw_resolution):
|
||||
while True:
|
||||
if not openList:
|
||||
print("Error: Cannot find path, No open set")
|
||||
return [], [], []
|
||||
return Path([], [], [], [], 0)
|
||||
|
||||
cost, c_id = heapq.heappop(pq)
|
||||
if c_id in openList:
|
||||
|
||||
Reference in New Issue
Block a user