# ut-adl/autoware_mini architecture

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

- Interactive diagram: https://gitdiagram.com/ut-adl/autoware_mini
- Repository: https://github.com/ut-adl/autoware_mini

## Overview

##### Main Components
- Localization Module – components under “nodes/localization” and the transformer helpers in “src/localization”. This part gathers sensor input (e.g., GNSS) and converts among coordinate frames.
- Global Planner – located in “nodes/planning/global”, which uses maps (e.g., Lanelet2) provided in “data/maps” to generate a high-level route.
- Local Planner – found in “nodes/planning/local” that, using the global path and sensor data, generates the actual local trajectory.
- Obstacle/Detection Modules – several nodes are distributed across “nodes/detection” for various sensor-based detection strategies (lidar_cluster, lidar_sfa, radar, and sensor fusion) as well as traffic light detection.
- Following/Control Module – components under “nodes/control” (both classic controllers like pure pursuit or Stanley follower) that convert planned trajectories into vehicle actuator commands.
- Platform Interfaces – under “nodes/platform” where files exist for simulation interfaces with Carla, real hardware (e.g., Lexus) and leaderboard systems.
- Helper and Utility Functions – in “src/helpers” and parts of “config”, which support common algorithms (geometry, transforms, timers, etc).
- External Integration – including ROS launch files (“launch” directory) for starting different configurations (planner simulation, bag replay, Carla simulation, and others) and support for external systems like Carla simulator, Scenario Runner, and vehicle platform.

##### Relationships and Interactions
- A clear flow from sensor input (simulated or recorded data from Carla, bag files, or actual sensor drivers) entering the perception/detection modules.
- That detection outputs are passed to the planning layer (both global and local planners) where the environment is interpreted and a route is produced.

##### Architectural Patterns
- Modular Design – emphasize that every capability (localization, planning, detection, and control) is implemented as independent ROS nodes.
- Separation of Concerns – clearly distinguish perception (different detection strategies), planning, and control.
- Extensibility – note that the use of configuration files (in “config”) and modular node design allows swapping different detection algorithms (e.g., lidar_cluster vs. lidar_sfa) and support for various simulation modes (simulation launch files, Carla integration, etc).

##### Relevant Technologies and Frameworks
- ROS (Noetic) is the backbone; include it as the central middleware facilitating node communication.
- Python plays a key role as the programming language for nodes.
- Autonomous driving components such as Lanelet2 maps and possibly ONNX Runtime for neural network-based detection (for GPU-enabled nodes).
- Integration with simulation tools like Carla and Scenario Runner.

## Diagram (Mermaid)

