ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
This is tough.
If there's a specific operation where you want to reduce the latency, you should measure the latency at each step of the process and work to reduce the largest sources of latency first.
In the case of a ROS service call taking too long, my gut tells me the largest source of latency would be the service connection setup.
I suggest you collect timestamps at the following points, to see where the latency is:
From those timestamps, you should be able to see how long it takes to set up the service client, how long it takes for the service call to get from the client to the server, how long your USB transaction takes, and how long it takes to get the result back.
Once you have that data, that will show whether the underlying issue is setup latency, scheduling latency in the server, USB latency, or something else.