ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Effects of manually editing gmapping maps?

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

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 -0500

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 image Pi Robot  ( 2011-12-05 01:57:20 -0500 )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 image Kishore Kumar  ( 2016-08-30 10:42:44 -0500 )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 image pallavbakshi  ( 2017-02-02 14:25:39 -0500 )edit

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

130s gravatar image

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

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 image Brian Gerkey  ( 2011-12-05 08:41:15 -0500 )edit

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

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 image Pi Robot  ( 2011-12-06 01:09:09 -0500 )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 image Mac  ( 2011-12-06 02:54:37 -0500 )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 image Pi Robot  ( 2011-12-06 03:00:58 -0500 )edit

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

turtlebotnewbie gravatar image turtlebotnewbie  ( 2013-07-18 22:48:53 -0500 )edit

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

Mac gravatar image Mac  ( 2013-09-17 08:49:05 -0500 )edit

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

GT gravatar image GT  ( 2016-05-30 22:23:30 -0500 )edit

@Mac how did you draw the line in the pgm so that it represents the exact map coordinate syou want?

pravi gravatar image pravi  ( 2020-11-05 14:16:38 -0500 )edit

you can take referance of existing known land marks, I have a stair case which goes to ground floor.When I mapped it , it show as opening .I have drawn a line exactly at the entrance of the star case.I had wooden railing .I had taken that as referrance point and drawn till the wall

Surya gravatar image Surya  ( 2020-12-27 06:00:12 -0500 )edit

Question Tools



Asked: 2011-12-05 01:26:13 -0500

Seen: 3,620 times

Last updated: Dec 05 '11