```mermaid
flowchart TD
    S["Sensors & Simulation Data"]:::sensor

    subgraph "Perception Modules"
        L["Localization"]:::localization
        TH["Transformer Helpers"]:::localization
        D["Obstacle/Detection Base"]:::detection
        LDC["Lidar Cluster"]:::detection
        LDS["Lidar SFA"]:::detection
        R["Radar"]:::detection
        SF["Sensor Fusion"]:::detection
        TLD["Traffic Light Detection"]:::detection
    end

    subgraph "Planning Modules"
        GP["Global Planner"]:::planning
        LP["Local Planner"]:::planning
    end

    subgraph "Control Modules"
        C["Control/Following"]:::control
        CC["Classic Controllers"]:::control
    end

    subgraph "Platform Interfaces"
        CI["Carla Interface"]:::platform
        LI["Lexus Interface"]:::platform
        SI["Simulation Interface"]:::platform
        LB["Leaderboard"]:::platform
    end

    subgraph "Helpers & Config"
        H["Helper Functions"]:::helper
        CF["Config Files"]:::helper
    end

    subgraph "External Integration"
        E["ROS Launch Files"]:::external
    end

    RM["ROS Middleware (Noetic)"]:::external

    %% Data Flow Connections
    S -->|"provides_data"| L
    S -->|"provides_data"| D
    S -->|"provides_data"| E

    L -->|"localization_info"| GP
    L -->|"localization_info"| LP

    TH -->|"helper_support"| L

    D -->|"obstacle_info"| GP
    D -->|"obstacle_info"| LP

    LDC -->|"detection"| D
    LDS -->|"detection"| D
    R -->|"detection"| D
    SF -->|"detection"| D
    TLD -->|"detection"| D

    GP -->|"global_plan"| LP

    GP -->|"provides_route"| C
    LP -->|"provides_path"| C

    C -->|"control_commands"| CI
    C -->|"control_commands"| LI
    C -->|"control_commands"| SI
    C -->|"control_commands"| LB

    H -->|"supports"| L
    H -->|"supports"| D
    CF -->|"provides_config"| GP
    CF -->|"provides_config"| LP
    CF -->|"provides_config"| C

    E -->|"launches_nodes"| L
    E -->|"launches_nodes"| D
    E -->|"launches_nodes"| GP
    E -->|"launches_nodes"| LP
    E -->|"launches_nodes"| C
    E -->|"launches_nodes"| CI
    E -->|"launches_nodes"| LI
    E -->|"launches_nodes"| SI
    E -->|"launches_nodes"| LB

    %% ROS Middleware Connections
    S --- RM
    RM --- L
    RM --- D
    RM --- GP
    RM --- LP
    RM --- C
    RM --- CI
    RM --- LI
    RM --- SI
    RM --- LB
    RM --- E

    %% Click Events
    click L "https://github.com/ut-adl/autoware_mini/tree/release/nodes/localization"
    click TH "https://github.com/ut-adl/autoware_mini/tree/release/src/localization"
    click GP "https://github.com/ut-adl/autoware_mini/tree/release/nodes/planning/global"
    click LP "https://github.com/ut-adl/autoware_mini/tree/release/nodes/planning/local"
    click D "https://github.com/ut-adl/autoware_mini/tree/release/nodes/detection"
    click LDC "https://github.com/ut-adl/autoware_mini/tree/release/nodes/detection/lidar_cluster"
    click LDS "https://github.com/ut-adl/autoware_mini/tree/release/nodes/detection/lidar_sfa"
    click R "https://github.com/ut-adl/autoware_mini/tree/release/nodes/detection/radar"
    click SF "https://github.com/ut-adl/autoware_mini/tree/release/nodes/detection/lidar_radar_fusion"
    click TLD "https://github.com/ut-adl/autoware_mini/tree/release/nodes/detection/traffic_lights"
    click C "https://github.com/ut-adl/autoware_mini/tree/release/nodes/control"
    click CC "https://github.com/ut-adl/autoware_mini/tree/release/nodes/control/classic"
    click CI "https://github.com/ut-adl/autoware_mini/tree/release/nodes/platform/carla"
    click LI "https://github.com/ut-adl/autoware_mini/tree/release/nodes/platform/lexus"
    click SI "https://github.com/ut-adl/autoware_mini/tree/release/nodes/platform/simulation"
    click LB "https://github.com/ut-adl/autoware_mini/tree/release/nodes/platform/leaderboard"
    click H "https://github.com/ut-adl/autoware_mini/tree/release/src/helpers"
    click CF "https://github.com/ut-adl/autoware_mini/tree/release/config"
    click E "https://github.com/ut-adl/autoware_mini/tree/release/launch"

    %% Styles
    classDef sensor fill:#fdd,stroke:#333,stroke-width:2px;
    classDef localization fill:#ccf,stroke:#333;
    classDef detection fill:#cfc,stroke:#333;
    classDef planning fill:#fcf,stroke:#333;
    classDef control fill:#cff,stroke:#333;
    classDef platform fill:#ffc,stroke:#333;
    classDef helper fill:#eee,stroke:#333;
    classDef external fill:#f9c,stroke:#333;
```
