Skip to content

Commit b137ba1

Browse files
authored
fix behavior when path is not found (#1104)
1 parent b5988db commit b137ba1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

PathPlanning/HybridAStar/car.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def pi_2_pi(angle):
9797
def move(x, y, yaw, distance, steer, L=WB):
9898
x += distance * cos(yaw)
9999
y += distance * sin(yaw)
100-
yaw += pi_2_pi(distance * tan(steer) / L) # distance/2
100+
yaw = pi_2_pi(yaw + distance * tan(steer) / L) # distance/2
101101

102102
return x, y, yaw
103103

PathPlanning/HybridAStar/hybrid_a_star.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ def hybrid_a_star_planning(start, goal, ox, oy, xy_resolution, yaw_resolution):
282282
while True:
283283
if not openList:
284284
print("Error: Cannot find path, No open set")
285-
return [], [], []
285+
return Path([], [], [], [], 0)
286286

287287
cost, c_id = heapq.heappop(pq)
288288
if c_id in openList:

0 commit comments

Comments
 (0)