rostopic hz output more than real frequency [closed]
Hi All, I have a callback function that takes point clouds from a openni device at a frequency of 30 Hz. Inside that function I do some computations with it and then I publish the outcome of my computations using the time of the cloud I received, because the result is related to that specific cloud.
Since the computation is sometimes slow, I expect that the frequency of publication is lower than 30 Hz, but actually when I run rostopic hz
on the topic I get 30 Hz, even though when I print the time inside the callback and I count the prints within a second I get around 20.
How is it possible?
Looks similar http://answers.ros.org/question/20649...