Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

That error means that you are publishing data with the same timestamp as something previously published.

Repeated calls to time now are not expected to be the same if you're on wall time. However if you're inside simulated time it's relatively easy to loop faster than the clock updates. Whatever your time source is may be lower resolution. For example gazebo's default physics updates which drive the clock runs at 1kHz which looks a lot like your timestamp significant figures.

Publishing at super high rates incurs a lot of overhead for marginally little benefit unless you have a very high characteristic frequency of the transform, however physical objects are very uncommon to have natural frequencies anywhere near 1kHz.

Tf implements spherical linear interpolation so if you simply publish the rotation a couple times per revolution it can use the timestamps to interpolate between them even more accurately than a sampled solution if you can make sure that linear interpolation is a good assumption between each of your data points.