ros2 / ros2_tracing

Tracing tools for ROS 2.
https://docs.ros.org/en/rolling/
Apache License 2.0
144 stars 43 forks source link

Instrument service and client for end-to-end request/response tracking #143

Open christophebedard opened 2 weeks ago

christophebedard commented 2 weeks ago

This is similar to tracking messages from publisher to subscription (publication to callback). We want to be able to track a request from the publication/send on the client side to the take & callback on the service side, and similarly for responses.

Some tracepoints already exist:

And the following tracepoints are also used for services with AnyServiceCallback:

The following tracepoints are missing:

To track a request/response from end to end, we would ideally use a combination of the client GID + sequence number. With pubs/subs, the publisher GID read from the publisher's side does not match the publisher GID on the subscription's side. However, this may work with clients/services, because the client GID value is sent as-is alongside the request/response; we do not have to rely on the underlying DDS implementation, which could be faulty (https://github.com/ros2/rmw_cyclonedds/issues/377).

Add tests in test_tracetools, and update the design document.

christophebedard commented 2 weeks ago

I'm currently working on this.