Giter Club home page Giter Club logo

rrtalgo's Introduction

RRTalgo

Implementation of a basic RRT algorithm in Python.

Dependencies

This script makes use of the following libraries which can be installed using the pip command.

  1. Treelib
  2. Scipy
  3. Numpy
  4. Matplotlib
pip install treelib
pip install numpy
pip install scipy
pip install matplotlib

As numpy and scipy are dependencies of treelib, they should automatically install. Ensure that the python3-tk package is installed.

sudo apt install python3-tk

Executing the script

Download the RRT.py script and run it from the terminal (Linux) or in Python 3 (Windows).

python3 RRT.py

In case it does not run (for Linux), navigate to the directory where RRT.py is stored and run in Terminal:

chmod +x RRT.py

and then run

python RRT.py

Input

The scripts prompts the following input information:

  1. Dimensions of the configuration space
  2. (x,y) of the starting point
  3. (x,y) of the destination point
  4. Number of obstacles, and their dimensions.
  5. Number of nodes to be generated by the RRT algorithm.

Parameters

There are 2 paramters that can be tinkered with, according to the application.

  1. Tolerance - the radius around the destination location, within which a node is accepted as the destination node.
  2. Qdel - the step size, higher the step size, wider the spread of nodes

Output

The RRT map is generated in blue and the obstacles are in red

  1. If the goal is reached, the terminal prints Goal Reached! and the path is highlighted in Green. Image with path hightlighted in green
  2. If the goal is not reached, there is no path highlighted in green. The number of nodes or qdel must be altered to get a path. Image with no path hightlighted in green
  3. If the destination or start point is unreachable, an error message is displayed.

rrtalgo's People

Contributors

varshmail7 avatar

Watchers

 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.