This commit is contained in:
Atsushi Sakai
2017-12-10 11:04:48 -08:00
parent a80bd82bf4
commit a76beda082

View File

@@ -50,7 +50,7 @@ def dijkstra_planning(sx, sy, gx, gy, ox, oy, reso, rr):
# print("current", current)
# show graph
plt.plot(current.x, current.y, "xc")
plt.plot(current.x * reso, current.y * reso, "xc")
if len(closedset.keys()) % 10 == 0:
plt.pause(0.001)
matplotrecorder.save_frame()
@@ -86,12 +86,12 @@ def dijkstra_planning(sx, sy, gx, gy, ox, oy, reso, rr):
openset[n_id] = node
# generate final course
rx, ry = [ngoal.x], [ngoal.y]
rx, ry = [ngoal.x * reso], [ngoal.y * reso]
pind = ngoal.pind
while pind != -1:
n = closedset[pind]
rx.append(n.x)
ry.append(n.y)
rx.append(n.x * reso)
ry.append(n.y * reso)
pind = n.pind
return rx, ry