ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Problem in using gmapping with tf (tf2_msg/tfMessage) topic

asked 2015-10-01 11:48:52 -0500

mohsen1989m gravatar image

updated 2015-10-02 07:45:14 -0500

Hi folks,

I am trying to use the gmapping node which subscribes to tf (tf/tfMessage) and scan (sensor_msgs/LaserScan) topics but the published topics (map and map_metadata) are unknown. I guess the problem is that I am publishing tf (tf2_msgs/tfMessage) instead of tf (tf/tfMessage) but I don't know how to solve it.

Any ideas?

Thank you very much in advance

I launch gmapping using the following code

  <node pkg="gmapping" name="slam_gmapping" type="slam_gmapping" args="scan:=scan" respawn="false" output="screen">

Edit: Here is my tf Tree

image description

And my rviz view:

image description

My topics being published:

image description

And my node graphs

image description

edit retag flag offensive close merge delete


Hi, your question is that when you use rostopic echo /map and there is none map data, right ?

wsAndy gravatar image wsAndy  ( 2015-10-01 21:50:36 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2015-10-01 22:00:59 -0500

wsAndy gravatar image

If you use gmapping, you also need odometry message ( nav_msgs/Odometry) if you want to create map. You can test it with stage_ros. image description

image description

edit flag offensive delete link more


Thank you for your answer. I am trying to do the mapping with my robot, I created a similar tf Tree unless the laser frame is "base_laser" instead of "base_laser_link". I still have problem. In rviz I get an error in front of Map/Transform : No transform from [ ] to [map]

mohsen1989m gravatar image mohsen1989m  ( 2015-10-02 05:20:30 -0500 )edit

Well, please check your TF tree. Or put more details about your problem.

wsAndy gravatar image wsAndy  ( 2015-10-02 05:56:26 -0500 )edit

Thank you for your help, I added more information to the question :) Looking forward to your answer

mohsen1989m gravatar image mohsen1989m  ( 2015-10-02 07:39:44 -0500 )edit

change the fixed frame to map, have a try. I wonder if you have the data of map? try rostopic echo /map

wsAndy gravatar image wsAndy  ( 2015-10-04 12:40:39 -0500 )edit

Thank you for your answer, it is solved. It was a problem with rviz ...

mohsen1989m gravatar image mohsen1989m  ( 2015-10-04 13:04:56 -0500 )edit

Woo, good luck!

wsAndy gravatar image wsAndy  ( 2015-10-04 13:07:02 -0500 )edit

Question Tools

1 follower


Asked: 2015-10-01 11:48:52 -0500

Seen: 995 times

Last updated: Oct 02 '15