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 section on uniquely identifier interface definitions #220

Open
wants to merge 9 commits into
base: gh-pages
Choose a base branch
from

Conversation

jacobperron
Copy link
Member

Follow up from ros2/rmw_opensplice#263 (comment)

This is a proposal for uniquely identifying ROS interfaces that does not make any assumptions about the subfolder(s) where the interface definitions are found.

@jacobperron jacobperron added the in progress Actively being worked on (Kanban column) label Mar 25, 2019
@jacobperron jacobperron self-assigned this Mar 25, 2019
@jacobperron jacobperron added in review Waiting for review (Kanban column) and removed in progress Actively being worked on (Kanban column) labels Mar 25, 2019
@gbiggs
Copy link
Member

gbiggs commented Mar 26, 2019

Can we do better than relying on file system layout to uniquely identify a message? What about using package name and a hash generated from the comment-less version of the message definition?

@dirk-thomas
Copy link
Member

What about using package name and a hash generated from the comment-less version of the message definition?

That doesn't seem practical if the user has to specify a message type on the command line.

@gbiggs
Copy link
Member

gbiggs commented Mar 27, 2019

That doesn't seem practical if the user has to specify a message type on the command line.

True. I was thinking only in terms of automated tools, but the usability aspect for the user/programmer is probably more important.

Reference the IDL section on identifying interfaces and be explicit about the namespaces for messages, services, and actions.

Signed-off-by: Jacob Perron <[email protected]>
@jacobperron
Copy link
Member Author

After an offline discussion, I've updated this PR attempting to address the problem of identifying interfaces in general (pure IDL).

Signed-off-by: Jacob Perron <[email protected]>
Copy link
Member

@dirk-thomas dirk-thomas left a comment

Choose a reason for hiding this comment

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

Considering a command line tool like ros2 msg I would expect it to take a URN as an argument. The problem I see is that it doesn't know what the correct URL is in order to import the module containing the type.

articles/143_legacy_interface_definition.md Outdated Show resolved Hide resolved
articles/143_legacy_interface_definition.md Outdated Show resolved Hide resolved
Signed-off-by: Jacob Perron <[email protected]>
Signed-off-by: Jacob Perron <[email protected]>
@jacobperron
Copy link
Member Author

Considering a command line tool like ros2 msg I would expect it to take a URN as an argument. The problem I see is that it doesn't know what the correct URL is in order to import the module containing the type.

Is it possible for typesupport to provide the URL? I.e. provide a mapping from a types URN to the URL.

@dirk-thomas
Copy link
Member

Is it possible for typesupport to provide the URL? I.e. provide a mapping from a types URN to the URL.

Maybe that information could be put into the resource index. Currently each URN has a marker file in the resource index. Instead of using an empty file it could contain the URL.

@jacobperron
Copy link
Member Author

Maybe that information could be put into the resource index. Currently each URN has a marker file in the resource index. Instead of using an empty file it could contain the URL.

That might work. But is it the case that there is a marker file for each URN? It looks like there is a single marker file for the package containing relative paths to the resource files (not necessarily URNs). For example, there's a file install/test_msgs/share/ament_index/resource_index/rosidl_interfaces/test_msgs containing:

content

action/Fibonacci.action
action/Fibonacci.idl
action/NestedMessage.action
action/NestedMessage.idl
msg/BoundedArrayNested.idl
msg/BoundedArrayNested.msg
msg/BoundedArrayPrimitives.idl
msg/BoundedArrayPrimitives.msg
msg/BoundedArrayPrimitivesNested.idl
msg/BoundedArrayPrimitivesNested.msg
msg/Builtins.idl
msg/Builtins.msg
msg/DynamicArrayNested.idl
msg/DynamicArrayNested.msg
msg/DynamicArrayPrimitives.idl
msg/DynamicArrayPrimitives.msg
msg/DynamicArrayPrimitivesNested.idl
msg/DynamicArrayPrimitivesNested.msg
msg/DynamicArrayStaticArrayPrimitivesNested.idl
msg/DynamicArrayStaticArrayPrimitivesNested.msg
msg/Empty.idl
msg/Empty.msg
msg/Nested.idl
msg/Nested.msg
msg/Primitives.idl
msg/Primitives.msg
msg/StaticArrayNested.idl
msg/StaticArrayNested.msg
msg/StaticArrayPrimitives.idl
msg/StaticArrayPrimitives.msg
msg/StaticArrayPrimitivesNested.idl
msg/StaticArrayPrimitivesNested.msg
srv/Empty.idl
srv/Empty.srv
srv/Empty_Request.msg
srv/Empty_Response.msg
srv/Primitives.idl
srv/Primitives.srv
srv/Primitives_Request.msg
srv/Primitives_Response.msg

articles/142_idl.md Outdated Show resolved Hide resolved
articles/142_idl.md Outdated Show resolved Hide resolved
@jacobperron jacobperron added in progress Actively being worked on (Kanban column) and removed in review Waiting for review (Kanban column) labels Apr 8, 2019
* Use URI, instead of URN, for interface definitions
* Add forward slashes to URL and rename 'rosidl' -> 'package'

Signed-off-by: Jacob Perron <[email protected]>
Signed-off-by: Jacob Perron <[email protected]>
@jacobperron jacobperron added in review Waiting for review (Kanban column) and removed in progress Actively being worked on (Kanban column) labels May 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in review Waiting for review (Kanban column)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants