- Notifications
You must be signed in to change notification settings - Fork0
Explore a map to find a path from start to goal
License
urastogi885/sub-optimal-path-finder
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This project implements search-based algorithms that yield a sub-optimal path if one exists. Path findingalgorithms, such as Weighted A*, have been used to find a sub-optimal path for the robot from the user-defined start to endpoint. The project also generates animation to visualize the exploration of each of the mentioned search-based methods.It first checks that the user inputs do not lie in the obstacle space. Note that the obstacle space is pre-definedand static.
In Weighted A*, the heuristic cost is multiplied by an inflation factor, epsilon. If epsilon is 1, Weighted A* reduces to A*.
Unlike A* and Weighted A*, Depth-first search(DFS) has no concept of cost-to-come and cost-to-goal. Moreover, it isbased on a Last-In-First-Out (LIFO) queue. A LIFO queue is simply known as a stack.
Figure 1 - Comparison of A*, Weighted A*, and DFS
- Implement tree based algorithms such as PRM and RRT
- Python3
- Python3 Libraries: Numpy, OpenCV-Python, Math, Queue, Time, Sys, Ast
- Install Python3, Python3-tk, and the necessary libraries: (if not already installed)
These commands are based for Linux systems such as Ubuntusudo apt install python3sudo apt install python3-pippip3 install numpy opencv-python queue
- Check if your system successfully installed all the dependencies
- Open terminal using Ctrl+Alt+T and enter python3
- The terminal should now present a new area represented by >>> to enter python commands
- Now use the following commands to check libraries: (Exit python window using Ctrl+Z if an error pops up whilerunning the below commands)
import numpyimport cv2import queue
- Using the terminal, clone this repository and go into the project directory, and run the main program:
git clone https://github.com/urastogi885/sub-optimal-path-findercd sub-optimal-path-finder
- If you have a compressed version of the project, extract it, go into project directory, open the terminal, and runthe robot explorer.
python3 robot_explorer.py <start_x,start_y> <goal_x,goal_y> <robot_radius> <clearance> <method> <animation>
- An example for usingWeighted A* for a rigid robot:
python3 robot_explorer.py 50,30 150,150 2 1 0 1
- The output in theOverview section has been generated using the above arguments.
About
Explore a map to find a path from start to goal
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.