Ask Your Question

Clarification on comment format for message definitions

asked 2020-07-20 13:36:43 -0600

rgov gravatar image

updated 2020-07-20 13:37:35 -0600

The message definition language documentation ( says:

string EXAMPLE="#comments" are ignored, and leading and trailing whitespace removed

string constants are assigned the value of everything to the right of the equals sign, with leading and trailing whitespace removed. As such, you cannot leave a comment on a string constant definition.

This is the only reference in the specification to comments. Are comments otherwise supported? The example given is confusing because we generally say comments are ignored in all languages, but I think it's saying that comment parsing is not in effect for string constant definitions?

Also the example further confuses because of the quotation marks. Are those intended to be used for string constants or not? It seems not...

Are the shortcomings of the format resolved in ROS 2?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2020-07-20 13:57:28 -0600

Yes, comments are otherwise supported. Use the # sign. Same message definitions (other than renaming of packages) will work in ROS2 as well.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2020-07-20 13:36:43 -0600

Seen: 80 times

Last updated: Jul 20 '20