# iluve69/auto25 architecture

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

- Interactive diagram: https://gitdiagram.com/iluve69/auto25
- Repository: https://github.com/iluve69/auto25

## Overview

##### Project type and purpose
- From the file names and README (“auto25”), this appears to be an autonomous‐driving / robotics prototype. You have:
- Multiple Python scripts for sensor processing (camera, GPS, lane detection)
- Arduino sketches (.ino) for low‐level sensor interfacing
- A PyTorch model file (model.pt) for on‐board inference
- Data (.osm), calibration data (calib.txt), and assorted test/debug code

##### File structure
- Top‐level scripts (Hello.cpp, Second.cpp) are probably throwaways or early tests.
- The bulk of the logic lives in:
- *.py (GPS integration, lane detection modules, filtering, simulation)
- *.ino (Arduino code for sensor readings—IMU, GPS, wheel encoders, etc.)
- model.pt is your trained neural net for perception (lane/object detection).
- iit1.osm / iit2.osm are map tiles used for localization or path planning.
- calib.txt holds camera calibration or sensor offsets.

##### README for additional insights
- The README is minimal, so we infer architecture from filenames and common patterns.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Hardware Layer
    subgraph "Hardware Layer"
        direction TB
        Camera["Camera Module"]:::hardware
        GPS_Module["GPS Module"]:::hardware
        Microcontroller["Arduino Microcontroller"]:::hardware
        Actuators["Steering & Throttle"]:::hardware
    end

    %% Compute Layer
    subgraph "Compute Layer"
        direction TB

        subgraph "Data Acquisition"
            direction TB
            Camera_Index["camera_index.py"]:::compute
            GPS_Integrated["gps_integrated.py"]:::compute
        end

        subgraph "Preprocessing / Filtering"
            direction TB
            Merged["merged.py"]:::compute
            Sigma["sigma.py"]:::compute
        end

        subgraph "Perception / ML"
            direction TB
            LaneObj["lane_object_combined.py"]:::compute
            ModLane["modified_lane.py"]:::compute
            Model["model.pt (PyTorch)"]:::ml
        end

        subgraph "Localization / Map Integration"
            direction TB
            GPSLoc["gps.py"]:::compute
            Sim["sim.py"]:::external
        end

        subgraph "Decision / Control"
            direction TB
            Final["final.py"]:::compute
            Final1["final1.py"]:::compute
        end
    end

    %% Storage & Logging
    subgraph "Storage & Logging"
        direction TB
        Calib["calib.txt"]:::storage
        GPSLog["gps_debug.log"]:::storage
    end

    %% External Interfaces / Testing
    subgraph "External / Testing"
        direction TB
        Testing["testing.py"]:::external
        TestScript["test.py"]:::external
    end

    %% Data Flows
    Camera -->|USB/MJPEG| Camera_Index
    GPS_Module -->|Serial/UART| Microcontroller
    Microcontroller -->|Serial/UART| GPS_Integrated

    Camera_Index -->|raw frames| Merged
    GPS_Integrated -->|position data| GPSLoc
    Merged -->|filtered data| LaneObj
    Merged -->|filtered data| ModLane
    Sigma -->|stats| Merged

    LaneObj -->|images| Model
    ModLane -->|images| Model
    Model -->|detections| Final

    GPSLoc -->|coords| Final
    Sim -->|sim data| Camera_Index
    Sim -->|sim data| GPS_Integrated
    Sim -->|map usage| GPSLoc

    Final -->|commands| Microcontroller
    Final1 -->|commands| Microcontroller
    Microcontroller -->|PWM| Actuators

    Calib -->|camera params| Camera_Index
    Calib -->|filter params| Merged
    GPSLog -->|debug| GPS_Integrated

    Testing -->|test harness| Camera_Index
    TestScript -->|quick test| Microcontroller

    %% Click Events
    click acccccntestfinal.ino "https://github.com/iluve69/auto25/blob/main//accccntestfinal.ino"
    click filtervalue.ino "https://github.com/iluve69/auto25/blob/main//filtervalue.ino"
    click gpsheading.ino "https://github.com/iluve69/auto25/blob/main//gpsheading.ino"
    click Camera_Index "https://github.com/iluve69/auto25/blob/main//camera_index.py"
    click GPS_Integrated "https://github.com/iluve69/auto25/blob/main//gps_integrated.py"
    click Merged "https://github.com/iluve69/auto25/blob/main//merged.py"
    click Sigma "https://github.com/iluve69/auto25/blob/main//sigma.py"
    click LaneObj "https://github.com/iluve69/auto25/blob/main//lane_object_combined.py"
    click ModLane "https://github.com/iluve69/auto25/blob/main//modified_lane.py"
    click Model "https://github.com/iluve69/auto25/blob/main//model.pt"
    click GPSLoc "https://github.com/iluve69/auto25/blob/main//gps.py"
    click Sim "https://github.com/iluve69/auto25/blob/main//sim.py"
    click Final "https://github.com/iluve69/auto25/blob/main//final.py"
    click Final1 "https://github.com/iluve69/auto25/blob/main//final1.py"
    click Calib "https://github.com/iluve69/auto25/blob/main//calib.txt"
    click GPSLog "https://github.com/iluve69/auto25/blob/main//gps_debug.log"
    click Testing "https://github.com/iluve69/auto25/blob/main//testing.py"
    click TestScript "https://github.com/iluve69/auto25/blob/main//test.py"

    %% Styles
    classDef hardware fill:#D0E6FF,stroke:#0066CC,color:#003366,stroke-width:2px;
    classDef compute fill:#DFFFD0,stroke:#33AA00,color:#336600,stroke-width:2px;
    classDef ml fill:#FFE6B3,stroke:#CC9900,color:#663300,stroke-width:2px,shape:hexagon;
    classDef storage fill:#F2F2F2,stroke:#999999,color:#666666,stroke-width:2px,shape:cylinder;
    classDef external fill:#FFD9D9,stroke:#CC0000,color:#660000,stroke-width:2px;
```
