[ros2interface] Add option to include/remove whitespace and comments#527
[ros2interface] Add option to include/remove whitespace and comments#527
Conversation
Signed-off-by: Audrow <audrow.nash@gmail.com>
Signed-off-by: Audrow <audrow.nash@gmail.com>
There was a problem hiding this comment.
To clarify, this PR is not only adds an option, but changes the default behavior so that comments are stripped out. I think this is okay to match the existing behavior in ROS 1.
I think it's worth mentioning the change of behavior in the commit message.
I am not sure that is better default behavior. The comments often provide a lot of context. I would rather see them shown by default and let uses hide them if they don't mind. |
I found it pretty difficult to understand |
|
I'm happy to make any changes depending on what we think the default behavior should be. |
And there are probably countless counter examples where without any comments the semantic is not obvious to the average user. That is why there certainly should be options to choose. In your example a lot of the overhead comes from the fact that the comments are shown repeatedly for submessages. Maybe not showing comments for submessages would be a reasonable option or only showing it once per type? |
Agreed that the option should be there
what that would look like: It certainly helps, though there are still a lot of comments that might not help me understand the twist message, especially if I'm already familiar with the nested message (like std_msgs/msg/Header). Maybe showing only the comments from the top level message by default would reduce the noise without losing the meaning? Presumably the top level message definition has enough comments to understand its semantics. Then the fields of the nested messages are there only to show how to access the data. |
👍 |
|
I can make it so only top level comments and whitespace are shown. Do we want to keep a |
👍 for having options to customize the output. Imo |
Signed-off-by: Audrow <audrow.nash@gmail.com>
|
I've change No flags (top level comments included)No comments flagAll comments flagError message with no comments and all comments flag |
Signed-off-by: Audrow <audrow.nash@gmail.com>
edc783f to
011cc77
Compare
Co-authored-by: Jacob Perron <jacob@openrobotics.org> Signed-off-by: Audrow <audrow.nash@gmail.com>
46e3565 to
04c77b4
Compare
dirk-thomas
left a comment
There was a problem hiding this comment.
Beside some minor nitpicks.
Signed-off-by: Audrow <audrow.nash@gmail.com>
|
@dirk-thomas @jacobperron @sloretz Thank you for your help and feedback! 🎉 |
Adds the ability to show an interface's whitespace and comments with the argument
--rawor-r, like in ROS1'srosmsg.