Slam gmapping segfaults after registering first scan

asked 2016-06-26 21:06:16 -0500

janindu gravatar image


I see the same question asked here and I have tried the accepted answer but it didn't work.

I have a rosbag with which I'm trying to build a map. These are the topics in registered.

$rostopic list

I'm following the tutorial How to Build a Map Using Logged Data

When I try to execute slam_gmapping I get the following output.

$rosrun gmapping slam_gmapping
[ INFO] [1466992793.125840519, 1466493874.703179718]: Laser is mounted upside down.
 -maxUrange 59.99 -maxUrange 59.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] [1466992793.137418563, 1466493874.713241796]: Initialization complete
update frame 0
update ld=0 ad=0
Laser Pose= -1405.61 -7535.06 -1.69952
m_count 0
Registering First Scan
Segmentation fault (core dumped)

I have attached the output of rosrun tf view_framesC:\fakepath\frames-page-001.jpg

I didn't remap the scan topic because my laser scan topic is scan and not base_scan which is used in the tutorials.

What should I do?

edit retag flag offensive close merge delete


You should post the log file bits. They are stored in .ROS/log. There will be several log files written while the nodes are running. You'll want to review each of them. It may help you determine which node is crashing.

billy gravatar image billy  ( 2016-06-28 23:40:54 -0500 )edit

Thank you billy. I figured out what the problem is after checking log files. Apparently my /odom topic data in the bag has been corrupted somehow. It worked perfectly with a different data set. If you post it as an answer I'd be happy to accept it.

janindu gravatar image janindu  ( 2016-06-30 20:23:25 -0500 )edit