Skip to content

Added ros2interface to replace ros2 msg/srv - #288

Merged
skucheria merged 34 commits into
masterfrom
kucheria/interface
Jun 27, 2019
Merged

Added ros2interface to replace ros2 msg/srv#288
skucheria merged 34 commits into
masterfrom
kucheria/interface

Conversation

@skucheria

Copy link
Copy Markdown
Member

Addressing #223

@skucheria
skucheria marked this pull request as ready for review June 24, 2019 23:33
@skucheria
skucheria requested a review from jacobperron June 25, 2019 00:21

@jacobperron jacobperron left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

There can be some refactoring done. Most of the functions should work for generic IDL files, and don't need to make the distinction between "msg", "srv", and "action". For options like --msg-only, we can filter the list based on the second namespace.

This might be a good time to move some of the rosidl-specific logic to another package. Perhaps as a follow-up once we have the functionality working here.

Comment thread ros2interface/package.xml Outdated
Comment thread ros2interface/package.xml Outdated
Comment thread ros2interface/package.xml Outdated
Comment thread ros2interface/package.xml Outdated
Comment thread ros2interface/package.xml Outdated
Comment thread ros2interface/ros2interface/verb/show.py Outdated
Comment thread ros2interface/ros2interface/verb/show.py Outdated
Comment thread ros2interface/ros2interface/verb/show.py Outdated
Comment thread ros2interface/ros2interface/verb/show.py Outdated
Comment thread ros2interface/ros2interface/verb/show.py
@skucheria

skucheria commented Jun 26, 2019

Copy link
Copy Markdown
Member Author
  • Linux Build Status
  • Linux-aarch64 Build Status
  • macOS Build Status
  • Windows Build Status

@skucheria
skucheria requested a review from jacobperron June 26, 2019 17:53

@jacobperron jacobperron left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looking good. In addition to addressing the comments below, I think it would be nice to add some unit tests for the functions in ros2interface/api.

Comment thread ros2interface/ros2interface/api/__init__.py Outdated
Comment thread ros2interface/ros2interface/api/__init__.py Outdated
Comment thread ros2interface/ros2interface/api/__init__.py Outdated
Comment thread ros2interface/ros2interface/api/__init__.py Outdated
Comment thread ros2interface/ros2interface/api/__init__.py
Comment thread ros2interface/ros2interface/verb/list.py Outdated
Comment thread ros2interface/ros2interface/verb/package.py Outdated
Comment thread ros2interface/ros2interface/verb/packages.py Outdated
Comment thread ros2interface/ros2interface/verb/packages.py
Comment thread ros2interface/ros2interface/verb/packages.py Outdated

@jacobperron jacobperron left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

To improve test coverage, it would be nice to add more API tests for the remaining functions.

Comment thread ros2interface/ros2interface/api/__init__.py Outdated
Comment thread ros2interface/test/test_api.py Outdated
Comment thread ros2interface/test/test_api.py Outdated
Comment thread ros2interface/test/test_api.py
Comment thread ros2interface/test/test_api.py Outdated
Comment thread ros2interface/test/test_api.py Outdated
Comment thread ros2interface/ros2interface/verb/packages.py Outdated

@jacobperron jacobperron left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, just some nitpicks and small fixes.

Comment thread ros2interface/test/test_api.py
Comment thread ros2interface/ros2interface/verb/package.py Outdated
Comment thread ros2interface/ros2interface/verb/packages.py Outdated
Comment thread ros2interface/package.xml
Comment thread ros2interface/package.xml Outdated
Comment thread ros2interface/ros2interface/verb/list.py Outdated
Comment thread ros2interface/ros2interface/verb/show.py Outdated
Siddharth Kucheria and others added 4 commits June 27, 2019 14:00
Co-Authored-By: Jacob Perron <jacob@openrobotics.org>
Co-Authored-By: Jacob Perron <jacob@openrobotics.org>
Co-Authored-By: Jacob Perron <jacob@openrobotics.org>
@skucheria

Copy link
Copy Markdown
Member Author
  • Linux Build Status
  • Linux-aarch64 Build Status
  • macOS Build Status
  • Windows Build Status

@skucheria
skucheria merged commit dec900e into master Jun 27, 2019
@delete-merged-branch
delete-merged-branch Bot deleted the kucheria/interface branch June 27, 2019 22:24
@artivis artivis mentioned this pull request Jun 28, 2019
Comment thread ros2interface/ros2interface/api/__init__.py

def get_interface_path(parts):
prefix_path = has_resource('packages', parts[0])
joined = '/'.join(parts)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This should be a platform specific separator.

Comment thread ros2interface/ros2interface/api/__init__.py
return list(sorted({
n[4:-4]
for n in interface_names
if n.startswith('srv/') and n[-4:] in ('.idl', '.srv')}))

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Several of these function look like copy-n-paste with only minimal differences. Please refactor to avoid the duplication. Also we do have a rosidl_runtime_py now so all the TODOs can be addressed.

Comment thread ros2interface/ros2interface/verb/list.py
Comment thread ros2interface/ros2interface/verb/list.py
Comment thread ros2interface/ros2interface/verb/list.py
Comment thread ros2interface/ros2interface/verb/list.py
Comment thread ros2interface/ros2interface/verb/show.py
Comment thread ros2interface/setup.py
@wjwwood wjwwood mentioned this pull request Sep 18, 2019
34 tasks
Comment thread ros2interface/ros2interface/command/interface.py
esteve pushed a commit to esteve/ros2cli that referenced this pull request Dec 16, 2022
Signed-off-by: Aditya <aditya050995@gmail.com>

Co-authored-by: Aditya <aditya050995@gmail.com>
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.

3 participants