Robotics StackExchange | Archived questions

performance evaluation of callbacks

Hi there,

I was wondering about how to measure the performance in terms of execution time per sec of a specific callback (from a topic subscription or service). Does anyone know if ROS provide such a "feature" ? I'd like to avoid reinventing the wheel :-)

Bests, Augusto

Asked by Augusto Luis Ballardini on 2018-12-06 06:01:11 UTC

Comments

Answers

I don't know of a specific feature for timing callback functions but you should be able to record the time using ros::Time::now() at the beginning and end of the function. Subtracting one from the other will give you the duration of the callback execution.

This will not give you the timing of the message passing system though, just the callback function itself.

Asked by PeteBlackerThe3rd on 2018-12-06 06:18:28 UTC

Comments