0
$\begingroup$

Rosanswers logo

Hi everyone,

I am trying to build a map using gmapping with my robot in Gazebo,and I faced a problem about setting up the right tf so the gmapping can do the right job.

Now I am able to load the urdf file into Gazebo, display it in rviz and observe the data of Laser scans.

But when I use the command rosrun gmapping slam_gmapping,it says

[ WARN] [1455451234.661271473, 384.435000000]: 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 suppose the tf or the odom is not set propelly,so I tried rosrun tf view_frames, and I get

robot/odom→robot/base_footprint→base_footprint→base_link→hokuyo_link

I have also checked the tutorials and books,but these mostly use packages like turtlebot etc. in a bag playback mode rather than real-time gmapping and I could not understand how to boardcast the right transform in this case.

Can any one help on this issue? What are the exact things I need to do? Many thanks in advance!


Originally posted by edmond320 on ROS Answers with karma: 61 on 2016-02-14

Post score: 0

$\endgroup$

2 Answers 2

0
$\begingroup$

Rosanswers logo

As Akif implied in his answer, try:

rosrun gmapping slam_gmapping _odom_frame:='robot/odom'

Originally posted by spmaniato with karma: 1788 on 2016-02-14

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by edmond320 on 2016-02-15:
Thank you very much, I can build the map now! Hoooray!

Comment by spmaniato on 2016-02-15:
Cool! Could you please "mark my answer as correct" by clicking on the checkmark on the left?

$\endgroup$
0
$\begingroup$

Rosanswers logo

If you check gmapping wiki, it has lots of parameters. Therefore, if you run it without setting any parameter, it will launch with default parameters.

For example, in your case, default parameter for odom_frame is odom. So if your odom frame is robot/odom, it may not handle transformations right. Therefore you may try using a launch file with correct parameter settings.

You can take a look at turtlebot repo for a sample launch file.


Originally posted by Akif with karma: 3561 on 2016-02-14

This answer was NOT ACCEPTED on the original site

Post score: 4


Original comments

Comment by edmond320 on 2016-02-15:
Thank you very much, I can build the map now! Hoooray!

$\endgroup$

Your Answer

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