Skip to content

Commit

Permalink
fix behavior when path is not found
Browse files Browse the repository at this point in the history
  • Loading branch information
parmaski committed Dec 8, 2024
1 parent 115b32d commit 979dfd6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion PathPlanning/HybridAStar/car.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion PathPlanning/HybridAStar/hybrid_a_star.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,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:
Expand Down

0 comments on commit 979dfd6

Please sign in to comment.