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

TF tree breaks if parent is lost?

asked 2018-06-06 15:15:46 -0600

aerotec88 gravatar image

updated 2018-06-06 18:07:55 -0600

In a multiple robot situation, will all child coordinate frames in a TF tree stop working if communication with the parent is lost?

For example, I have two aircraft that are trying to localize themselves to a ground target. The first aircraft (aircraft 1) is able to see the ground target and track it using the transformation from ground target to aircraft 1. The second aircraft (aircraft 2) can only see aircraft 1. Currently, our parent in our TF tree is aircraft 2's frame. If communication is lost between aircraft 1 and aircraft 2, can aircraft 1 no longer compute the transformation between itself and the ground target?

If this is the case, is there a workaround for this problem? Or is TF just not reliable for multiple robots with intermittent coms?

I've searched for this topic and it seems like it is a fairly fundamental concept, however, I was unable to find the answer. If I missed some link that obvious, please let me know. Thanks.

Edit: I don't have enough Karma to upload a figure, but here is what my TF tree looks like. We are not localizing in a world frame, but rather everything is relative to Aircraft 2. In theory, if we don't have the transform from Aircraft 2 to 1, we should still have the transform from Aircraft 1 to the ground target in some other relative coordinate frame. You can also view Aircraft 2 as a world frame. If you lose contact with the world frame, will TF still allow for locally observed coordinate frames to be calculated assuming Aircraft 1 has a bearing and range to the ground target?

Aircraft 2 --------> Aircraft 1 ---------> Ground target

Another view of this could be:

World ----------> Robot -----------> Target

If World to Robot is lost, can Robot to Target still be calculated in TF or will TF break if the parent coordinate frame is no longer communicating? This is not to be confused with:

Target <---------- World ----------> Robot

In which case it is clear that if the World is lost, Robot to Target cannot be calculated.

Edit2: I can now attach an image of my TF tree. If I lose handoff_mav_1, can I still calculate the link circled in red? image description

edit retag flag offensive close merge delete



Can you upload the printout of your tf tree now?

jayess gravatar image jayess  ( 2018-06-06 17:56:55 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2018-06-06 16:49:29 -0600

tfoote gravatar image

updated 2018-06-06 18:23:23 -0600

A diagram of your tree might be helpful to understand your setup. In general if you loose communication you will only be able to compute transform to information that is known locally, whether that information is available through tf transforms or through any other mechanism.

If you have both vehicles relative to a world or map frame. They can compute transform to anything that they have information about.

If a link in a tf tree is broken you can still query within the two resultant subtrees. So you should make sure that you structure your tree in a way that both vehicles can conduct their queries even if the information from the other vehicle is not available.

Update based on diagram:

Yes you can always query some subpart of the tree, it doesn't matter what the rest of the tree looks like. tf only computes the minimum spanning set.

So the classic diagram would be

world -> robot1 -> tracking target
      \-> robot2

If both robots are in communications everything can be transformed. If robot1 and robot2 cannot communicate then robot1 can transform relative to tracking or world, but robot 2 only knows about itself and world.

So for your circled part as long as that transform is being published on that vehicle you can query for that transform.

edit flag offensive delete link more


I've added an edit to clarify. Please let me know if more clarification is needed. Thank you for your response. It sounds like you are speaking of the last case, but I may be interpreting your answer incorrectly, in which case I apologize.

aerotec88 gravatar image aerotec88  ( 2018-06-06 17:56:21 -0600 )edit

Great. Thank you very much. I must have something else wrong in my code that's causing it to break then. I started to doubt because of some documentation about TF2 that was a little unclear. Thanks again and I'll give this a try.

aerotec88 gravatar image aerotec88  ( 2018-06-06 18:28:18 -0600 )edit

Question Tools

1 follower


Asked: 2018-06-06 15:15:46 -0600

Seen: 395 times

Last updated: Jun 06 '18