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 service call prototype completer #300

Merged

Conversation

artivis
Copy link
Contributor

@artivis artivis commented Jul 17, 2019

Add a service request prototype completer to ros2 service call.
E.g.

$ ros2 service call /add_two_ints example_interfaces/srv/AddTwoInts [tab][tab]
a:\ 0\^Jb:\ 0\  -r              --rate

Not very pretty but one can at least figure out the first few characters of the request body.
Then,

$ ros2 service call /add_two_ints example_interfaces/srv/AddTwoInts "a [tab]

resolves to,

ros2 service call /add_two_ints example_interfaces/srv/AddTwoInts "a: 0
b: 0"

This follows the work initiated in #298.

Signed-off-by: artivis jeremie.deray@canonical.com

@artivis artivis force-pushed the feature/service-call-prototype-completer branch 2 times, most recently from f3e4dc7 to 691f115 Compare July 17, 2019 19:06
@artivis artivis force-pushed the feature/service-call-prototype-completer branch 2 times, most recently from b85e04c to e623ffc Compare July 26, 2019 20:41
parts = full_service_type.split('/')
package_name = parts[0]
interface_type = parts[1]
service_type = parts[-1]
Copy link
Member

@ivanpauno ivanpauno Aug 2, 2019

Choose a reason for hiding this comment

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

Same comment as at #301 (comment).

Signed-off-by: artivis <jeremie.deray@canonical.com>
@artivis artivis force-pushed the feature/service-call-prototype-completer branch from e623ffc to a345e63 Compare August 7, 2019 15:07
@artivis
Copy link
Contributor Author

artivis commented Aug 7, 2019

@ivanpauno updated the PR to benefit from ros2/rosidl_python#78

@ivanpauno
Copy link
Member

Sanity check:

  • Linux: Build Status

@ivanpauno ivanpauno merged commit dacbdfd into ros2:master Aug 7, 2019
@kyrofa kyrofa mentioned this pull request Sep 4, 2019
34 tasks
esteve pushed a commit to esteve/ros2cli that referenced this pull request Dec 16, 2022
If a substitution evaluates to the empty string, then yaml.safe_load() will return None, resulting
in an exception being raised. Instead, this commit allows for the empty string by first wrapping
it in an extra set of quotes before passing to yaml.safe_load().

Signed-off-by: Jacob Perron <jacob@openrobotics.org>
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.

None yet

2 participants