Rosanswers logo

Hi everybody, I am trying to get the map of a room using the slam_gmapping node plus a kinect (the pointcloud is transformed in Laserscan with the pointcloud_to_laserscan package).

I am having some trouble... What is happening is that the new best pose calculated by the gmapping node is always quite far from the odometry (which is correct) and this brings to a wrong map as the robot "teleports" instantly from one position to another due to the correction.

Moreover I am getting (not so often) the following error:

[[31m[ERROR] [1319703421.207565904]: You requested a transform that is 17.136 \
seconds in the past,
but the tf buffer only has a history of 9.976 seconds.
 When trying to transform between /base_link and /odom.

As I have seen from the code this error is surely a problem because when it happens the transformation between map and odom is set to identity and this shifts everything (wouldn't be better to maintain the last transformation?). I have tried to slow down the /odom frame broadcaster down but it helps just a little.

Here is my launch file:

        <node pkg="gmapping" type="slam_gmapping" name="slam_gmapping" output="screen">
        <param name="map_update_interval" value="1.0"/>
        <param name="maxUrange" value="6.0"/>
        <param name="sigma" value="0.05"/>
        <param name="kernelSize" value="1"/>
        <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"/>
        <param name="str" value="0.01"/>
        <param name="stt" value="0.02"/>
        <param name="linearUpdate" value="0.10"/>
        <param name="angularUpdate" value="0.0.05"/>
        <param name="temporalUpdate" value="8.0"/>
        <param name="resampleThreshold" value="0.5"/>
        <param name="particles" value="300"/>
        <param name="xmin" value="-10.0"/>
        <param name="ymin" value="-10.0"/>
        <param name="xmax" value="10.0"/>
        <param name="ymax" value="10.0"/>
        <param name="delta" value="0.05"/>
        <param name="llsamplerange" value="0.01"/>
        <param name="llsamplestep" value="0.01"/>
        <param name="lasamplerange" value="0.005"/>
        <param name="lasamplestep" value="0.005"/>

Any suggestions?

Thank you

Originally posted by Lorenzo on ROS Answers with karma: 76 on 2011-10-26

Post score: 0

Original comments

Comment by sai on 2012-11-06:
Hai Lorenzo, how to convert the kinect point cloud to laser scan. The package pointcloud_to_laserscan does not have any nodes..

Comment by sai on 2012-11-09:
Thank u Lorenzo...


1 Answer 1


Rosanswers logo

Since I did it some time ago, I cannot remember well :) Whatever from the pointcloud_to_lasercan launch file I used: https://www.dropbox.com/s/mv7fg5pv2shvlk9/kinect_laser.launch

It seems to use the node of the nodelet package. Hope it will help

Originally posted by Lorenzo with karma: 76 on 2012-11-08

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.