# autowarefoundation/autoware_core architecture

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

- Interactive diagram: https://gitdiagram.com/autowarefoundation/autoware_core
- Repository: https://github.com/autowarefoundation/autoware_core

## Overview

##### Main Components
- Autoware Core Entry Point and Launch Infrastructure: The top-level “autoware_core” folder (with its CMakeLists.txt, launch files, and package.xml) is the orchestrator.
- Modular ROS Packages and Libraries: The repository is divided into key subsystems, typically structured into directories such as:
– common/  (for shared utilities and component interface specifications)
– control/  (for vehicle control and pure pursuit drivers)
– localization/ (for various localization nodes, including EKF and stop filter modules)
– map/    (for map loading, projection, and lanelet2 interfaces)
– perception/ (for ground filtering and core perception modules)
– planning/  (for mission planning, trajectory generation, and velocity smoother components)
– vehicle/  (for vehicle-specific drivers and URDF definitions)
- Additional Modules: There are packages for testing, simulation (e.g., autoware_testing), and experimental visualization (e.g., autoware_pyplot).

##### Relationships and Interactions
- Library Dependencies and Shared Utilities: The “common” directory provides lower-level utilities (such as interpolation, Kalman filters, and motion utils) that are used by multiple subsystems. Represent these as shared libraries that “support” the higher-level packages.
- Launch and Parameter Management: Each module contains launch files (often in XML or Python) and parameter configuration (YAML files) that bind the system together – highlighting that configuration and runtime initialization are essential parts of the overall design.

##### Key Architectural Patterns
- Modularity Through ROS Packages: The design pattern here is modular, with each package serving as a self-contained node or set of nodes following ROS best practices.
- Abstraction of Component Interfaces: “common/autoware_component_interface_specs” formalizes interfaces between components, allowing decoupling and easier extension.
- Distributed and Layered System: Sensors, perception, planning, and control are implemented as separate nodes communicating over ROS middleware – a pattern standard in autonomous driving architectures.

##### Relevant Technologies and Frameworks
- ROS (Robot Operating System) as the underpinning middleware.
- C++ as the predominant language in the packages, with CMake for builds.
- Configuration using YAML (for parameters) and XML/launch files to bootstrap node execution.
- Additional tools (e.g., OSQP for optimization interfaces, lanelet2, and third-party visualization utilities).

## Diagram (Mermaid)

```mermaid
flowchart TD
    A["Autoware Core Launch"]:::launch
    T["Testing & Simulation"]:::testing

    subgraph "Bottom Layer: Sensing"
        S["Sensing"]:::sensing
    end

    subgraph "Middle Layer: Processing"
        P["Perception"]:::perception
        L["Localization"]:::localization
        M["Map Processing"]:::map
    end

    subgraph "Upper Layer: Decision & Actuation"
        PL["Planning"]:::planning
        C["Control"]:::control
        V["Vehicle"]:::vehicle
    end

    subgraph "Shared Services"
        U["Common Utilities"]:::common
        CI["Component Interface Specs"]:::common
    end

    %% Launch Infrastructure initiates all modules
    A --> S
    A --> P
    A --> L
    A --> M
    A --> PL
    A --> C
    A --> V
    A --> T

    %% Data flow from sensors upward
    S -->|"sensor_data"| P
    P -->|"processed_data"| L
    P -->|"processed_data"| M
    L -->|"localization_output"| PL
    M -->|"map_data"| PL
    PL -->|"planning_output"| C
    C -->|"control_signals"| V

    %% Shared services supporting mid and upper layers
    U --- P
    U --- L
    U --- M
    U --- PL
    U --- C
    CI --- P
    CI --- L
    CI --- M
    CI --- PL
    CI --- C

    %% Click Events
    click A "https://github.com/autowarefoundation/autoware_core/tree/main/autoware_core/"
    click S "https://github.com/autowarefoundation/autoware_core/tree/main/sensing/"
    click P "https://github.com/autowarefoundation/autoware_core/tree/main/perception/"
    click L "https://github.com/autowarefoundation/autoware_core/tree/main/localization/"
    click M "https://github.com/autowarefoundation/autoware_core/tree/main/map/"
    click PL "https://github.com/autowarefoundation/autoware_core/tree/main/planning/"
    click C "https://github.com/autowarefoundation/autoware_core/tree/main/control/"
    click V "https://github.com/autowarefoundation/autoware_core/tree/main/vehicle/"
    click T "https://github.com/autowarefoundation/autoware_core/tree/main/testing/"
    click U "https://github.com/autowarefoundation/autoware_core/tree/main/common/"
    click CI "https://github.com/autowarefoundation/autoware_core/tree/main/common/autoware_component_interface_specs/"

    %% Styles
    classDef launch fill:#ADD8E6,stroke:#000,stroke-width:2px;
    classDef testing fill:#F08080,stroke:#000,stroke-width:2px;
    classDef sensing fill:#90EE90,stroke:#000,stroke-width:2px;
    classDef perception fill:#FFA500,stroke:#000,stroke-width:2px;
    classDef localization fill:#FFFF99,stroke:#000,stroke-width:2px;
    classDef map fill:#DA70D6,stroke:#000,stroke-width:2px;
    classDef planning fill:#FFB6C1,stroke:#000,stroke-width:2px;
    classDef control fill:#FF6347,stroke:#000,stroke-width:2px;
    classDef vehicle fill:#D3D3D3,stroke:#000,stroke-width:2px;
    classDef common fill:#DCDCDC,stroke:#000,stroke-width:2px;
```
