/tf_static wait for all static transforms?
Hi everyone,
is there any way to determine whether all so far available static transforms have been captured by a subscriber? /tf_static
seems to be a latched topic. So I'll assume there's some way to check if there are latched messages available, is that correct?
Cheers, Hendrik
Latched publishers should send "all" messages upon connection of a (late) subscriber. Immediately.
I don't believe there is a way to check how many "outstanding messages" there are, but I could be wrong.
(it's also conceptually difficult I believe: msgs can be published at any time, even with latched publishers, so when would you know that you've received "all of them"?)
I just need a way to detect whether I've gotten all statically defined tf frames. One alternative solution might be to have them configured in a central place and rely on that configuration everywhere I can instead of rostopics...
at a particular point in time then and for a given a priori known set, you mean? Conceptually "whether I've gotten all statically defined tf frames" seems impossible, in general. TF is a distributed system. That makes it difficult (but not impossible) to achieve a guaranteed, deterministic and coherent view of a shared state.
this sounds like you have another issue, which prompted you to ask this question.
Probably have, yes. The problem is that I have a project that interacts with ROS but does not really rely on ROS. It has its own representation of coordinate systems that I'm trying to synchronize with ROS (TF) the moment it starts. The start-up procedure includes synchronizing the TF frames with the internal representation. The reason I do that is to be able to use the project without ROS/TF in completely different setups and completely different data sources (such as ROS topics).
And that is not working for you? I expect it doesn't, otherwise you wouldn't be posting here, but your last comment does not seem to contain any description of a problem.
It kind of works by ignoring errors that occur as long as some
tf_static
frames are not processed yet. It's kind of a race condition, where my script is trying to work with frames that my synchronization callback hasn't received yet. The errors of course vanish after all expected frames have been processed fromtf_static
. It's just that I would like to streamline this so that these errors really only occur if a frame is actually missing for whatever reason (I don't necessarily configure the frames all by myself) and not just because they are not yet processed. I don't want to rely on time to consider the corresponding frames missing. I would like to be sure. The static frames are usually known in a certain environment but I, as the developer, don't have to know the setup, however, the script should. That's ...(more)