Code Monkey home page Code Monkey logo

obstacle-avoidance-via-visibility-graph-and-path-planning's Introduction

Obstacle Avoidance via Visibility graph and path planning

Input Result

Problem:

Given the color specification of the start marker, end marker, other objects and obstacles, generate a path which connects the start and end marker while ensuring that all the other objects are visited and the obstacles are avoided. (Note: Yellow blocks are objects to be visited, White blocks are the obstacles, Red block is the start node, Green block is the end node)

My approach:

I used the visibility graph concept to build a graph from the given image and then applied dijstra's shortest path algorithm to generate the path.

Visibility-graph is a graph of inter visible locations, typically for a set of points and obstacles in the Euclidean plane. Each node in the graph represents a point location, and each edge represents a visible connection between them. That is, if the line segment connecting two locations does not pass through any obstacle, an edge is drawn between them in the graph.

Demo of the software:

Below are the instructions to use the software.

  1. Name the image to be used for planning to be input.JPG.
  2. For the purpose of getting a threshold of the color for different kinds of objects, follow these sub-instructions. (to crop, first select the object by drawing a bounding box then press 'c' to store the cropped image, and press esc)
  • First crop out the start marker(whichever color it is)
  • Crop out the white colored obstacles
  • Crop out the yello objects which need to be visited before reaching the end marker.
  • Crop out the end marker(whichever color it is)
  • Then use the trackbar window to fine tune the colors of the objects. After doing that, toggle the button on other window to switch to the next object.

(Please have a look at below given demo)

Requirements:

  1. Python 2.7+
  2. NumPy
  3. OpenCV

Or you may run the following commands in shell to install the required packages:

git clone https://github.com/pranoy-panda/Obstacle-Avoidance-via-Visibility-graph-and-path-planning.git
cd Obstacle-Avoidance-via-Visibility-graph-and-path-planning/
sudo pip install -r requirements.txt

To get results on the provided Image, execute the following inside the repository:

python src/final_code.py

obstacle-avoidance-via-visibility-graph-and-path-planning's People

Contributors

pranoy-panda avatar

Stargazers

 avatar

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.