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

Gmapping doesn't build a clear map

asked 2011-11-19 01:42:06 -0500

ParNurZeal gravatar image

updated 2014-01-28 17:10:50 -0500

ngrennan gravatar image

I am using P3DX, RosAria, Hokuyo URG-04LX-F01 to collect data as a bag file and put it into gmapping.

The robot moved very slow (0.03m/s). But I wonder why the map created from gmapping wasn't clear. It seems many data disappear along the way. And when I saw the process while gmapping was working. The registered data was very little. For example, after gmapping registered first scan, the bag file went for around 10 secs then gmapping registered a new scan again. Maybe because of this some data is disappeared.

I attached map image Gmapping created as well. here

How can I fix this? what is the cause for this?

edit retag flag offensive close merge delete


Can you post your bag file?
Brian Gerkey gravatar image Brian Gerkey  ( 2011-11-19 04:03:30 -0500 )edit
Thank you for your kindly help. This is the link to bag file.
ParNurZeal gravatar image ParNurZeal  ( 2011-11-22 17:26:43 -0500 )edit
I use the command "rosrun gmapping slam_gmapping scan:=scan" to proceed this bag file.
ParNurZeal gravatar image ParNurZeal  ( 2011-11-22 17:27:42 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2011-11-19 02:26:29 -0500

Ben_S gravatar image

Try playing a bit with the GMapping Parameters. If you want more frequent updates (which should be reasonable for a laserscanner with such short range like yours) you could try setting ~linearUpdate to 0.5 or even less.

For your second problem regarding the missing parts of the map, have a look at the description of the ~maxRange parameter. You should make sure, that you are setting ~maxUrange to a lower value than ~maxRange to clear areas of the map, where a laser-beam traverses but does not hit an obstacle within the range of the laserscanner.

Hope that helps.

edit flag offensive delete link more


If the update frequency is too high, performance will degrade, because it is difficult to infer the exact motion if the pose change between two scans is close to or even below the sensor noise (according to specs, up to +-4cm at 4m range for this device).
roehling gravatar image roehling  ( 2011-11-21 18:27:36 -0500 )edit
I already found the problem of this. The hokuyo sensor is broken :( some sensor data is disappear. However, your answer is very helpful., Even though some data is disappear, if I can set set the linearUpdate and the map will become clearer.
ParNurZeal gravatar image ParNurZeal  ( 2011-12-02 15:26:07 -0500 )edit
How exactly is the sensor broken? Hokuyo URG-04LX is a low power laser scanner. I observe gaps in sensor measurement often when black objects come along the way or in strong light conditions.
tom gravatar image tom  ( 2011-12-20 23:39:21 -0500 )edit
not only some data but around 100 degree wide of sensor data disappeared and that's a lot.
ParNurZeal gravatar image ParNurZeal  ( 2011-12-21 12:06:33 -0500 )edit
@ParNurZeal: OK, just wanted to point out some sensor weakness I know of. I was also very surprised to see black painted object are not discovered by the sensor at a range of 1,5-2m, so thought this might be it if the object is wide enough.
tom gravatar image tom  ( 2011-12-21 20:07:22 -0500 )edit

Hi I am getting an empty map. I paste below yaml file image: map.pgm resolution: 0.050000 origin: [-100.000000, -100.000000, 0.000000] negate: 0 occupied_thresh: 0.65 free_thresh: 0.196 Again But no transform from [/GrndTruth] to frame[/map] and no transform from [/base_GrndTruth to frame[/map]. You can view the question

RB gravatar image RB  ( 2013-11-13 18:28:39 -0500 )edit

Hi, quick question that may sound stupid but I'm not too sure about...How can I go about seeing the value of ~maxRange parameter? Also, how can I set the value of ~maxUrange parameter? Thanks!!

RND gravatar image RND  ( 2015-01-30 08:05:34 -0500 )edit

Question Tools



Asked: 2011-11-19 01:42:06 -0500

Seen: 2,943 times

Last updated: Nov 19 '11