Rosanswers logo


i am trying to visualize a map in rviz using slam_gmapping on my youbot. When adding the display Map to rviz and choosing map as topic the warning "No map received" occurs. I can visualize the sensor data in rviz by adding the display laser scan but it does not create a map. I searched for this error in ros answers but could not find an answer fixing my problem.

The ROS_MASTER_URI is set to my youbot: ROS_MASTER_URI=http: //Jakobs-youBot:11311/

My tf tree is map -> odom -> base_footprint -> scan.

My laser scan topic is scan.

I am starting slam_gmapping with

$ rosrun gmapping slam_gmapping scan:=base_scan

and do not get any output after starting it. Is this supposed to be like that?

I am using a youbot with ubuntu 12.04 and ROS hydro. My the laser i am using is a hokuyo laser.

I really do not have any idea what i am doing wrong. If anyone can help me, i would really appreciate it. If you need any more information, please let me know.

Thanks a lot.

Originally posted by m.hoev on ROS Answers with karma: 68 on 2014-06-30

Post score: 2


2 Answers 2


Rosanswers logo

If your laser topic is scan you should not add the remapping scan:=base_scan. This would tell gmapping that the laser topic is base_scan.

Originally posted by dornhege with karma: 31395 on 2014-06-30

This answer was ACCEPTED on the original site

Post score: 2

Original comments

Comment by m.hoev on 2014-07-05:
when using the remapping i do not get any warnings in my terminal. When not adding it i get the warning: Failed to compute laser pose, aborting initialization ("base_link" passed to lookupTransform argument target_frame does not exist. )

Comment by dornhege on 2014-07-05:
Good! This mean that it received a scan now. Your TF setup seems to be missing something. You need to check if the mentioned frames exist or give the correct ones as parameters to gmapping.

Comment by m.hoev on 2014-08-05:
Yes, that helped a lot. Tanks. I wrote a launch file, that uses my parameters.


Rosanswers logo

My gmapping.launch file that solved the problem:

  <node pkg="gmapping" type="slam_gmapping" name="slam_gmapping" output="screen">
      odom_frame: odom
      map_update_interval: 0.5
      maxUrange: 30.0
      maxRange: 60.0
      sigma: 0.05
      kernelSize: 1
      lstep: 0.05
      astep: 0.05
      iterations: 5
      lsigma: 0.075
      ogain: 3.0
      lskip: 0
      linearUpdate: 0.5
      angularUpdate: 0.436
      temporalUpdate: -1.0
      resampleThreshold: 0.5
      particles: 80
      xmin: -1.0
      ymin: -1.0
      xmax: 1.0
      ymax: 1.0
      delta: 0.025
      llsamplerange: 0.01
      llsamplestep: 0.01
      lasamplerange: 0.005
      lasamplestep: 0.005
      base_frame: base_footprint

Originally posted by m.hoev with karma: 68 on 2014-08-05

This answer was NOT ACCEPTED on the original site

Post score: 2


Your Answer

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