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

What is the best way to determine the time it takes a service to return?

asked 2020-06-17 07:36:35 -0500

marcp17 gravatar image

Hi,

I am using ROS Melodic on Ubuntu 18.04

Is there some ROS function that returns the execution duration of a ROS service?

Or is the easiest way to get the execution duration to ros::Time::now() before and after the service is called and then finding the difference?

Thanks

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2020-06-17 08:36:37 -0500

gvdhoorn gravatar image

Is there some ROS function that returns the execution duration of a ROS service?

Not that I know of (as in: this specifically).

Or is the easiest way to get the execution duration to ros::Time::now() before and after the service is called and then finding the difference?

That could certainly work.

Another approach would be to use a profiler, perhaps something like swri-robotics/swri_profiler (but there are of course more).

edit flag offensive delete link more

Comments

Thanks for the reply. I will have a look at profilers

marcp17 gravatar image marcp17  ( 2020-06-17 08:41:22 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2020-06-17 07:36:35 -0500

Seen: 143 times

Last updated: Jun 17 '20