ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Adding Comments in a msg format file

asked 2013-08-20 03:29:19 -0600

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

I am a bit confused because at all the sample codes that I have seen on ROS wiki, I have seen that the comments are displayed above the code:

#Standard metadata for higher-level flow data types
#sequence ID: consecutively increasing ID 
uint32 seq
#Frame this data is associated with
string frame_id

Can I place comments infront of the code like:

 uint32 seq        #sequence ID: consecutively increasing ID  #Standard metadata 
 string frame_id   #Frame this data is associated with

Also if you are fine with both, which one is considered a good programming practice

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2013-08-20 03:36:44 -0600

TommyP gravatar image

updated 2013-08-20 03:37:08 -0600

I use the second variant but the disadvantage of that is that TAB is not treated as space properly so I have to untabify my files before saving them otherwise rosdoc_lite (or maybe doxygen) does not handle the file properly.

edit flag offensive delete link more


I am exactly doing the same thing right now. I am untabbing all the comments in my files and adding spaces because tab is 8 characters and space is only 1 character

Gudjohnson gravatar image Gudjohnson  ( 2013-08-20 04:01:30 -0600 )edit

Question Tools

1 follower


Asked: 2013-08-20 03:29:19 -0600

Seen: 3,313 times

Last updated: Aug 20 '13