Dijkstra's Algorithm - Path Planning

Implementation of Dijkstra's algorithm for a Robot
Explore the docs »

View Demo · Report Bug · Request Feature

Table of contents

About The Project

This project aims to implement Dijkstra’s Algorithm to find a path between start and end point on a given map for a point robot. The obstacle space is represented in the following image.

Screen Shot 2022-03-07 at 11 04 12 PM

Built With

Getting Started

Prerequisites

Installation

  1. Clone the repo
    git clone https://github.com/vishalgattani/Path-Planning.git
    
  2. Change to Djikstra directory
    cd Djikstra
    

Usage

  1. Run the python file:
    python dijkstra.py
    
  2. Input the following values:
    • dimension
    • clearance
    • startx
    • starty
    • goalx
    • goaly
    • live animation
    • video save
  3. If the user wishes a live animation, the opencv library will show node exploration.
  4. If the user wishes to save the video, user requires to to input [y/n].
  5. Given map dimensions, each whitespace inside the map has the follwoing index: index = j*width+i where i and j are the nodes (whitespace pixel grid) coordinates.
  6. The open set and closed set are dictionaries with key being the index and value being the node.

Roadmap

Screen Shot 2022-03-07 at 11 02 17 PM

Output


dijkstragiffinal


Contributing

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag “enhancement”. Don’t forget to give the project a star! Thanks again!

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Project Link: https://github.com/vishalgattani/Path-Planning

References