Packages Best Practices
These are a mix of official ROS2 best practices and practices that just UNL Lunabotics likes to follow. Do not consider this 100% official in any way, and these practices can be revised at any point.
- All ROS2 packages should be subfolders of a folder named either
src/orros2/and this parent folder should be at the root of the repository. - Packages that can be Python packages should be, since it is easier to maintain and create.
- Basic standard packages should be:
- bringup/
- This is a Python package where the launch Python files are written, and the config files for RViz2 or Foxglove are stored.
- control/
- CMake package where all the ROS2 Control code lives, including microcontroller and CAN comms, all written in C++. This is also where config YAML’s for the joystick and controller are stored.
- description/
- This is a Python package where all the URDF for the robot is, including meshes.
- interfaces/
- This is a CMake package where custom ROS2 service interfaces are.
- autonomy/
- This is a CMake package all the logic for autonomy (such as behavior trees and any extra scripts) are stored.
- More can be added if needed
- bringup/
- packages_should_be_lower_snake_case
- The name of the package should be descriptive and tell you exactly what is contained in that package (without being verbose)
Author: Ella Moody (https://github.com/TheThingKnownAsKit)