Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions PathPlanning/BreadthFirstSearch/breadth_first_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,33 +210,33 @@ def main():
print(__file__ + " start!!")

# start and goal position
sx = 10.0 # [m]
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry, we can keep these float parameters as before.

sy = 10.0 # [m]
gx = 50.0 # [m]
gy = 50.0 # [m]
grid_size = 2.0 # [m]
robot_radius = 1.0 # [m]
sx = 10 # [m]
sy = 10 # [m]
gx = 50 # [m]
gy = 50 # [m]
grid_size = 2 # [m]
robot_radius = 1 # [m]

# set obstacle positions
ox, oy = [], []
for i in range(-10, 60):
ox.append(i)
ox.append(float(i))
oy.append(-10.0)
for i in range(-10, 60):
ox.append(60.0)
oy.append(i)
oy.append(float(i))
for i in range(-10, 61):
ox.append(i)
ox.append(float(i))
oy.append(60.0)
for i in range(-10, 61):
ox.append(-10.0)
oy.append(i)
oy.append(float(i))
for i in range(-10, 40):
ox.append(20.0)
oy.append(i)
oy.append(float(i))
for i in range(0, 40):
ox.append(40.0)
oy.append(60.0 - i)
ox.append(40)
oy.append(60 - i)

if show_animation: # pragma: no cover
plt.plot(ox, oy, ".k")
Expand Down
24 changes: 12 additions & 12 deletions PathPlanning/Dijkstra/dijkstra.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,33 +211,33 @@ def main():
print(__file__ + " start!!")

# start and goal position
sx = -5.0 # [m]
sy = -5.0 # [m]
gx = 50.0 # [m]
gy = 50.0 # [m]
grid_size = 2.0 # [m]
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry, we can keep these float parameters as before.

sx = -5 # [m]
sy = -5 # [m]
gx = 50 # [m]
gy = 50 # [m]
grid_size = 2 # [m]
robot_radius = 1.0 # [m]

# set obstacle positions
ox, oy = [], []
for i in range(-10, 60):
ox.append(i)
ox.append(float(i))
oy.append(-10.0)
for i in range(-10, 60):
ox.append(60.0)
oy.append(i)
oy.append(float(i))
for i in range(-10, 61):
ox.append(i)
ox.append(float(i))
oy.append(60.0)
for i in range(-10, 61):
ox.append(-10.0)
oy.append(i)
oy.append(float(i))
for i in range(-10, 40):
ox.append(20.0)
oy.append(i)
oy.append(float(i))
for i in range(0, 40):
ox.append(40.0)
oy.append(60.0 - i)
ox.append(40)
oy.append(60 - i)

if show_animation: # pragma: no cover
plt.plot(ox, oy, ".k")
Expand Down
24 changes: 12 additions & 12 deletions PathPlanning/ProbabilisticRoadMap/probabilistic_road_map.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,33 +263,33 @@ def main(rng=None):
print(__file__ + " start!!")

# start and goal position
sx = 10.0 # [m]
sy = 10.0 # [m]
gx = 50.0 # [m]
gy = 50.0 # [m]
robot_size = 5.0 # [m]
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry, we can keep these float parameters as before.

sx = 10 # [m]
sy = 10 # [m]
gx = 50 # [m]
gy = 50 # [m]
robot_size = 5 # [m]

ox = []
oy = []

for i in range(60):
ox.append(i)
ox.append(float(i))
oy.append(0.0)
for i in range(60):
ox.append(60.0)
oy.append(i)
oy.append(float(i))
for i in range(61):
ox.append(i)
ox.append(float(i))
oy.append(60.0)
for i in range(61):
ox.append(0.0)
oy.append(i)
oy.append(float(i))
for i in range(40):
ox.append(20.0)
oy.append(i)
oy.append(float(i))
for i in range(40):
ox.append(40.0)
oy.append(60.0 - i)
ox.append(40)
oy.append(60 - i)

if show_animation:
plt.plot(ox, oy, ".k")
Expand Down
24 changes: 12 additions & 12 deletions PathPlanning/VoronoiRoadMap/voronoi_road_map.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,33 +136,33 @@ def main():
print(__file__ + " start!!")

# start and goal position
sx = 10.0 # [m]
sy = 10.0 # [m]
gx = 50.0 # [m]
gy = 50.0 # [m]
robot_size = 5.0 # [m]
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry, we can keep these float parameters as before.

sx = 10 # [m]
sy = 10 # [m]
gx = 50 # [m]
gy = 50 # [m]
robot_size = 5 # [m]

ox = []
oy = []

for i in range(60):
ox.append(i)
ox.append(float(i))
oy.append(0.0)
for i in range(60):
ox.append(60.0)
oy.append(i)
oy.append(float(i))
for i in range(61):
ox.append(i)
ox.append(float(i))
oy.append(60.0)
for i in range(61):
ox.append(0.0)
oy.append(i)
oy.append(float(i))
for i in range(40):
ox.append(20.0)
oy.append(i)
oy.append(float(i))
for i in range(40):
ox.append(40.0)
oy.append(60.0 - i)
ox.append(40)
oy.append(60 - i)

if show_animation: # pragma: no cover
plt.plot(ox, oy, ".k")
Expand Down
Loading