ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

bridging the gap between two tf trees

asked 2018-07-24 12:45:24 -0600

AmateurHour gravatar image

updated 2018-07-24 12:47:22 -0600

Hello! I am attempting to run a swarm of turtlebot3s from my Ubuntu16.02. I have added namespaces and tf_prefix to relevant .launch files. It seems as though no matter what I change, I can't seem to get rviz to pick up the proper transform, as shown in the following picture: rviz warnings

and I discovered from view_frames that my two tf trees are persisting as shown here: 2 tf trees .

Is the only way to fix this by publishing a transform to bridge the two base_footprints? Is this even possible? Sorry - this is all still very new to me and the other questions went over my head a little bit. Anyway, thank you for any advice you can offer!

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted

answered 2018-07-24 14:49:11 -0600

The quick fix would be to just publish a static transform from base_footprintbot1_tf/bot1/base_footprint, like this:

rosrun tf static_transform_publisher 0 0 0 0 0 0 base_footprint bot1_tf/bot1/base_footprint 10

The more elegant solution would be to make the node that publishes odombase_footprint to publish odombot1_tf/bot1/base_footprint instead. It looks like that node is called bot1/turtlebot3_core. In the launch file that launches that node, try adding the following parameter:

<param name="tf_prefix" value="bot1_tf/bot1/" />

If that doesn't work, read the documentation or source code for that node to figure out if there is a parameter that allows you to set the output frame to bot1_tf/bot1/base_footprint.

edit flag offensive delete link more


So the static transformer works, and connects the trees. Great! However, the tf_prefix solution doesn't solve the problem, and the source code for turtlebot3_core is an .ino file for arduino, and changing relevant names had no effect. Also, no map received.Any other suggestions?Really appreciate it!

AmateurHour gravatar image AmateurHour  ( 2018-07-24 17:44:29 -0600 )edit

answered 2018-07-24 17:16:08 -0600

Hi @AmateurHour,

We recently updated TurtleBot 3's firmware and software to provide users with a solution that uses multiple robots. How to use it is covered in this manual below. If you are using an older version of firmware and software, you will need to update it before you can use it.

edit flag offensive delete link more


Thank you so much for your reply, I am already up to date and using namespaces + tf_prefix in my launch files to encapsulate rah robot’s nodes and topics. Very useful feature, but still figuring it out! :)

AmateurHour gravatar image AmateurHour  ( 2018-07-24 20:51:46 -0600 )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


Asked: 2018-07-24 12:45:24 -0600

Seen: 381 times

Last updated: Jul 24 '18