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

No input service request from the command line #487

Merged
merged 5 commits into from
Mar 21, 2024

Conversation

caguero
Copy link
Collaborator

@caguero caguero commented Mar 21, 2024

🦟 Bug fix

Fixes #97 and #474

Summary

This patch makes it possible to request a no input service request from the command line. Before, it was possible passing --reqtype gz.msgs.Empty but always adding the --req 'unused: true'

How to test it?

You can compile the examples, and then:

  1. Launch the no-input responser:
./responser_no_input
  1. Request the service using the "old" way:
gz service -s /quote --reqtype gz.msgs.Empty --reptype gz.msgs.StringMsg -r 'unused:true'
  1. Use the new no-input request and verify that you still get a reply:
gz service -s /quote --reptype gz.msgs.StringMsg -r

Note that both requests should reach the responser and you should get a reply on the requester terminal:

data: "This is it! This is the answer. It says here...that a bolt of lightning is going to strike the clock tower at precisely 10:04pm, next Saturday night! If...If we could somehow...harness this lightning...channel it...into the flux capacitor...it just might work. Next Saturday night, we\'re sending you back to the future!"

Checklist

  • Signed all commits for DCO
  • Added tests
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • Consider updating Python bindings (if the library has them)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.

Signed-off-by: Carlos Agüero <caguero@openrobotics.org>
@caguero caguero requested a review from azeey March 21, 2024 18:38
@iche033 iche033 added the 🎵 harmonic Gazebo Harmonic label Mar 21, 2024
@caguero
Copy link
Collaborator Author

caguero commented Mar 21, 2024

@osrf-jenkins run tests please

Signed-off-by: Carlos Agüero <caguero@openrobotics.org>
Signed-off-by: Carlos Agüero <caguero@openrobotics.org>
Signed-off-by: Carlos Agüero <caguero@openrobotics.org>
Copy link

codecov bot commented Mar 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.83%. Comparing base (eac2e69) to head (7b1e4de).
Report is 8 commits behind head on gz-transport13.

Additional details and impacted files
@@                Coverage Diff                 @@
##           gz-transport13     #487      +/-   ##
==================================================
+ Coverage           87.69%   87.83%   +0.14%     
==================================================
  Files                  59       59              
  Lines                5704     5706       +2     
==================================================
+ Hits                 5002     5012      +10     
+ Misses                702      694       -8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@azeey
Copy link
Contributor

azeey commented Mar 21, 2024

I think you need to merge from gz-transport13 to fix the ABI checker issues. This repo doesn't require having the branch up-to-date to merge, but we can enable it if we want.

@iche033 iche033 merged commit 2b7758c into gz-transport13 Mar 21, 2024
10 checks passed
@iche033 iche033 deleted the gz_srv_no_input branch March 21, 2024 23:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🎵 harmonic Gazebo Harmonic
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Call one-way requester / responder from command line
3 participants