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

sendTransform does not have a parameter for the period because it only sends once immediately. If you want to publish a constant frame you need to do so inside a loop. However even if you're doing that it should not cause CPU usage spikes. It's just sending a relatively small message. And if as your question implies it's only being sent once. It definitely isn't the cause of your CPU spikes.

Quite possibly your problem is actually that the transform becomes unavailable and some code is trying to buffer or try to transform when the tf information is unavailable.

There's also a tf::StaticTransformBroadcaster. However, I'd strongly recommend moving to the tf2 static transform publisher. In tf2 static transforms are sent in a separate channel and designed to send only once using a latched publisher. So they incur as little CPU as possible. This is exactly what they were designed for.