Instead of relying on complex runtime dynamic loading which can be difficult to debug, cyberdog_bringup uses a pre-compilation approach to generate launch files.
Configuration and Constraints
Startup constraints are defined by two sources:
- Configuration Files (
*.yaml): A unique master file that can load other sub-files containing parameters that follow ROS constraints. - Command Line Arguments (
argv[]): These adapt to the standard ROS2 launch parameter interface.
Generation Process
To ensure visibility and prevent issues where a single launch file cannot be started multiple times, the system follows these principles:
- Static Enumeration: Launch files are dynamically generated from
*.yaml files during the cyberdog_bringup compilation phase. - Hierarchical Launch Files:
- A Unique Master Launch File is responsible for starting all nodes under the specified parameter constraints. This is used for system-level service calls to automate robot software functions.
- Sub-level Launch Files are generated to handle specific groups of nodes.
- Automated Workflow:
- Complex syntax is abstracted into a custom meta-language.
- This meta-language is encoded using standard formats like
yaml, toml, or json. - A compilation tool processes these files.
- During each build, the tool compiles the meta-language into executable scripts (launch files) and installs them.
- System instructions are used to set these up for auto-start on boot.