A_Star_algorithm


Dependencies to be installed:
a) NumPy
b) Math
c) Matplotlib
d) Time
e) Heapq
import numpy as np import math from math import dist import matplotlib.pyplot as plt import time import heapq from matplotlib.animation import FuncAnimation from matplotlib.colors import ListedColormap
To run this file do the following:

  1. Press Run or type a_star_shivam_modabbir.py in the terminal
  2. Inputs given:
    Clearance - 5
    Radius - 2
    Robot Step size - 2
    X- coordinate of start node - 10
    Y - coordinate of start node - 10
    Orientation of the robot at initial point - 30
    X- coordinate of goal node - 1150
    Y - coordinate of goal node - 30
    Orientation of the robot at final point - 30

Output: There will be 2 plots and videos generated once you the run the code. First plot will be the visualization of node exploration which will generate a plot of the node exploration and will save a video file named 'node_exploration_animation.mp4' . Once the node exploration visualization is completed, you will have to close the plot in order to visualize the path exploration which will generate a similar plot as earlier and save video file named 'optimal_path_animation.mp4'.

Note: Don't forget to close the plot of node exploration visualization so that the optimal path visualization pops up.