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
rosidl_adapter crashes if .msg file begins with lower case letter #414
Comments
In this design article, it is described that interface definitions have upper-case CamelCase, by convention. Perhaps we should update the article so that it is a requirement. Though, I'm not sure why it is a requirement (maybe for IDL compatibility). We could uncomment the following line to follow ROS 1 naming patterns: rosidl/rosidl_adapter/rosidl_adapter/parser.py Lines 65 to 66 in 07a2ab5
But, for now, I've opened a PR to improve the error message (#415) |
@ros2/team What is the ultimate goal? Do we want to maintain compatibility with ROS 1 interfaces that can have camelCase, or strictly only allow CamelCase? |
The current design article already uses must: The rational why that was chosen is that all names (the msg filename, the generated source filename, as well as the class name) are the same. If we want to drop that requirement we will have to accept potential collisions since two entities with different case can exist. |
I was confused because the title of the section is "Conventions". Thanks for the response! I'll close this issue then since the error is by design. |
Bug report
Required Info:
Ubuntu MATE 18.04
binaries
0.7.5-1bionic.20190823.205203
Fast-RTPS
N/A
Steps to reproduce issue
Simply start the ,msg filename with a lower case letter, eg, druai.msg rather than Druai.msg
Expected behavior
If the filename capitalization is an actual requirement, I would expect the parser to generate a reasonable error message and possibly point to the document defining the requirement.
Actual behavior
The parser Python program crashes with error messages that are not helpful the an end user.
Starting >>> druai_msg
--- stderr: druai_msg
CMake Error at /opt/ros/dashing/share/rosidl_adapter/cmake/rosidl_adapt_interfaces.cmake:60 (message):
execute_process(/usr/bin/python3 -m rosidl_adapter --package-name druai_msg
--arguments-file
/home/brutusdev/ros2/test_ws/build/druai_msg/rosidl_adapter__arguments__druai_msg.json
--output-dir
/home/brutusdev/ros2/test_ws/build/druai_msg/rosidl_adapter/druai_msg
--output-file
/home/brutusdev/ros2/test_ws/build/druai_msg/rosidl_adapter/druai_msg.idls)
returned error code 1:
Traceback (most recent call last):
rosidl_adapter.parser.InvalidResourceName: druai
Call Stack (most recent call first):
/opt/ros/dashing/share/rosidl_cmake/cmake/rosidl_generate_interfaces.cmake:130 (rosidl_adapt_interfaces)
CMakeLists.txt:24 (rosidl_generate_interfaces)
Additional information
The text was updated successfully, but these errors were encountered: