Ask Your Question
0

no TF between base_link and map in multiple-robots in gazebo

asked 2016-12-23 01:55:21 -0500

wsAndy gravatar image

updated 2016-12-25 22:38:35 -0500

Hello everyone,

I want to simulate two robots( turtlebots ) in gazebo instead of stage_ros. I use the model described in here, and the TF problem( no transform from map to odom in amcl.Timed out waiting for transform from robot_0/base_link to map to become available before running costmap, tf error: . canTransform returned after 0.1 timeout was 0.1.) occurs. There is also another problem here, the author could add two or more robots in stage_ros but when I change the code to gazebo( simply change the world model , add gazebo_ros, change the global_frame_id,etc ), the TF problem still stay.

The topic flow is below. image description

In this experiment, I only add one robot with tf_prefix and ns, as I think if one robot is ok, than two is also.

I also try to delete the ns and tf_prefix, than the single robot could work and the topic is here. image description

Could you help me, please..

Thanks first.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2016-12-29 00:24:22 -0500

FOXTER gravatar image

I think it is because you accidentally look for you map in the namespace.
In the launch file for you nodes you should look whether your nodes subscribe to "map" or "/map".
"/map" is the global topic for the map which you want to use as the map_server should not be launched in a namespace.
From the error it seems that the issue is with amcl, so I would probably look in the amcl launch file and change "map" to "/map".
When you only write "map" amcl tries to subscribe to "robot_0/map" topic because of the namespace, but as map_server is global the topic does not exist.

edit flag offensive delete link more

Comments

Is there a way to do a similar thing for the move_base node? I have nearly the same problem as described above and with the tf_prefix can only get "/map" connected to the amcl node, not the move_base node. I've tried remap from="map" to="/map" but nothing seems to change. When I experiment without the namespace the remapping has an effect but with the namespace it seems it doesn't. Thoughts?

apletta gravatar imageapletta ( 2019-06-24 00:35:01 -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

2 followers

Stats

Asked: 2016-12-23 01:55:21 -0500

Seen: 393 times

Last updated: Dec 29 '16