- Understanding of the Problem: The problem is related to a setting where given we have info about obstalces of the environment, we wish to explore the entrie environemnt. This problem can be particularly useful when in a big 2D space we wish to look for artifacts in all the space.
- A good exploration algorithm will visit almost all places while ensuring that the time(or distance) required to complete the exploration is minimized.
- Rapidly Explording Random Graphs(RRG), an algorithm which derives RRT*
- The method doesnt require us to store a 2D map of any resolution.
- RRG pseudo code
let the initial pose be x_init
V: list of vertices
E: list of edges
i = 0
neighbour_radius
while i < N:
G(V, E)
x_rand = RandomPosition()
i = i + 1
x_nearest = Nearest(G, x_rand)
x_new = Steer(x_nearest, x_rand)
if ObstacleFree(x_nearest, x_new):
V add x_new
E add (x_nearest, x_new) and (x_new, x_nearest)
x_neigbours = findNeighbors(G, x_new, neighbour_radius)
for x in x_neigbours:
if ObstacleFree(x_new, x):
E add (x_new, x) and (x, x_new)
- A variation of TSP problem is solved on graph formed with RRG to ensure that all the vertices in the graph are visited atleast once while ensuring that the travel ditance is minimized
- The TSP is solved using heuristic based algorithm to get a near optimal solution so that the solving takes less time
- The repositories has directories for header files in
include
, source files insidesrc
and compilation inbuild
directory. include
:custom_graph.h
: declares structures like vertex, edge, graphgeometry.h
: declares functions to calculate euclidean and manhattan distances, collision checking between line segment and circular obstacle, etcmatplotlibcpp.h
: avaiable open source wrapper for python-matplotlibtspnn.h
: declares functions for solving TSP, Djkistra, adjacency matrixrrg.h
: declares helper functions for RRG
src
:test_graph.cpp
: testing file to ensure working of data structures insidecustom_graph
test_geom.cpp
: testing file to ensure all function ofgeometry
are workingtest_tsp.cpp
: testing file to ensure all function insidetspnn
are workingtest_rrg.cpp
: contains actual code for the algorithm, and hence the assigment
Move inside build directly to see compiled source files:
test_geom
, test_graph
, test_tsp
, tesp_rrg
To run the RRG algorithm, do ./test_rrg
To generate new compiled files for the sources files, do:
- Move inside build directly
- run
cmake ..
- run
make