Coder Social home page Coder Social logo

linxigjs / path-planning-robot-over-voronoi-diagram Goto Github PK

View Code? Open in Web Editor NEW

This project forked from simonetinella/path-planning-robot-over-voronoi-diagram

1.0 0.0 1.0 53 KB

Robot Path Planning Algorithm- Generalized Voronoi Diagram

License: MIT License

C++ 97.03% MATLAB 2.97%

path-planning-robot-over-voronoi-diagram's Introduction

Path-Planning-Robot-over-Voronoi-Diagram

Path Planning Algorithm- Generalized Voronoi Diagram

Two algorithms are implemented in this project.

  1. Create a Generalized Voronoi Diagram path over a map with obstacles.
  2. Return a list of Points to reach a point B starting from a point A.

To create an obstacle you have to insert the vertices clockwise. Example

std::vector<Punto*> obj; obj.push_back(new Punto(20,80)); obj.push_back(new Punto(20,90)); obj.push_back(new Punto(30,90)); obj.push_back(new Punto(30,80)); Ostacolo *o=new Ostacolo(&obj);

After this you have to create a vector with your created obstacles

std::vector<Ostacolo*> ostacoli; ostacoli.push_back(o);

After this you have to inizialize the map with your specs (Width, Height, vector of obstacles)

Voronoi *mappa=new Voronoi(200,200,ostacoli);

This three lines returns points of map, obstacles and crossings (Used to create a plot)

std::vector<Punto*> *voronoi= mappa->getPuntiVoronoi(); ostacoli= mappa->getOstacoli(); std::vector<Punto> *incroci= mappa->getIncroci();

After this you have to create starting point(partenza) and end point(arrivo)

Punto *partenza= new Punto(20,140); Punto *arrivo= new Punto(160,70);

This line returns a points vector that connects the starting point to the end point.

std::vector percorso=mappa->getPercorso(*partenza,*arrivo);

alt text

path-planning-robot-over-voronoi-diagram's People

Contributors

simonetinella avatar

Stargazers

 avatar

Forkers

jdr-neu

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.