rosidl_cmake: install interface files to same folder as idl#935
rosidl_cmake: install interface files to same folder as idl#935techtasie wants to merge 1 commit intoros2:rollingfrom
Conversation
fujitatomoya
left a comment
There was a problem hiding this comment.
i think this is reasonable fix and consistent behavior.
IMO, keeping message files under msg/ is NOT a hard requirement for the development.the rosidl_generate_interfaces() CMake macro technically accepts paths with subfolders (like msg/ros2/ldmrs/SickLdmrsObject.msg), so it doesn't reject them at build time. (packages build and the messages work at runtime for publishing/subscribing.) however, the ros2interface tooling assumes the standard layout.
the PR fixes real root cause and provides more consistency that two interfaces can't have the same name within a package anyway, so the subfolder separation provides no real benefit.
lgtm with green CI.
i would like to have another approval from other maintainers before merge.
|
Pulls: #935 |
|
I assume this cannot be back-ported since it changes the file layout. I would work on a patch for |
|
I'm a bit concerned about this change. A lot of downstream tools (e.g., Could you take a look at some |
|
@christophebedard I think there is a misunderstanding here. To clarify, I am using the term Interface file to refer to the
If you want to retrieve the files, you can use get_interface_path, but it only returns the IDL files and not the Interface files. I will provide an example:
The following AMENT resources are generated: The contents of The files are installed as following: On my humble machine I get the following output from python: This shows that installing the interface files into a different folder than the IDL files causes a problem when using these functions. Regarding hard-coding, I assume that packages simply do This pr simply moves the Interface file into the same folder as the IDL file. Thanks for the tip. I realized that the AMENT |
|
@christophebedard friendly ping. |
Signed-off-by: Tim Wendt <techtasie@gmail.com>
|
@fujitatomoya, I fixed the CI. I forgot to change the logic at the generation for the AMENT resource. Could you trigger the CI Build again? |
|
@christophebedard @fujitatomoya friendly ping. |
|
@christophebedard can you check the comment on #935 (comment) |
Description
Changes the install location for the interface files to
share/${PROJECT_NAME}/<msg/srv/action>. The current logic of installing toshare/${PROJECT_NAME}/${_parent_folder}separates idl and interface files into separate folders which breaksros2 interface show. Furthermore there can't be two interfaces with the same name anyways, therefore separating them into sub folders is not providing any advantages and is just confusing.Fixes #933
Is this user-facing behavior change?
Did you use Generative AI?
ChatGPT 5.2 has been used to explain regex.
Additional Information
Also affects ros2/ros2cli#1186 and RobotWebTools/rclnodejs#1388