Skip to content

Pravesh-Jamgade/rrt-console

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rrt-console

Implementation of Rapidly exploring random trees. video https://youtu.be/i75tGsbwjXw

Links:

https://en.wikipedia.org/wiki/Rapidly-exploring_random_tree

http://msl.cs.uiuc.edu/~lavalle/papers/LavKuf01.pdf

Description:

  1. main.cpp contains example to add obstacle and run algorithm.

  2. class Cobs- defines obstacle Parameters required - startx, starty, width of obstacle, height of obstacle

  3. class RRTMain - contains rrt implementation Parameters required - vector contaning all the of obstacles, width of cspace, height cspace

  4. to run algorithm, fisrt need to call init() method using RRTMain object. Parameters - start location, goal location, step size and maxIteration

  5. Call run() method using RRTMain object

  6. Call save() methos using RRTMain object.

  7. Path.txt, Obstacles.txt and Branches.txt will be generated,

Path.txt contains main route.

Obstacle.txt contains x,y position,width,height of obstacle

Branches.txt contains other explored branches

Environment:

Algorithm written in c++. Output is plotted with python3 and pygame. Set python environment with given requirements.txt file in plotter/ folder.

Plot Result:

  1. compile and run main.cpp.
  2. python plotter will ask for whether to plot "Branch.txt", provide 'y' or 'n' -- prefer 'n', as when iterations are large whole scrren will become cloudy with other branches. For small number of iterations it's okay.