Skip to content

Commit 5fc098d

Browse files
committed
fix test
1 parent 1a1bfef commit 5fc098d

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

PathPlanning/ProbabilisticRoadMap/probabilistic_road_map.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -298,19 +298,19 @@ def main():
298298
ox.append(40.0)
299299
oy.append(60.0 - i)
300300

301-
plt.plot(ox, oy, ".k")
302-
plt.plot(sx, sy, "^r")
303-
plt.plot(gx, gy, "^c")
304-
plt.grid(True)
305-
plt.axis("equal")
301+
if show_animation:
302+
plt.plot(ox, oy, ".k")
303+
plt.plot(sx, sy, "^r")
304+
plt.plot(gx, gy, "^c")
305+
plt.grid(True)
306+
plt.axis("equal")
306307

307308
rx, ry = PRM_planning(sx, sy, gx, gy, ox, oy, robot_size)
308309

309-
plt.plot(rx, ry, "-r")
310-
311310
assert len(rx) != 0, 'Cannot found path'
312311

313312
if show_animation:
313+
plt.plot(rx, ry, "-r")
314314
plt.show()
315315

316316

0 commit comments

Comments
 (0)