Ask Your Question

Revision history [back]

The comments are just part of the original .msg file (TwistStamped, then Twist and finally Vector3).

rosmsg show geometry_msgs/TwistStamped only shows you message fields and layout. It doesn't show the comments.

rosmsg show --raw geometry_msgs/TwistStamped shows you the raw message definition (identical to the one in the source repository I linked above).

Finally: rosmsg show --raw geometry_msgs/TwistStamped --bag=<input.bag> reads the message definition from the .bag, which is slightly special: .bags store the complete message definition, recursively, down to the last non-primitive types. So for TwistStamped, it first stores the definition of TwistStamped, then goes down one level, stores the definition of Header, then moves onto Twist, then Vector3. It separates each of those with =-signs.

It does this to make a .bag (almost) completely stand-alone, and independent of the message definitions as they happen to be present on a machine that plays back the .bag (as message definitions can change, which would make it impossible to replay the .bag).

Where are the comments coming from and who is generating them?

I hope this is now clear: they aren't being generated. They have always been part of the message/service/action definition files.

The comments are just part of the original .msg file (TwistStamped, then Header, Twist and finally Vector3).

rosmsg show geometry_msgs/TwistStamped only shows you message fields and layout. It doesn't show the comments.

rosmsg show --raw geometry_msgs/TwistStamped shows you the raw message definition (identical to the one in the source repository I linked above).

Finally: rosmsg show --raw geometry_msgs/TwistStamped --bag=<input.bag> reads the message definition from the .bag, which is slightly special: .bags store the complete message definition, recursively, down to the last non-primitive types. So for TwistStamped, it first stores the definition of TwistStamped, then goes down one level, stores the definition of Header, then moves onto Twist, then Vector3. It separates each of those with =-signs.

It does this to make a .bag (almost) completely stand-alone, and independent of the message definitions as they happen to be present on a machine that plays back the .bag (as message definitions can change, which would make it impossible to replay the .bag).

Where are the comments coming from and who is generating them?

I hope this is now clear: they aren't being generated. They have always been part of the message/service/action definition files.