I want to open a discussion for adding metadata to message files.
I’m not sure if or how much of that already exists in the ROS2 world. But at least in ROS1 there’s no structure for comments, which for example makes it hard to generate good documentation from those files. Having other annotations can be useful as well, for example specifying a minimum value.
I have not gone into the details, but I imagine something like this:
# topic description
# @namespace xy
# field description
# @min min-value
# @ignored-value NaN
float x
float y # existing single-line field+comment is allowed as well
The tags are then parsed generically (no tag implies @comment
tag), which then can be used in a code/idl/documentation template.
This should fit into the existing .msg file format structure.
@ivanpauno I’m seeing you did some work into that direction in Generate documentation in generated C header files based on ROS interfaces comments by ivanpauno · Pull Request #593 · ros2/rosidl · GitHub already
@TSC21 fyi