Skip to content

Commit 7b383f8

Browse files
committed
keep coding
1 parent ddb976a commit 7b383f8

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

PathPlanning/HybridAStar/hybrid_a_star.py

+12-2
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
@@ -103,6 +103,11 @@ def __init__(self, ox, oy, xyreso, yawreso):
103103
self.yaww = int(self.maxyaw - self.minyaw)
104104

105105

106+
def analytic_expantion(current, ngoal, c, ox, oy, kdtree):
107+
108+
return False, None # no update
109+
110+
106111
def hybrid_a_star_planning(start, goal, ox, oy, xyreso, yawreso):
107112
"""
108113
start
@@ -116,7 +121,7 @@ def hybrid_a_star_planning(start, goal, ox, oy, xyreso, yawreso):
116121
start[2], goal[2] = rs.pi_2_pi(start[2]), rs.pi_2_pi(goal[2])
117122
tox, toy = ox[:], oy[:]
118123

119-
# obkdtree = KDTree(np.vstack((tox, toy)).T)
124+
obkdtree = KDTree(np.vstack((tox, toy)).T)
120125

121126
c = Config(tox, toy, xyreso, yawreso)
122127

@@ -139,6 +144,11 @@ def hybrid_a_star_planning(start, goal, ox, oy, xyreso, yawreso):
139144

140145
c_id, cost = heapq.heappop(pq)
141146
current = openList.pop(c_id)
147+
closedList[c_id] = current
148+
149+
isupdated, fpath = analytic_expantion(
150+
current, ngoal, c, ox, oy, obkdtree)
151+
142152
# print(current)
143153

144154
rx, ry, ryaw = [], [], []

0 commit comments

Comments
 (0)