-
Notifications
You must be signed in to change notification settings - Fork 84
Specifying constants and default values
Giuseppe Silano edited this page Feb 27, 2018
·
1 revision
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
How to create
- Creating ROS Plugins for Gazebo
- Gazebo and Gazebo ROS Installation
- Gazebo Topic Naming Conventions
- ROS Interface Plugin
- Setup virtual keyboard joystick
How to install
How to generate
How to set
- Setting up CrazyS as Fixed Wing HiL Simulation (Pixhawk, Mavros, Mavlink, QGC)
- Setting up the CrazyS Simulator
How to develop
- Include ordering in cpp and header files
- Interfacing CrazyS through MATLAB
- Interfacing CrazyS with TravisCI
- Interfacing CrazyS with GitHub Action
- Package Versioning
- Software Specifications
- Specifying constants and default values
- Working With Meshes in Gazebo
More information