<commit_before>
This document defines a style guide which should be followed by all code 
that is written in the Robot Locomotion Group.  Being consistent with this style will
make the code easier to read, debug, and maintain. 

 - Russ, August 1, 2010


This document was inspired by the c++ style guide for ROS: 
http://www.ros.org/wiki/CppStyleGuide
It makes use of the follow shortcuts for naming schemes:

  CamelCased: The name starts with a capital letter, and has a capital letter for each new word, with no underscores.
  camelCased: Like CamelCase, but with a lower-case first letter
  under_scored: The name uses only lower-case letters, with words separated by underscores.
  Under_scored: The name starts with a capital letter, then uses under_score.
  ALL_CAPITALS: All capital letters, with words separated by underscores.


Some of the files in the repository were written before this style guide.  
If you find one, rather than trying to change it yourself, log a bug in bugzilla.


In General: 

  Robot Names are CamelCased.


In Java:

  Class names (and therefore class filenames/directories) are CamelCased
  Methods names are camelCased
  Variable names are under_scored
  Member variables are under_scored with a leading m_ added
  Global variables are under_scored with a leading g_ added
  Constants are ALL_CAPITALS

  Every class and method should have a brief "javadoc" associated with it.

  All java classes should be in packages relative to the locomotion svn root, e.g.:
   package robotlib.examples.Pendulum;
   package robots.compassTripod;


In Matlab: 

  All of the above rules hold, except:
     Member variables need not start with m_ since the requirement that they are referenced with obj.var makes the distinction from local variables clear
     Variable names that describe a matrix (instead of vector/scalar) are Under_scored.
  Calls to Matlab class member functions use obj = memberFunc(obj,...) .
  All methods begin by checking their inputs (e.g. with typecheck.m).


In C++: 
  
  All of the above rules still hold.
  Filenames for .cpp and .h files which define a single class are CamelCased.
  Filenames for .cpp and .h files which define a single method are camelCased.  
  Filenames for any other .cpp and .h files are under_scored.

LCM:
  
  LCM types are under_scored with a leading lcmt_ added. If the type is specific to a particular robot, then it begins with lcmt_robotname_.
  Channel names are under_scored, and ALWAYS begin with robotname_. 
  Variable names in LCM types follow the rules above.


Makefiles: 

  %  garratt says use CMAKE??<commit_msg>fixed channel name in move.cpp, increased timeout in amp.cpp<commit_after>
This document defines a style guide which should be followed by all code 
that is written in the Robot Locomotion Group.  Being consistent with this style will
make the code easier to read, debug, and maintain. 

 - Russ, August 1, 2010


This document was inspired by the c++ style guide for ROS: 
http://www.ros.org/wiki/CppStyleGuide
It makes use of the follow shortcuts for naming schemes:

  CamelCased: The name starts with a capital letter, and has a capital letter for each new word, with no underscores.
  camelCased: Like CamelCase, but with a lower-case first letter
  under_scored: The name uses only lower-case letters, with words separated by underscores.
  Under_scored: The name starts with a capital letter, then uses under_score.
  ALL_CAPITALS: All capital letters, with words separated by underscores.


Some of the files in the repository were written before this style guide.  
If you find one, rather than trying to change it yourself, log a bug in bugzilla.


In General: 

  Robot Names are CamelCased.


In Java:

  Class names (and therefore class filenames/directories) are CamelCased
  Methods names are camelCased
  Variable names are under_scored
  Member variables are under_scored with a leading m_ added
  Global variables are under_scored with a leading g_ added
  Constants are ALL_CAPITALS

  Every class and method should have a brief "javadoc" associated with it.

  All java classes should be in packages relative to the locomotion svn root, e.g.:
   package robotlib.examples.Pendulum;
   package robots.compassTripod;


In Matlab: 

  All of the above rules hold, except:
     Member variables need not start with m_ since the requirement that they are referenced with obj.var makes the distinction from local variables clear
     Variable names that describe a matrix (instead of vector/scalar) are Under_scored.
  Calls to Matlab class member functions use obj = memberFunc(obj,...) .
  All methods begin by checking their inputs (e.g. with typecheck.m).


In C++: 
  
  All of the above rules still hold.
  Filenames for .cpp and .h files which define a single class are CamelCased.
  Filenames for .cpp and .h files which define a single method are camelCased.  
  Filenames for any other .cpp and .h files are under_scored.

LCM:
  
  LCM types are under_scored with a leading lcmt_ added. If the type is specific to a particular robot, then it begins with lcmt_robotname_.
  Channel names are under_scored, and ALWAYS begin with robotname_. 
  ** although robotnames are CamelCased, their use in lcm channels and types should be all lowercase **
  Variable names in LCM types follow the rules above.


Makefiles: 

  %  garratt says use CMAKE??
{'fraction_non_alphanumeric': 0.04086940367824633, 'fraction_numerical': 0.001857700167193015, 'mean_word_length': 3.807142857142857, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4757656', 'n_tokens_mistral': 1549, 'n_tokens_neox': 1447, 'n_words': 786}