Implementation of A* Algorithm to find a path between start and end point on a given map for a robot (radius = user input; clearance = 10 mm). Checks the feasibility of all inputs/outputs (if user gives start and goal nodes that are in the obstacle space they will be informed by a message and they should try again). Code outputs an animation/video of optimal path generation between start and goal point on the map. It shows both the node exploration as well as the optimal path generated.
Plugin |
---|
heapq |
numpy |
cv2 |
math |
Clone or download the project repository and open the folder, Open terminal in the project folder and type below command:
python a_star_algo.py
or
python3 a_star_algo.py
Terminal asks for user input for step size, radius, start and goal location with orientation: Input step size as shown in below fashion, step_size
Enter the step size of the robot: 5
Input radius as shown in below fashion, radius
Enter the radius of the robot: 5
Input start location as shown in below fashion, x-coordinate space y-coordinate space theta
Enter start location point and orientation[x,y,theta](eg: if (10,10,30), then enter: 10 10 30): 10 10 60
Input goal location as shown in below fashion, x-coordinate space y-coordinate space theta
Enter goal location point and orientation[x,y,theta](eg: if (115,185,60), then enter: 350 220 60
Test case 1: Step size: 5, Radius: 5, Start location: 10 10 60, Goal location: 350 220 60, Visualization video: Test case 1.
Test case 2: Step size: 10, Radius: 5, Start location: 10 10 0, Goal location: 100 240 0, Visualization video: Test case 2.