Robotics StackExchange | Archived questions

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

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

Asked by srikara123 on 2018-05-22 00:43:14 UTC

Comments

This sounds a lot like #q291802.

Asked by ahendrix on 2018-05-22 01:12:42 UTC

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

Asked by srikara123 on 2018-05-22 01:16:30 UTC

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

Asked by Markus on 2018-05-22 01:36:55 UTC

@ahendrix wrote:

This sounds a lot like #q291802.

it's an exact duplicate.

@srikara123: there is no API available for this.

Asked by gvdhoorn on 2018-05-22 01:44:19 UTC

Answers