# wind-river/meta-robot architecture

> Architecture diagram of the GitHub repository wind-river/meta-robot, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-04-07). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/wind-river/meta-robot
- Repository: https://github.com/wind-river/meta-robot

## Overview

##### Main Components
- Build Infrastructure: This includes the “recipes-build” directory with recipes to integrate the colcon build tool and its related extensions, ensuring that ROS 2 nodes can be built directly on the target.
- Developer Tools: The “recipes-devtools” directory contains additional tools (like dnf patches and python recipe customizations) to support development and deployment.
- Firmware: The “recipes-firmware” directory (with OpenCR-related recipes) provides the firmware images needed for hardware control.
- Micro XRCE Components: The “recipes-microxrce” directory holds recipes related to micro-xrce, offering ROS agent/client recipes that are critical for lightweight communication (for example, LIDAR clients) in resource-constrained environments.
- ROS 2 Nodes & Robot Control: The “recipes-nodes” directory houses the ROS 2 node recipes for Turtlebot3 including bringup, teleoperation, sensor handling, and messaging packages.

##### Relationships and Interactions
- At the base, the Yocto build system (BitBake) consumes these recipes (from each subdirectory) to generate the final image.
- The “recipes-build” component provides integrations (via colcon) that layer on top of the BitBake process, allowing the building of ROS 2 packages directly on the target.
- Firmware and micro XRCE recipes are deployed on the robot hardware. They interact by having firmware (from OpenCR) running on the robot’s microcontroller and bridging communication with the higher-level ROS nodes managed through the ROS agent/client.
- The ROS nodes (in “recipes-nodes”) are the higher-level application components that interact with the robot’s hardware (via the firmware) and provide control interfaces (e.g., for teleoperation and sensor feedback).

##### Architectural Patterns and Technologies
- Layered Architecture: The project separates concerns by grouping recipes into layers (build tools, firmware, micro XRCE, and nodes) that together build the entire embedded and runtime system.
- Build & Deployment Pipeline: The BitBake recipes act as modular components, and the colcon integration shows a clear separation between build orchestration and runtime execution.
- Dependency Management: The project leverages dependencies on external layers (meta-ros and meta-openembedded) as prerequisites, indicating a system design where each layer contributes part of the functionality.
- Key Technologies: Yocto/BitBake for image construction, colcon for building ROS 2 packages, and ROS 2 as the middleware for robotics.

## Diagram (Mermaid)

```mermaid
flowchart TD
    ext1["meta-ros"]:::external
    ext2["meta-openembedded"]:::external

    bb["Yocto/BitBake Build System"]:::bitbake

    bb --> rb["Recipes-Build (colcon integration)"]:::build
    bb --> dt["Developer Tools"]:::devtools
    bb --> fw["Firmware (OpenCR)"]:::firmware
    bb --> ux["Micro XRCE Components"]:::micro
    bb --> rn["ROS Nodes (Turtlebot3)"]:::nodes

    rb -->|"build_support"| rn
    ux -->|"communication"| rn

    ext1 --> bb
    ext2 --> bb

    click rb "https://github.com/wind-river/meta-robot/tree/master/recipes-build/colcon"
    click dt "https://github.com/wind-river/meta-robot/tree/master/recipes-devtools"
    click fw "https://github.com/wind-river/meta-robot/tree/master/recipes-firmware/opencr"
    click ux "https://github.com/wind-river/meta-robot/tree/master/recipes-microxrce"
    click rn "https://github.com/wind-river/meta-robot/tree/master/recipes-nodes/turtlebot3"

    classDef bitbake fill:#91c7ff,stroke:#1f78b4,stroke-width:2px;
    classDef build fill:#cce5ff,stroke:#1f78b4,stroke-width:2px;
    classDef devtools fill:#ccffcc,stroke:#4CAF50,stroke-width:2px;
    classDef firmware fill:#ffc0cb,stroke:#FF69B4,stroke-width:2px;
    classDef micro fill:#e6ccff,stroke:#9B59B6,stroke-width:2px;
    classDef nodes fill:#ffffcc,stroke:#F1C40F,stroke-width:2px;
    classDef external fill:#f2f2f2,stroke:#999,stroke-width:2px;
```
