-
Notifications
You must be signed in to change notification settings - Fork 30
Specifying constants and default values
Giuseppe Silano edited this page Apr 7, 2019
·
2 revisions
Constants should be specified outside a class or struct in the header file with the following naming convention.
...
#include "some_include.h"
namespace yourNamespace {
// Constants should be prefixed with a k and written in camelCase.
static constexpr double kSomeConstant = 0.00135;
...
struct SomeStruct {};
class SomeClass {};
...
}
Default values should be constructed of constants initialized in the constructor as follows.
...
#include "some_include.h"
namespace yourNamespace {
// Constants should be prefixed with a k and written in camelCase.
static constexpr double kSomeConstant = 0.001;
// Default values should be prefixed with kDefault and also written in camelCase.
static constexpr double kDefaultYourVariableName = 0.002;
...
class SomeClass {
double your_variable_name_;
...
public:
// Member initialization with default values.
SomeClass()
: your_variable_name_(kDefaultYourVariableName),
... {}
...
};
...
}
How to add
- Adding a Camera to BebopS
- Adding a Custom wind field to your world
- Adding an IMU to BebopS
- Adding an 1D Laser
How to create
- Creating ROS Plugins for Gazebo
- Gazebo and Gazebo ROS Installation
- Gazebo Topic Naming Conventions
- ROS Interface Plugin
How to install
How to generate
How to set
How to develop
- Include ordering in cpp and header files
- Interfacing BebopS through MATLAB
- Interfacing BebopS with TravisCI
- Package Versioning
- Software Specifications
- Specifying constants and default values
- Working With Meshes in Gazebo
More information