Maze is a C library that is capable of scanning a complex maze and find the shortest path to end using Dijkstras algorithm. It can function independently as well as on any simulator or hardware. The same has been used to simulate a line follower robot on Coppeliasim ( VREP ) using its legacy remote API in C.
src
-> contains the maze library, vrep C API code and api libraries
vrep_scenes
-> contains coppeliasim scenes
If your vrep executable is in the default location
Windows 10: C:\Program Files\CoppeliaRobotics\CoppeliaSimEdu
Ubuntu 16.04: ~/CoppeliaSim_Edu_V4_0_0_Ubuntu16_04/
$ make all
If the path is different
$ make all VREPPATH=<path>
path must be in double quotes if it contains space characters
-
Library
src/maze.c
is the core library implementing the maze solving algorithm.src/maze.h
has all the implementation details.
-
Simulation
- Open the Coppeliasim scenes from
vrep_scenes
. - Press the run button.
- The bot starts scanning the maze and stops when scanning is complete
- When the bot stops, press pause button and move the bot to its initial position.
- Press the play button again.
- The bot now moves by the shortest path to the end point.
- Open the Coppeliasim scenes from