0
$\begingroup$

Rosanswers logo

I am trying to simulate a roomba using ROS. For planning the path and to figure out what area to clean next, I would like to maintain a map where the known cells are the ones visited by the robot and the grey ones are yet to be visited. Obviously feeding laser scans to slam won't generate such a map. My initial attempt was to add a fake lidar to the bot and restrict it's range to denote the cleaning area but when I remapped this data to gmapping the boudaries were labelled as obstacles which is undesired.

How can I efficiently create an OccupancyGrid for a cleaning robot where the known areas in the map denote the areas which the bot has cleaned?


Originally posted by ashwin on ROS Answers with karma: 5 on 2021-10-24

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

What you are describing is functionality that is out of scope for move_base or the costmaps that it maintains. I would create a new ros node that operates conceptually at a higher level than move_base.

The job of this new node is to choose the next goal to give to move_base. It maintains its own map, with a grid of visited locations (populated by monitoring the robot pose.) This node will also need to know where the walls and prohibited zones are so it doesn't request an impossible-to-reach goal.

P.S. you will make the problem more difficult if you also try to mix in gmapping functionality. I would keep these two features separate until you are have more experience with ros.


Originally posted by Mike Scheutzow with karma: 4903 on 2021-10-24

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by ashwin on 2021-11-03:
Thank you! For anyone stuck on the same problem, this might be a good starting point. It was for me :)

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.