how to find rostopic hz programatically in cpp (not in python)

asked 2018-05-22 00:43:14 -0500

srikara123 gravatar image

updated 2018-05-22 01:13:04 -0500

Hi,

I want to calculate the frequency in which a message got published on an topic, we have rostopic hz as command line tool, how to do it programatically in cpp ?

Thanks

edit retag flag offensive close merge delete

Comments

This sounds a lot like #q291802.

ahendrix gravatar image ahendrix  ( 2018-05-22 01:12:42 -0500 )edit

i wanted to know whether any api is available for this now ?

srikara123 gravatar image srikara123  ( 2018-05-22 01:16:30 -0500 )edit

You can just measure the difference of the header time stamps between two messages or?

Markus gravatar image Markus  ( 2018-05-22 01:36:55 -0500 )edit

@ahendrix wrote:

This sounds a lot like #q291802.

it's an exact duplicate.

@srikara123: there is no API available for this.

gvdhoorn gravatar image gvdhoorn  ( 2018-05-22 01:44:19 -0500 )edit