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?
Originally posted by mark_vision on ROS Answers with karma: 275 on 2015-02-23
Post score: 2
Original comments
Comment by 130s on 2015-04-07:
Looks similar http://answers.ros.org/question/206493/rostopic-hz-inaccurate/