Skip to content
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

Add two example packages of service client and service server to understand asynchronism #398

Open
wants to merge 2 commits into
base: rolling
Choose a base branch
from

Conversation

santiago-tapia
Copy link

This PR add two new packages in C++ services examples.

  • The server example introduces a response delay in the service, configurable via a parameter. The purpose of this example is to bring the service response time to a user-perceivable scale, allowing the effects of such delays to be better observed.
  • The client example uses a callback to receive the server's response. By using a callback, the main program of the node can follow the usual implementation of the main function in any other node; the spin method can be used, and there is no synchronous blocking call to wait for the response.

Signed-off-by: Santiago Tapia-Fernández <[email protected]>
Signed-off-by: Santiago Tapia-Fernández <[email protected]>
Copy link

@MichaelOrlov MichaelOrlov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@santiago-tapia Thanks for the PR.
We have discussed this PR on today's issue triage meeting, and we are curious how these proposed examples differ from the existent services tutorial https://docs.ros.org/en/rolling/Tutorials/Beginner-Client-Libraries/Writing-A-Simple-Cpp-Service-And-Client.html

We think that It would be better to change the existing tutorial rather than add new examples.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants