0
$\begingroup$

Rosanswers logo

Hello experts,

I've been searching and trying to figure out how to implement a SLAM based coverage method using ROS on a Turtlebot, that in which the robot builds a map of its workplace and visits every unvisited area of the map (e.g. used floor cleaning applications). You can see what im trying to explain in the following video link:SLAM based cleaning video.

In theory, I know that I have to implement a mapping method (gmapping) to build the map and to Transform robot's Pose to /map and save them or assign a higher cost to the visited areas on the map.

  • I don't know how to instruct or set different dynamically changing goals in the path planner node(s) for the robot to go over unvisited areas in order to give me a complete coverage of the mapped area. (as you could see in the video)

Any ideas or pointing me to the correct direction would be highly appreciated. ps: i'm not a pro programmer but i know my way around it.

EDIT1:

I figured out that one good way to achieve this goal is to use Spanning Tree Coverage (STC) Algorithm, for that one need to export FREE map cell coordinates and build the spanning tree that robot has to navigate through to cover the whole (Unoccupied) area. An explorer node can be used initially to build the map of the environment, but next step would be exporting the FREE Cell coordinates and Spanning Tree (or Greedy) algorithm on the cell coords. STC Paper

  • any help or guidance in those areas are highly appreciated.

Cheers.


Originally posted by sobot on ROS Answers with karma: 116 on 2015-02-26

Post score: 1

$\endgroup$

3 Answers 3

0
$\begingroup$

Rosanswers logo

You could have a look at the frontier_exploration package.


Originally posted by Martin Günther with karma: 11816 on 2015-03-06

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by gautam2410 on 2015-03-06:
Does the frontier_exploration package provide complete map coverage? I have implemented it and once the region within the set boundaries is explored, the robot stops. Is there any way of using this package to make the robot move to every cell in the set boundary?

Comment by gautam2410 on 2015-03-06:
On the wiki page, I see the sentence "To run an unbounded exploration task, simply leave the boundary blank". I'm not sure how exactly should I do this? The same question is asked here

Comment by sobot on 2015-03-10:
Thanks Martin, I checked this package. what i'm working on is somewhat different. need to save the visited (x,y), autonomously set next goals which are not among the visited (x,y) list, and an obstacle hugging method to start with. - i'd appreciate it if u have any code snips that may help my cause.

Comment by sobot on 2015-05-11:
hi @Martin Günther i tried frontier_exploration package. in its standard form ofc. to try exploration feature. i ran into some problem with the package. posted a question here which no one replied so far, any ideas? tnx

$\endgroup$
0
$\begingroup$

Rosanswers logo

Hi, I did a sloppy version of that on a turtlebot2 a year ago but I don't think that I still have the code.
What I did is at each step I find the closest frontier point (free cell neighour to an unknown cell) (at least a meter away from the turtlebot) on the map and run an A* on it. And loop until either everything is covered or unreacheable.
There are more efficient ways to do it using entropy (e.g. http://www2.informatik.uni-freiburg.de/~stachnis/pdf/stachniss03iros.pdf).

NOTE: if you use only odometry and gmapping you're map will certainly be drifting over time so coming back to the base station might be more challenging that it seems (solved it by putting ar markers every ten meters to stabilize the map, but there must be more elegant way to do it).
Also don't forget to inflate your obstacles to avoid unwanted collisions. Otherwise your robot might spend a lot of time trying to explore uneachable areas.

This is just to get you started, I guess that many people will have more efficient/reliable solutions. Hope this helps,


Originally posted by marguedas with karma: 3606 on 2015-02-27

This answer was NOT ACCEPTED on the original site

Post score: 2


Original comments

Comment by sobot on 2015-02-27:
Thanks! My problem is exactly "how to" find and set the unknown (unvisited) points and then how to mark those points as visited or covered so the robot avoid them or at least doesn't put the goal there again. btw, did you provide a static map for your scenario or built one on the fly...?

Comment by marguedas on 2015-02-28:
Hi, I built one on the fly.
I think that I used the occupancy grid published by gmapping. Inflate the obstacles. Then checked the values (white=free, black=occupied, gray=unknown). Found the closest unknown point and used an A* to find a path to this point, if unreachable, chose another unknown

Comment by gautam2410 on 2015-03-06:
Hi Sobot, I am trying to achieve something similar but with hector slam and ROS navigation stack. Were you successful in running it? Thanks!

Comment by sobot on 2015-03-30:
@gautam2410 not yet, i'm still working on it though but still no success, how did ur gig go so far? any partial results?

$\endgroup$
0
$\begingroup$

Rosanswers logo

You can also take a look at the hector_exploration_planner. It has a "inner exploration" mode that will keep visiting places in the map even after the complete environment has been explored. See also here and here.


Originally posted by Stefan Kohlbrecher with karma: 24361 on 2015-03-16

This answer was NOT ACCEPTED on the original site

Post score: 1


Original comments

Comment by sobot on 2015-05-04:
thank you, gonna try it

$\endgroup$

Your Answer

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