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

Revision history [back]

click to hide/show revision 1
initial version

I realize this is an old question, but it still deserves an answer.

The proper way to do this is to keep a single /tf_static publisher, and publish all of your transforms to it as a single message.

tf2_ros provides the StaticTransformBroadcaster class that manages a vector of transforms and manages the details for you. (calling sendTransform automatically adds the transforms you pass and publishes everything in a single message)

The reason to include all of your transforms in a single message is because latched topics in ROS only deliver the most recently published message to new subscribers, so that single message has to include everything you want to publish. (otherwise new subscribers won't get the whole system state)