Skip to content

Aryaman22102002/RRT

Repository files navigation

RRT

This is my implementation of a path planning algorithm known as the "Rapidly Exploring Random Tree (RRT)" algorithm.

File Structure

   ┣ 📂Images
     ┣ 📂Example1_3_Obstacles              # 3 Obstacles Case
     ┃ ┗ 📜Grid.npy                        # Numpy grid of the image
     ┃ ┗ 📜Obstacles.png                   # Image with obstacles. 
     ┃ ┗ 📜Result.png                      # Output screenshot
     ┃ ┗ 📜Squared_Obstacles_Image.png     # Obstacle Image In Square Dimensions
     ┣ 📂Example2_4_Obstacles              # 4 Obstacles Case
     ┃ ┗ 📜Grid.npy                        # Numpy grid of the image
     ┃ ┗ 📜Obstacles.png                   # Image with obstacles. 
     ┃ ┗ 📜Result.png                      # Output screenshot
     ┃ ┗ 📜Squared_Obstacles_Image.png     # Obstacle Image In Square Dimensions
     ┣ 📂Example3_5_Obstacles              # 5 Obstacles Case
     ┃ ┗ 📜Grid.npy                        # Numpy grid of the image
     ┃ ┗ 📜Obstacles.png                   # Image with obstacles. 
     ┃ ┗ 📜Result.png                      # Output screenshot
     ┃ ┗ 📜Squared_Obstacles_Image.png     # Obstacle Image In Square Dimensions
     ┣ 📂Example4_6_Obstacles              # 6 Obstacles Case
     ┃ ┗ 📜Grid.npy                        # Numpy grid of the image
     ┃ ┗ 📜Obstacles.png                   # Image with obstacles. 
     ┃ ┗ 📜Result.png                      # Output screenshot
     ┃ ┗ 📜Squared_Obstacles_Image.png     # Obstacle Image In Square Dimensions
     ┣ 📂Example5_8_Obstacles              # 8 Obstacles Case
     ┃ ┗ 📜Grid.npy                        # Numpy grid of the image
     ┃ ┗ 📜Obstacles.png                   # Image with obstacles. 
     ┃ ┗ 📜Result.png                      # Output screenshot
     ┃ ┗ 📜Squared_Obstacles_Image.png     # Obstacle Image In Square Dimensions
     ┣ 📜RRT.png                           # RRT algorithm flowchart
   ┣ 📂Videos
   ┃ ┗ 📜Example1.mp4                      # Video of the simulation for 3 obstacles case.
   ┃ ┗ 📜Example2.mp4                      # Video of the simulation for 4 obstacles case.
   ┃ ┗ 📜Example3.mp4                      # Video of the simulation for 5 obstacles case.
   ┃ ┗ 📜Example4.mp4                      # Video of the simulation for 6 obstacles case.
   ┃ ┗ 📜Example5.mp4                      # Video of the simulation for 8 obstacles case.                 
   ┣ 📜Generate_Final_Grid.py              # Converts the image with obstacles into a numpy array/grid.
   ┣ 📜Generate_Obstacles.py               # Generates an image with black rectangular obstacles.                    
   ┣ 📜LICENSE
   ┣ 📜README.md
   ┣ 📜RRT.py                              # RRT algorithm
   ┣ 📜Squaring_Figure.py                  # Converts the rectangular obstacles image to a square
   ┣ 📜start.py                            # Runs all three required python files in appropriate sequence. 

Requirements

  Python

  Numpy

  Pillow

  Matplotlib

How to run

  • Just run the start.py file to start the simulation using the command python3 start.py.

RRT Algorithm Flowchart

RRT

Output

Example 1

Result

Example1.mp4

Example 2

Result

Example2.mp4

Example 3

Result

Example3.mp4

Example 4

Result

Example4.mp4

Example 5

Result

Example5.mp4

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages