Ask Your Question
0

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
2

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

Comments

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 imageGudjohnson ( 2013-08-20 04:01:30 -0600 )edit

Your Answer

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

Add Answer

Question Tools

1 follower

Stats

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

Seen: 857 times

Last updated: Aug 20 '13