Skip to content

ENPM 661 Project 3 Phase 2: A rigid robot traverses through a configuration space to find the goal node using A star search algorithm, while it avoid the obstacles in the map

Notifications You must be signed in to change notification settings

bharadwaj-chukkala/Path-Planning-for-a-rigid-robot-using-A-Star-search-algorithm-

 
 

Repository files navigation

Path-Planning-for-a-rigid-robot-using-A-Star-search-algorithm

Code:

  • Code consists of: 'Generating an Obstacle Map, 'Movement in 5 Directions', 'Using Search Algorithm and Back Tracking' and 'Visualizing the Tracked Path'
  • The Search Algorithm used here is ' A Star Algorithm' to reach end goal and obtain the path.
  • The code has been delineated very clearly in the comments provided in the Code.

Dependencies:

  • python 3.9 (works for any python 3 version)
  • Python running IDE. (I used PyCharm IDE to program the Code and Execute the Code)
  • Libraries: numpy, matplotlib.pyplot, heapq, time

P.S. The visualization of the plotting is not smooth in spyder or Visual Studio. Use Pycharm or such IDE's.

Instructions to Run the Code:

To get the Output (without Visualization)

  • Open the 'astar-pathplanning-Joseph-Katakam_&_Bharadwaj_Chukkala.py' file in any IDE. (I used PyCharm)
  • Run the Program
  • In the Console, the program asks for: |-- The Obstacle Clearance and Robot Radius |-- Robot Step Size and '-- The x and y coordinates of Start and Goal Node.
  • Enter as prompted. Ex: Clearance: 5; Robot Radius: 10; Step size: 1; Start: 50, 50; Initial Theta: 30; Goal: 150, 150; Final Theta: 30.
  • The Output Plot with planned Path should be Visible.

To get the Output (with Visualization)

  • Open the 'astar-pathplanning-Joseph-Katakam_&_Bharadwaj_Chukkala.py' file in any IDE. (I used PyCharm)
  • UnComment the line used for Visualization i.e. '309', which says- "plt.pause(0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001)"
  • Run the Program
  • In the Console, the program asks for: |-- The Obstacle Clearance and Robot Radius |-- Robot Step Size and '-- The x and y coordinates of Start and Goal Node.
  • Enter as prompted. Ex: Clearance: 5; Robot Radius: 10; Step size: 1; Start: 50, 50; Initial Theta: 30; Goal: 150, 150; Final Theta: 30.
  • The Output Plot with planned Path should be Visible.

Understanding the Output Plot

  • The Robot movable space is shown in White Color
  • The Pixels in Blue are the Obstacles.
  • The Pixels in Cyan is the Clearance Space.
  • The explored path is marked by Green color.
  • The Planned Path is shown by Red Dotted Lines.

About

ENPM 661 Project 3 Phase 2: A rigid robot traverses through a configuration space to find the goal node using A star search algorithm, while it avoid the obstacles in the map

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%