Ask Your Question

Effects of manually editing gmapping maps?

asked 2011-12-05 01:26:13 -0600

Pi Robot gravatar image

I have a map of my house generated by gmapping and now I am using it with amcl for navigation. Does it make sense to clean up the map in an image editor? For example, if you have a hallway wall that is slightly jagged in the original map, does it make sense to replace the original pixels with a perfectly straight line? I'm just wondering if this would help or hinder amcl for subsequent navigation.


edit retag flag offensive close merge delete

3 answers

Sort by ยป oldest newest most voted

answered 2011-12-05 01:47:39 -0600

Brian Gerkey gravatar image

Cleaning up the map as you're suggesting shouldn't hurt localization performance, but probably won't help either. By default, amcl uses a likelihood field model when interpreting laser data; this model has the effect of "blurring" the obstacles in the map, so moving a pixel a bit one way or the other won't have a huge effect.

If you compare performance with both maps, I'd be interested to know the results.

edit flag offensive delete link more


Thanks Brian! I'm about to run some amcl endurance tests with the TurtleBot. If I get time to run them with different versions of the map, I'll post back the results.
Pi Robot gravatar imagePi Robot ( 2011-12-05 01:57:20 -0600 )edit

Can i draw a complete map(.pgm file) on my own and feed that to Robot for navigation? if so how can this be accomplished?

Kishore Kumar gravatar imageKishore Kumar ( 2016-08-30 10:42:44 -0600 )edit

@Kishore Kumar - Did you find a way? Even though that should be highly unlikely since the map was constructed without odometry and it will hard to make the map interactive on RVIZ.

pallavbakshi gravatar imagepallavbakshi ( 2017-02-02 14:25:39 -0600 )edit

answered 2011-12-05 09:44:12 -0600

Mac gravatar image

At one point, I manually edited a map to keep a robot from making a particular navigational choice (I drew a black line onto the pgm). Worked like a charm.

(Just to add something to the list of "fun map tweaks")

edit flag offensive delete link more


Cool idea! I have to keep the robot out of the kitchen and so I was piling up boxes or other things at the entryways. So I'll try your trick instead. One question though: won't the real sensor data override the hand drawn line if the laser (or Kinect) doesn't see a real obstacle at that point in the map?
Pi Robot gravatar imagePi Robot ( 2011-12-06 01:09:09 -0600 )edit
Yes, the local data will override. However, if the global planner never decides to go over there in the first place, the local planner won't get a chance to learn that the map's wrong. My environment ("Willow Garage") was big enough that this worked.
Mac gravatar imageMac ( 2011-12-06 02:54:37 -0600 )edit
Got it. I think my environment is small enough that it doesn't work as well. The global planner often wants to take the robot through the kitchen as it is the shortest route between a number of locations.
Pi Robot gravatar imagePi Robot ( 2011-12-06 03:00:58 -0600 )edit

Hi @Mac. I'm curious about which image editing software you used to modify the maps. Thanks.

turtlebotnewbie gravatar imageturtlebotnewbie ( 2013-07-18 22:48:53 -0600 )edit

We just used gimp. It's just a bitmap, so we drew some extra black on there with the paintbrush.

Mac gravatar imageMac ( 2013-09-17 08:49:05 -0600 )edit

Tanks for the idea. It works grate. I strightet up all lines. No the map actaly look lik my basement.

GT gravatar imageGT ( 2016-05-30 22:23:30 -0600 )edit

answered 2011-12-05 06:07:57 -0600

130s gravatar image

updated 2011-12-05 06:10:00 -0600

Just as a backseat opinion to @Brian Gerkey's, I experienced that the non-existent obstacles/dots in the map influenced path planning with my turtlebot. Especially when those dots were around the narrow path, robot complained that it couldn't find valid plan. After I modified the .pgm file to remove those dots/clouded region, turtlebot began moving toward a given goal.

edit flag offensive delete link more


Good point, and I would expect that to be the case. In my answer, I was only addressing localization performance, not path-planning or overall navigation performance. Removing stray obstacles will help global path-planning (local planning will generally overwrite static map data with sensor readings).
Brian Gerkey gravatar imageBrian Gerkey ( 2011-12-05 08:41:15 -0600 )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-12-05 01:26:13 -0600

Seen: 1,269 times

Last updated: Dec 05 '11