README
robot guide through a 2d map with convx polygon obstacles using searching algorithms. Each vertex of the polygons represents a point at which the robot can move.
This program use https://github.com/scikit-geometry/scikit-geometry available using this command:
conda install scikit-geometry -c conda-forge
The tests can be used by running main.py. After running it, a prompt message is shown asking for the map to be used for testing(I implemented only two maps):
- to access the first map,
- (or any other value) to choose the second map.
After choosing it, the program will plot it(e. g.):
Here we can see the start state (blue dot), the goal state (yeollow dot) and all obstacles to navigate through (convex polygons). The program will then ask for the searching algorithm to use in the graph form*:
- A* algorithm
- Uniform cost search algorithm
- (or any other value) Breadth first search algorithm
Once algorithm is chosen, it will be executed and a plot of the map will be shown with the path found by the algorithm. The list of segments making up the path from start to goal and its length will then be written into the terminal. The plot using A* is shown below:
The code for the utils.py file, like the code for A* and Best First Search was taken from the repository https://github.com/aimacode.
* indicates the version of the algorithm used. This uses a closed list to store already explored nodes so that they are not explored again.