Ask Your Question
0

how to set tf for gmapping

asked 2016-02-14 06:22:08 -0500

edmond320 gravatar image

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!

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
1

answered 2016-02-14 14:27:46 -0500

spmaniato gravatar image

As Akif implied in his answer, try:

rosrun gmapping slam_gmapping _odom_frame:='robot/odom'
edit flag offensive delete link more

Comments

Thank you very much, I can build the map now! Hoooray!

edmond320 gravatar imageedmond320 ( 2016-02-15 07:32:17 -0500 )edit

Cool! Could you please "mark my answer as correct" by clicking on the checkmark on the left?

spmaniato gravatar imagespmaniato ( 2016-02-15 08:09:01 -0500 )edit
4

answered 2016-02-14 13:33:31 -0500

Akif gravatar image

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.

edit flag offensive delete link more

Comments

Thank you very much, I can build the map now! Hoooray!

edmond320 gravatar imageedmond320 ( 2016-02-15 07:32:04 -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

Stats

Asked: 2016-02-14 06:22:08 -0500

Seen: 1,534 times

Last updated: Feb 14 '16