Ask Your Question
2

rostopic hz output more than real frequency [closed]

asked 2015-02-23 06:19:29 -0600

mark_vision gravatar image

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?

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by mark_vision
close date 2017-09-27 02:18:35.713689

Comments

130s gravatar image130s ( 2015-04-07 02:48:38 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2015-10-20 02:25:23 -0600

drewm1980 gravatar image

Perhaps your issue is nodelet related? I'm new to nodelets and point clouds, but my understanding is that serialization performance on point clouds is so horrible you shouln't even attempt using them except between nodelets. And furthermore, several of the ros tools to not work well with nodelets. i.e. I do not see connections between nodes and nodelets in rqt_graph in indigo. So perhaps a nodelet-related bug in rostopic hz? Try to reproduce on a minimal example?

edit flag offensive delete link more

Question Tools

3 followers

Stats

Asked: 2015-02-23 06:19:29 -0600

Seen: 2,471 times

Last updated: Oct 20 '15