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

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

srikara123 gravatar image

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

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 imageahendrix ( 2018-05-22 01:12:42 -0600 )edit

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

srikara123 gravatar imagesrikara123 ( 2018-05-22 01:16:30 -0600 )edit

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

Markus gravatar imageMarkus ( 2018-05-22 01:36:55 -0600 )edit

@ahendrix wrote:

This sounds a lot like #q291802.

it's an exact duplicate.

@srikara123: there is no API available for this.

gvdhoorn gravatar imagegvdhoorn ( 2018-05-22 01:44:19 -0600 )edit