I am using ROS melodic on ubuntu 18.04
I have a simple 2 wheeled mobile bot, with a lidar attached to it. It is kept at the entrance of a maze (any maze). The bot has to "solve" the maze, i.e. exit it, using the shortest possible path. We get 30 seconds first to "map" the maze.
First, using odometry and laser data, I used the slam gmapping
package to try and create a map of the maze. I used a rudimentary algorithm (out of the three directions right ,left and straight, it choses the one with the most free space), just to check out if the mapping process is working out, and it indeed is. I am getting a fairly accurate occupancy grid till the time the algorithm runs properly (it runs into problems later).
From what I understand, after an appropriate map (occupancy grid) is obtained, we can apply graph algorithms like A*,RRT,RRT*
etc. to obtain the optimum path.
However, I am confused regarding creating the appropriate map in the first place. I mean, I have the package working properly that will create the map for me, but what kind of algorithm should I implement to ensure a path is taken from the starting of the maze, to the end of the maze, and back to the start? (To create the appropriate map). The main issue here is that we also have to deduce weather we have reached the end of the maze or not.... We cannot hard-code the location of the maze as the algorithm has to be general.
In short, the main problem I have is not "how to create a map", but rather, "what path should the robot take so that the map it creates is appropriate for the purpose".
what kind of algorithm should I implement to ensure a path is taken from the starting of the maze, to the end of the maze, and back to the start?
but right before that you say,From what I understand, after an appropriate map (occupancy grid) is obtained, we can apply graph algorithms like A*, RRT, RRT* etc. to obtain the optimum path.
What is your question exactly? How to condition/convert an occupancy grid to be used with one of the algorithms you mentioned? You're simultaneously asking for and listing algorithms so I can't tell what you're after. $\endgroup$