Ask Your Question

Loading a prior map with gmapping

asked 2011-03-16 07:37:20 -0500

updated 2014-01-28 17:09:22 -0500

ngrennan gravatar image

Is it possible to load a previously saved map (pgm/yaml) into gmapping, such that the map is initially populated with the robot situated at a defined starting pose?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2011-03-16 09:00:42 -0500

Brian Gerkey gravatar image

No, it's not. The occupancy grid representation of the map (for example, the pgm bitmap) doesn't contain enough state to resume mapping. Internally, gmapping is estimating a distribution over maps and robot trajectories, using a particle filter. To resume mapping, you'd have to save all of that internal state. In principle, it's possible to do that, but it's not currently implemented, and I would guess it would take quite a bit of work.

edit flag offensive delete link more


Ok, I thought that might be the case. It would be nice to have a life-long learning approach to building maps, so that any changes in the environment can be accommodated. Saving the particle filter state might be something I could work on.
JediHamster gravatar image JediHamster  ( 2011-03-16 10:47:20 -0500 )edit
For long-term mapping, including pause-and-resume abilities, I'd go for a constraint-graph SLAM algorithm, instead of a particle filter algorithm. I don't know whether it's implemented yet, but the [graph_mapping]( stack should eventually be able to do this.
Brian Gerkey gravatar image Brian Gerkey  ( 2011-03-16 11:25:57 -0500 )edit
the new version of Karto will do this for you; they provide a ROS package interface, but it ain't free... (except for trial license)
Nick Armstrong-Crews gravatar image Nick Armstrong-Crews  ( 2011-12-29 01:11:20 -0500 )edit

Hi, according to the tutorial, it is possible to load a static map into rviz. But I am also unable to load the static map? Anyone solve this issue?

RB gravatar image RB  ( 2014-04-07 01:16:46 -0500 )edit

@RB rviz is used to display the static map, not load it. To load it, check out map_server. Also, your question is almost completely unrelated to this question, so you should have posted this as a different question.

kwiesz91 gravatar image kwiesz91  ( 2015-09-15 16:02:13 -0500 )edit

Is it possible that we have a solution by getting the current location to resume gmapping? I suggest comparing the current view for the sight sensors to the old map & see where is this current robot. Any luck on this? In fact I m working on somthing similar, anyone with solutions to this solution?

Avonic gravatar image Avonic  ( 2016-03-01 02:46:39 -0500 )edit

I am interested in this with a few handy (I believe) constraints. Imagine a robot that maps, then docks to recharge. The dock is at the same location as the start of previous mapping. How to restart from known origin and orientation, then?

Dino gravatar image Dino  ( 2016-10-30 20:39:28 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2011-03-16 07:37:20 -0500

Seen: 3,616 times

Last updated: Mar 16 '11