diff --git a/Sampling-based Planning/.idea/Sampling-based Planning.iml b/Sampling-based Planning/.idea/Sampling-based Planning.iml index 5965bde..c444878 100644 --- a/Sampling-based Planning/.idea/Sampling-based Planning.iml +++ b/Sampling-based Planning/.idea/Sampling-based Planning.iml @@ -2,7 +2,7 @@ - + \ No newline at end of file diff --git a/Sampling-based Planning/.idea/misc.xml b/Sampling-based Planning/.idea/misc.xml index 0e7ac62..a2e120d 100644 --- a/Sampling-based Planning/.idea/misc.xml +++ b/Sampling-based Planning/.idea/misc.xml @@ -1,4 +1,4 @@ - + \ No newline at end of file diff --git a/Sampling-based Planning/gif/RRT_2D.gif b/Sampling-based Planning/gif/RRT_2D.gif new file mode 100644 index 0000000..f7e4757 Binary files /dev/null and b/Sampling-based Planning/gif/RRT_2D.gif differ diff --git a/Sampling-based Planning/rrt_2D/__pycache__/env.cpython-37.pyc b/Sampling-based Planning/rrt_2D/__pycache__/env.cpython-37.pyc index 3bd1dd8..b0dfdbd 100644 Binary files a/Sampling-based Planning/rrt_2D/__pycache__/env.cpython-37.pyc and b/Sampling-based Planning/rrt_2D/__pycache__/env.cpython-37.pyc differ diff --git a/Sampling-based Planning/rrt_2D/__pycache__/plotting.cpython-37.pyc b/Sampling-based Planning/rrt_2D/__pycache__/plotting.cpython-37.pyc index 093cf47..2584298 100644 Binary files a/Sampling-based Planning/rrt_2D/__pycache__/plotting.cpython-37.pyc and b/Sampling-based Planning/rrt_2D/__pycache__/plotting.cpython-37.pyc differ diff --git a/Sampling-based Planning/rrt_2D/__pycache__/rrt.cpython-37.pyc b/Sampling-based Planning/rrt_2D/__pycache__/rrt.cpython-37.pyc index 0b0996c..aadb228 100644 Binary files a/Sampling-based Planning/rrt_2D/__pycache__/rrt.cpython-37.pyc and b/Sampling-based Planning/rrt_2D/__pycache__/rrt.cpython-37.pyc differ diff --git a/Sampling-based Planning/rrt_2D/__pycache__/utils.cpython-37.pyc b/Sampling-based Planning/rrt_2D/__pycache__/utils.cpython-37.pyc index 032c162..ee4ba90 100644 Binary files a/Sampling-based Planning/rrt_2D/__pycache__/utils.cpython-37.pyc and b/Sampling-based Planning/rrt_2D/__pycache__/utils.cpython-37.pyc differ diff --git a/Sampling-based Planning/rrt_2D/plotting.py b/Sampling-based Planning/rrt_2D/plotting.py index c61b1b7..0e231e0 100644 --- a/Sampling-based Planning/rrt_2D/plotting.py +++ b/Sampling-based Planning/rrt_2D/plotting.py @@ -77,7 +77,7 @@ class Plotting: plt.plot([node.parent.x, node.x], [node.parent.y, node.y], "-g") plt.gcf().canvas.mpl_connect('key_release_event', lambda event: [exit(0) if event.key == 'escape' else None]) - if count % 5 == 0: plt.pause(0.001) + if count % 10 == 0: plt.pause(0.001) else: for node in nodelist: if node.parent: diff --git a/Sampling-based Planning/rrt_2D/rrt_star.py b/Sampling-based Planning/rrt_2D/rrt_star.py index 3653faf..3a469be 100644 --- a/Sampling-based Planning/rrt_2D/rrt_star.py +++ b/Sampling-based Planning/rrt_2D/rrt_star.py @@ -170,7 +170,7 @@ def main(): x_start = (2, 2) # Starting node x_goal = (49, 28) # Goal node - rrt_star = RrtStar(x_start, x_goal, 1, 0.1, 10, 20000) + rrt_star = RrtStar(x_start, x_goal, 1.2, 0.15, 10, 20000) path = rrt_star.planning() if path: diff --git a/Sampling-based Planning/rrt_2D/utils.py b/Sampling-based Planning/rrt_2D/utils.py index b8a4dc4..28ed399 100644 --- a/Sampling-based Planning/rrt_2D/utils.py +++ b/Sampling-based Planning/rrt_2D/utils.py @@ -5,7 +5,6 @@ utils for collision check import math import numpy as np -import pyrr import os import sys @@ -20,7 +19,7 @@ class Utils: def __init__(self): self.env = env.Env() - self.delta = 0.2 + self.delta = 0.5 self.obs_circle = self.env.obs_circle self.obs_rectangle = self.env.obs_rectangle self.obs_boundary = self.env.obs_boundary