Using tf_static for almost static transforms
Hi,
I have a node that will define some TF frames at some points in time along the robot trajectory. They will be defined by transformations with /map
as the frame_id
. These transformations will eventually change later, but the frequency of change will be very very low, and basically event driven (whenever a loop closing happens).
I was wondering if in this case using /tf_static
would be a good choice here, given the low frequency of updates on these transforms, even if the transformations are not constant. But I'm getting confused with the latching concept and the following text from the tf2 migration page:
It is expected that publishers on "/tf_static" publish using latched topics, the tf2_ros static_transform_publisher does this correctly. Note: avoid multiple latched static transform publishers on /tf_static in the same process, because with multiple latched publishers within the same node only one will latch correctly.
So, the first question is: is it possible to implement what I want using /tf_static
?
If it is indeed possible, how should I implement it to make the latching work properly? Should I create a publisher every time I need to update one of the transforms, destroying it later? Or having only one that would publish everything on /tf_static
would do?