ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

Gmapping for Building a Map

asked 2014-11-02 19:27:01 -0500

ROSCMBOT gravatar image

updated 2014-11-03 11:40:05 -0500


I am trying to use gmapping package for building a map.

My tf tree is complete: map --> odom --> robot/base_footprint --> robot /base_link --> robot/laser

map --> odom is broadcast by /slam_gmapping and odom --> robot/base_footprint is broadcast by /ekf_localization

At the beginning I was getting the following warning message:

MessageFilter [target=/odom ]: Dropped 100.00% of messages so far. Please turn the [ros.gmapping.message_notifier] rosconsole logger to DEBUG for more information

I set the DEBUG mode in rqt, and I got the following message:

 MessageFilter [target=odom ]: Added message in frame laser at time 1414977417.595, count now 5

using this therad. I set rosparam set use_sim_time true, and the warning message disappeared, but the DEBUG mode is still showing the message above.

Nothing is published to /map topic.

Laser is published to robot/scan

I am not sure if I have to set the frame id for my laser which is robot/laser or not. gmapping does not seem to have such a parameter, but I have set

 <param name="base_frame" value="robot/base_footprint"/>
 <param name="odom_frame" value="odom"/>

I have also set in my launch file:

<arg name="scan_topic" default="robot/scan" />
<remap from="scan" to="$(arg scan_topic)"/>

Any thoughts?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2014-11-03 03:57:38 -0500

lebowski gravatar image

gmapping's default topic for scandata is "scan". you are using instead "robot/scan". so just remap the topic in your launchfile (i assume you use one):

<remap from="scan" to="robot/scan" />

or in your terminal:

rosrun gmapping slam_gmapping scan:=robot/scan
edit flag offensive delete link more


I'm actually remapping the scan topic in my launch file.

ROSCMBOT gravatar image ROSCMBOT  ( 2014-11-03 07:40:15 -0500 )edit

please open rviz and

  1. set "fixed frame" to "odom"
  2. add display type tf
  3. add laserscan -> set topic to "robot/scan"

lets see if any errors/warnings appear

lebowski gravatar image lebowski  ( 2014-11-03 13:50:38 -0500 )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

1 follower


Asked: 2014-11-02 19:27:01 -0500

Seen: 907 times

Last updated: Nov 03 '14