Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Message comments generation

What is generating the comments in ROS messages?

When I run the command rosmsg show geometry_msgs/TwistStamped the output is

std_msgs/Header header
  uint32 seq
  time stamp
  string frame_id
geometry_msgs/Twist twist
  geometry_msgs/Vector3 linear
    float64 x
    float64 y
    float64 z
  geometry_msgs/Vector3 angular
    float64 x
    float64 y
    float64 z

When I run rosmsg show --raw geometry_msgs/TwistStamped the output is

# A twist with reference coordinate frame and timestamp
Header header
Twist twist

When I run rosmsg show --raw geometry_msgs/TwistStamped --bag=<input.bag> I get the output of

# A twist with reference coordinate frame and timestamp
Header header
Twist twist
================================================================================
MSG: std_msgs/Header
# Standard metadata for higher-level stamped data types.
# This is generally used to communicate timestamped data 
# in a particular coordinate frame.
# 
# sequence ID: consecutively increasing ID 
uint32 seq
#Two-integer timestamp that is expressed as:
# * stamp.sec: seconds (stamp_secs) since epoch (in Python the variable is called 'secs')
# * stamp.nsec: nanoseconds since stamp_secs (in Python the variable is called 'nsecs')
# time-handling sugar is provided by the client library
time stamp
#Frame this data is associated with
string frame_id

================================================================================
MSG: geometry_msgs/Twist
# This expresses velocity in free space broken into its linear and angular parts.
Vector3  linear
Vector3  angular
================================================================================
MSG: geometry_msgs/Vector3
# This represents a vector in free space. 
# It is only meant to represent a direction. Therefore, it does not
# make sense to apply a translation to it (e.g., when applying a 
# generic rigid transformation to a Vector3, tf2 will only apply the
# rotation). If you want your data to be translatable too, use the
# geometry_msgs/Point message instead.
float64 x
float64 y
float64 z

This last example is also what I can see as the full text of a message in a debug session. Where are the comments coming from and who is generating them? I'm finding that some of my messages have all of the correct fields, but the comments are missing and many post-processing tools use the long line of ==== to parse through a message definition.