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

Allow generating messages and services in the namespace action #301

Closed
sloretz opened this issue Oct 17, 2018 · 0 comments
Closed

Allow generating messages and services in the namespace action #301

sloretz opened this issue Oct 17, 2018 · 0 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@sloretz
Copy link
Contributor

sloretz commented Oct 17, 2018

Feature request

It should be possible to generate code for services in a different namespace than srv, like action.

Feature description

rosidl_generator_c and rosidl_generator_cpp need to be able to generate code for messages and services in the namespace action instead of msg or srv.

Implementation considerations

subfolder variable

Messages can already be generated in the srv namespace. This is done for the Request and Response messages used for services to avoid conflicting with other messages. In the templates the variable subfolder is used to switch between msg and srv.

@# - subfolder (string)
@# The subfolder / subnamespace of the message
@# Either 'msg' or 'srv'

subfolder is populated by the location of the .msg file.

subfolder = os.path.basename(os.path.dirname(ros_interface_file))

I think this means a .msg that lived in a folder action would get the right namespace. Services don't use subfolder currently, so that will need to be changed.

CMake output file awareness

rosidl_cmake needs to know the files a generator will output ahead of time so it can create a cmake target that is invalidated when the generated files change. For services this is hardcoded to add *Request.srv and Response.srv in an srv folder. This will need to be changed to allow the service file to be in a different folder.

set(_request_file "${CMAKE_CURRENT_BINARY_DIR}/srv/${_name}_Request.msg")
set(_response_file "${CMAKE_CURRENT_BINARY_DIR}/srv/${_name}_Response.msg")

@sloretz sloretz added the enhancement New feature or request label Oct 17, 2018
@sloretz sloretz added this to the crystal milestone Oct 17, 2018
@tfoote tfoote added the in progress Actively being worked on (Kanban column) label Oct 23, 2018
@sloretz sloretz added in review Waiting for review (Kanban column) and removed in progress Actively being worked on (Kanban column) labels Oct 29, 2018
@sloretz sloretz closed this as completed Oct 31, 2018
@sloretz sloretz removed the in review Waiting for review (Kanban column) label Oct 31, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants