Rosanswers logo

Hello all,

I am currently working on building a 2D map of lab and office environment. In the lab (approx 5m x 10m) I see really good results and great map created. However, when I extend this slam_gmapping application to outside the lab we see a drastic decrease in the accuracy of the map built.

Here is a link to the map built, it should look like two rectangular hallways.

From reading other questions I believe this is from the drift of the /odom frame and in fact I can see that it has drifted when I run the robot through a loop and bring it back to its initial position.

Therefore, I was wondering if there was a way to update the odometry frame by using estimated robot poses from the slam_gmapping package? Or is there another method towards obtaining a more accurate map of a larger scale environment?

Kind Regards, Martin

Originally posted by MartinW on ROS Answers with karma: 464 on 2013-11-20

Post score: 1

Original comments

Comment by billy on 2016-06-22:
In my experience slam_gmapping is OK with dealing with slow drift, and miserable with rotation of the robot. Even more sensitive than Hector Slam. When turning corners too fast (I assume you are joysticking robot remotely) the map gets disjointed and rotated like that. Try again with slower turns.


1 Answer 1


Rosanswers logo

I would like to suggest a few measures which you should try out once:

1.One of the possible problems could be stalling of CPU cycles, Firstly, check the CPU processing of your laptop while gmapping package is running on turtlebot and simultaneously observe the turtlebot movement in rviz. If you observe CPU cycle striking near 100% or if rviz hangs or goes offline for short time interval every time the turtlebot moves, then one of possible solution is to increase the parameter value of "map_update_interval" in gmapping package to around 25-30.

2.If still the problem exists, the other solution is increase the the parameter value "maxUrange" in gmapping package according to the environment. According to my experience if your room is about 10m by 5m , then your range shoud lie around 5m atleast.

3.Other solution might be decreasing the angular acceleration and angular velocity parameters of the robot. You may find these parameters in "base_local_planner_params" file in gmapping package.

4.According to me, last you can try is decreasing the values of parameters "linearupdate" and "angularupdate" and increase no of particle value for better robot localization in gmapping launch file.

This worked out for me.

Originally posted by sudhanshu_mittal with karma: 311 on 2013-11-20

This answer was ACCEPTED on the original site

Post score: 0


Your Answer

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