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

Gmapping stops updating map

asked 2014-06-23 07:19:55 -0600

julled gravatar image

updated 2014-06-24 15:02:16 -0600


after finally getting deeper into ROS and understanding most of the things which are necessary for using the Gmapping-SLAM ( basics like tf, odom etc ) im now at the point of testing the whole thing. There is the Problem that Gmapping stops updating the map after serval scans. But first of all i want to give you a short overview:

What i want to do: Im trying to use a simulated 2D-Scanner in VREP as source for Gmapping.

Systemconfig: I use Groovy on a Ubuntu 12.04 LTS on a old IBM X41 Laptop (1.5Ghz Centrino SinglecoreCPU)


  1. I transfered the /scan and /odom-Topic from VREP to ROS.
  2. I wrote some code ( for tf of /base_link to /odom:
def metadata_odom(data):
    global p, q, info
    info = data
    p = data.pose.pose.position
    q = data.pose.pose.orientation
    rospy.loginfo(Received odom)
  (p.x, p.y, 0), 
  (q.x, q.y, q.z, q.w),

3 . I use a static tf transform between base_link and LaserScanner_Frame: rosrun tf static_transform_publisher 0 0 0 0 0 0 base_link LaserScanner_Frame 100

This results in the following tf-tree: image description

I use Gmapping with the following Settings:

    <param name="map_update_interval" value="2"/>  <!--2-->
    <param name="maxUrange" value="5.5"/> 
    <param name="sigma" value="0.05"/>
    <param name="kernelSize" value="1.0"/>
    <param name="lstep" value="0.05"/>
    <param name="astep" value="0.05"/>
    <param name="iterations" value="5"/>
    <param name="lsigma" value="0.075"/>
    <param name="ogain" value="3.0"/>
    <param name="lskip" value="0"/>
    <param name="srr" value="0.01"/>
    <param name="srt" value="0.02"/><!--1.0-->
    <param name="str" value="0.01"/>
    <param name="stt" value="0.02"/>
    <param name="linearUpdate" value="0.1"/>     
    <param name="angularUpdate" value="0.1"/>  
    <param name="temporalUpdate" value="-1.0"/> 
    <param name="resampleThreshold" value="0.5"/>
    <param name="particles" value="50"/>  <!--80-->
    <param name="xmin" value="-50.0"/>
    <param name="ymin" value="-50.0"/>
    <param name="xmax" value="50.0"/>
    <param name="ymax" value="50.0"/>
    <param name="delta" value="0.03"/>
    <param name="llsamplerange" value="0.01"/>
    <param name="llsamplestep" value="0.01"/>
    <param name="lasamplerange" value="0.005"/>
    <param name="lasamplestep" value="0.005"/>

But if i use these settings, there is the problem that Gmapping stops updating the map after serval scans. If i look at the SLAM-Debug-Messages there are serval odd messages:

update frame 7
update ld=0.0495583 ad=0.179583
Laser Pose= 13.7771 3.96148 -0.695156
m_count 7
[DEBUG] [1403512083.321312113]: TF operating on not fully resolved frame id base_link, resolving using local prefix 
[DEBUG] [1403512083.321624443]: TF operating on not fully resolved frame id odom, resolving using local prefix 
Average Scan Matching Score=164.656
neff= 49.8545
Registering Scans:Done
[DEBUG] [1403512083.931338640]: scan processed
[DEBUG] [1403512083.933940439]: new best pose: 13.752 3.943 -0.644
[DEBUG] [1403512083.935263651]: odom pose: 13.777 3.961 -0.695
[DEBUG] [1403512083.936265942]: correction: -0.025 -0.018 0.051
[DEBUG] [1403512083 ...
edit retag flag offensive close merge delete


Are you maybe mixing times from different sources? Is there a /clock topic or/and maybe a simulation time?

dornhege gravatar image dornhege  ( 2014-06-25 06:03:26 -0600 )edit

1 Answer

Sort by » oldest newest most voted

answered 2014-06-23 09:05:47 -0600

dornhege gravatar image

The fully resolved frame id warnings are not problematic. It's basically base_link vs. /base_link, where if you just send base_link it's gonna make it to be /base_link. This is usually what you want.

What you should look at is the "Out of the back of Cache Time(stamp: 1403512072.685 + cache_length: 10.000 " and " Time jumped forward by [5.379792] for timer of period ". This seems like something is wrong with the messages you are sending. All messages should be arriving continuously with a nicely increasing timestamp and laser and tf should fit together. It seems that something in your data doesn't.

edit flag offensive delete link more


Hey domhege, thank you for your answer! You can see a new EDIT at the question. gruß aus Berlin

julled gravatar image julled  ( 2014-06-24 13:13:24 -0600 )edit

Hi julled, sorry for the off-topic but i think we try to do pretty much the same system. Could you send me a mail to andreas.gerken (at) so we can join powers? Thanks Andreas Gruß aus Ingolstadt :)

andreas.gerken gravatar image andreas.gerken  ( 2014-06-25 11:54:32 -0600 )edit

Question Tools

1 follower


Asked: 2014-06-23 07:19:55 -0600

Seen: 1,425 times

Last updated: Jun 24 '14