Ask Your Question

How to build a map from a recording with gmapping

asked 2019-03-02 05:07:22 -0600

marian42 gravatar image

I followed this tutorial with the rosbag provided in the tutorial.

Here is the map it produces: image description

It looks like it only mapped the first scan.

Here is the output from the gmapping node:

rosrun gmapping slam_gmapping scan:=base_scan

[ INFO] [1551524238.823445558, 124.693134426]: Laser is mounted upwards.
 -maxUrange 29.99 -maxUrange 29.99 -sigma     0.05 -kernelSize 1 -lstep 0.05 -lobsGain 3 -astep 0.05
 -srr 0.1 -srt 0.2 -str 0.1 -stt 0.2
 -linearUpdate 1 -angularUpdate 0.5 -resampleThreshold 0.5
 -xmin -100 -xmax 100 -ymin -100 -ymax 100 -delta 0.05 -particles 30
[ INFO] [1551524238.836756704, 124.703192634]: Initialization complete
update frame 0
update ld=0 ad=0
Laser Pose= -19.396 -8.33452 -1.67552
m_count 0
Registering First Scan
[ WARN] [1551524238.863916087, 124.733375778]: Detected jump back in time of 0.00925415s. Clearing TF buffer.
[ WARN] [1551524239.771986838, 125.640838491]: Detected jump back in time of 0.00961792s. Clearing TF buffer.

The warning from the last line repeats. What am I doing wrong here?

Is it possible to use gmapping with a rosbag that contains just the laser scan and no transform?

I use Ubuntu 16.04 and ROS kinetic 1.12.14.

edit retag flag offensive close merge delete


i have exactly the same issue with ubuntu16.04 and kinetic 1.12.14

ypu5 gravatar image ypu5  ( 2019-04-20 00:00:32 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2019-04-20 14:43:50 -0600

ypu5 gravatar image

Hello, are you still working on this? I found the answer of this question. It seems like the bag file in the tutorials is incomplete, and I found the complete file in a Github repo.

When I use this bag file, there is no error or warning, and the produced map is just like that picture in the tutorials.

Hope it can solve your problem, good luck!

edit flag offensive delete link more


Thank you! I was about to answer your comment that I didn't figure it out, but now I'll look into that bag file.

marian42 gravatar image marian42  ( 2019-04-21 09:29:55 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2019-03-02 05:07:22 -0600

Seen: 457 times

Last updated: Apr 20 '19