Giter VIP home page Giter VIP logo

pathplanningpo's Introduction

PathPlanningPO

Implementation of LPA* and D* Lite algorithms.

Sources:

Installation

  • Download repository:
git clone https://github.com/Arkol7/PathPlanningPO.git
  • Install requirements:
pip install -r requirements.txt
  • Go to project directory:
cd PathPlanningPO

LPA*

  • run LPA* visualization on 4(or 8)-connected gridmap:
python 4-c-LPA.py

for an unknown reason, sometimes the LPA* on an 8-connected map does not find the optimal path with minimization (g + cost), so it finds the shortest path only using g-values

Key-buttons:

  • left mouse button - place cell (the first click places start cell, second one - goal cell, all other - impassable cells)
  • SPACE - run LPA* from scratch
  • c - clear screen
  • r - re-run LPA* using information from previous run

D* Lite

In this project 2 algorithms for solving robot navigation problem were implemented. The first - restarted A* (see implementation). The second - D* Lite (see implementation). To compare the performance of algorithms were created a special class TestMapRunner (see implementation). It uses task files and maps from maps directory. To evaluate performance of algorithms we calculate 4 metrics:

  • Insertions - the number of node's insertions in a heap during computing.
  • Accesses - the number of accesses to nodes during computing.
  • Expansions - the number of expansions of nodes during computing.
  • Time.

Massive tests

To run tests you need to have wandb account to log statistics. To give it go to their official cite. Then you install wandb and login, you can run massive tests. To do this run:

python massive_tests.py

To modify test settings go to script and change parameters:

  • maps - task files for maps. If you want to run your own map, create it according to MovingAI pattern, save in maps directory and then preprocess it with create_tests.py. For this purpose write your filename in main function in this script and run it locally.

    python create_tests.py

    This script rewrites your task files, and you now can use them.

  • windows - list of window sizes will be used.

This massive tests run all your tasks with A* and D* Lite.

Visualization

If you want to see how agent moves on a map, use animation.py. Change arguments inrunner.run(algorithm, start, finish, True) on that you want. Then you can just run:

python animation.py

And giff file will be generated, also script prints you some statistics.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.