Style Guide
This project uses the ROS2 style guide as a base. The following section describes alterations to said style guide.
The ROS2 style guide can be found at: https://docs.ros.org/en/jazzy/The-ROS2-Project/Contributing/Code-Style-Language-Versions.html
Directory Naming Conventions
The following naming conventions only hold true for directories in the src directory.
Use
snake_casefor packages.Use the
cpm_lab_prefix for packages, e.g.cpm_lab_path_tracking.Use
kebab-casefor directories that group packages, e.g.high-level-controller. These directories are usually git submodules.Do not use the
cpm_lab_prefix for directories inside a package, likelaunch,configorcomponent.
File Naming Conventions
Use
snake_casefor file names.Use
nodeas a suffix for files containing a ROS2 node, e.g.path_tracking_node.cppin thecpm_lab_path_trackingpackage. The name of the executable should be the same as the file name without the.cppor.pysuffix.Name the default launch file of a package
default.launch.xmland its default parametersconfig/default.yaml.
Package Layout
C++ packages follow this layout:
component/: the ROS2 node as composable component, including the parameter handling.include/<package>/andsrc/: the ROS-independent library code.config/default.yaml: the default parameters, loaded by the launch file.launch/default.launch.xml: starts the component in a container.test/: unit tests.
Every package has a CHANGELOG.rst, which is updated for every release.