Skip to content

Commit ddb976a

Browse files
committed
keep coding
1 parent d46fecc commit ddb976a

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

Diff for: PathPlanning/HybridAStar/hybrid_a_star.py

+11-3
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
sys.path.append("../ReedsSheppPath/")
1111

1212
import math
13-
import numpy as np
13+
# import numpy as np
1414
import scipy.spatial
1515
import matplotlib.pyplot as plt
1616
import reeds_shepp_path_planning as rs
@@ -132,6 +132,15 @@ def hybrid_a_star_planning(start, goal, ox, oy, xyreso, yawreso):
132132
openList[calc_index(nstart, c)] = nstart
133133
heapq.heappush(pq, (calc_index(nstart, c), calc_cost(nstart, h, ngoal, c)))
134134

135+
while True:
136+
if not openList:
137+
print("Error: Cannot find path, No open set")
138+
return [], [], []
139+
140+
c_id, cost = heapq.heappop(pq)
141+
current = openList.pop(c_id)
142+
# print(current)
143+
135144
rx, ry, ryaw = [], [], []
136145

137146
return rx, ry, ryaw
@@ -155,8 +164,7 @@ def calc_index(node, c):
155164

156165

157166
def main():
158-
print("Start rrt start planning")
159-
# ====Search Path with RRT====
167+
print("Start Hybrid A* planning")
160168

161169
ox, oy = [], []
162170

0 commit comments

Comments
 (0)