ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

performance evaluation of callbacks

asked 2018-12-06 05:01:11 -0500

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

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-12-06 05:18:28 -0500

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.

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2018-12-06 05:01:11 -0500

Seen: 392 times

Last updated: Dec 06 '18