-
Notifications
You must be signed in to change notification settings - Fork 163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Service introspection #997
Conversation
b40a655 is a refactor partially addressing the review in #990.
Commits reconciling these changes with rclcpp and rclpy are here: |
service_event_publisher qos is now exposed in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
partial review
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Partial review of the client code changes. Some of the comments apply to services as well.
484c73e
to
07fb3ba
Compare
400b531
to
c12351c
Compare
I'm in the middle of a rewrite here, so actually changing back to a draft for now. |
f79e6d2
to
db4ebe7
Compare
This has been substantially rewritten now, so I'm going to dismiss all of the review comments, and pull this out of draft. |
This PR adds in the rcl implementation of service introspection. In particular, what it adds in are the implementations of enabling and disabling service introspection, as well as creating the publisher when the introspection is enabled. Signed-off-by: Brian Chen <[email protected]> Signed-off-by: Ivan Santiago Paunovic <[email protected]> Signed-off-by: Chris Lalancette <[email protected]>
The idea here is that by default, clients and services are created just like they were before. However, we add an additional API where the user can choose to configure service introspection, either to turn it OFF, send out METADATA, or send out CONTENTS (and METADATA). There are 4 different events that can get sent out if introspection is configured for METADATA or CONTENTS; REQUEST_SENT (from the client), REQUEST_RECEIVED (from the service), RESPONSE_SENT (from the service), or RESPONSE_RECEIVED (from the client). For each of these, a separate message is sent out a topic called <service_name>_service_event , so an outside observer can listen. Signed-off-by: Chris Lalancette <[email protected]>
Signed-off-by: Chris Lalancette <[email protected]>
Along the way, I noticed quite a few potential bugs, so this ends up mostly being a rewrite of the tests. With this in place, tests pass on all RMWs. Signed-off-by: Chris Lalancette <[email protected]>
75ea33e
to
fe72a35
Compare
Signed-off-by: Chris Lalancette <[email protected]>
Signed-off-by: Chris Lalancette <[email protected]>
I should mention that CI for this is in ros2/ros2#1285 (comment) |
* Add in the APIs to enable service introspection. This PR adds in the rcl implementation of service introspection. In particular, what it adds in are the implementations of enabling and disabling service introspection, as well as creating the publisher when the introspection is enabled. The idea here is that by default, clients and services are created just like they were before. However, we add an additional API where the user can choose to configure service introspection, either to turn it OFF, send out METADATA, or send out CONTENTS (and METADATA). There are 4 different events that can get sent out if introspection is configured for METADATA or CONTENTS; REQUEST_SENT (from the client), REQUEST_RECEIVED (from the service), RESPONSE_SENT (from the service), or RESPONSE_RECEIVED (from the client). For each of these, a separate message is sent out a topic called <service_name>_service_event , so an outside observer can listen. Signed-off-by: Brian Chen <[email protected]> Signed-off-by: Ivan Santiago Paunovic <[email protected]> Signed-off-by: Chris Lalancette <[email protected]>
This PR is part of a prototype implementation for ros-infrastructure/rep#360 ros2/ros2#1285.
Elements of note
service introspection logic is encapsulated in
introspection.{c.h}
(file name subject to change) and hooks into the service init/fini and various send/take request/response functions.runtime configuration done via
rcl_service_introspection_configure_client_events
etc. functions exposed to client library to be called on parameter event callbacksServices and headers have been broken up into
service_impl.h
andservice.h
in line with what is done for publishers to improve dependency ergonomics with service introspection (and same for clients)Service event message creationg and population is delegated to typesupport libraries
rcl_{service,client}_options_t
now has a clock and enable_service_introspection member.Related issue: Service Introspection ros2#1285
Note: this PR replaces Service Introspection #990. Reviews left on that PR have yet be resolved as of time of creating this PR but will be resolved in this PR.