0
$\begingroup$

Rosanswers logo

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">
  </node>

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


Originally posted by mohsen1989m on ROS Answers with karma: 397 on 2015-10-01

Post score: 0


Original comments

Comment by wsAndy on 2015-10-01:
Hi, your question is that when you use rostopic echo /map and there is none map data, right ?

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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


Originally posted by wsAndy with karma: 224 on 2015-10-01

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by mohsen1989m on 2015-10-02:
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]

Comment by wsAndy on 2015-10-02:
Well, please check your TF tree. Or put more details about your problem.

Comment by mohsen1989m on 2015-10-02:
Thank you for your help, I added more information to the question :) Looking forward to your answer

Comment by wsAndy on 2015-10-04:
change the fixed frame to map, have a try. I wonder if you have the data of map? try rostopic echo /map

Comment by mohsen1989m on 2015-10-04:
Thank you for your answer, it is solved. It was a problem with rviz ...

Comment by wsAndy on 2015-10-04:
Woo, good luck!

$\endgroup$

Your Answer

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