Home | Tutorials | Wiki | Issues
Ask Your Question

Revision history [back]

If you're familiar with C++, you'll understand that in some cases header files aren't necessary. When you're writing single-file programs, like most gazebo plugins are, then you'll rarely need a header file. Header files just help organize and share code, but they aren't always required.

This is a simple example of "well we could write a header file, or we could be lazy and just not". You certainly don't need one for the sensor tutorial, but we thought it wasn't too much extra work. Plus, it's always good practice to write header files, in case your project grows and you want more code. Then it will be helpful, or even required, to have a header file.