# jacobjoseph-96/autonix architecture

> Architecture diagram of the GitHub repository jacobjoseph-96/autonix, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-11). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/jacobjoseph-96/autonix
- Repository: https://github.com/jacobjoseph-96/autonix

## Overview

Autonix is a Qt-based ADAS simulation. The user starts and configures a simulated drive; the application advances vehicle, traffic, and pedestrian behavior, applies perception and control, then presents the scene and detections. The graph preserves the documented scenario-loading, traffic-rule, ACC, lane-change, perception, and visualization capabilities. Most implementation files were not excerpted, so internal wiring beyond explicit README statements is shown only where supported; unverified links are dashed.

Main entry points: [`UI/src/main_window.cpp`](https://github.com/jacobjoseph-96/autonix/blob/master/UI/src/main_window.cpp) (Simulation coordinator), [`UI/src/perspective_view.cpp`](https://github.com/jacobjoseph-96/autonix/blob/master/UI/src/perspective_view.cpp) (Perspective view), [`Perception/src/perception_filter.cpp`](https://github.com/jacobjoseph-96/autonix/blob/master/Perception/src/perception_filter.cpp) (Perception filter), [`Core_API/src/npc_vehicle.cpp`](https://github.com/jacobjoseph-96/autonix/blob/master/Core_API/src/npc_vehicle.cpp) (NPC behavior)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_simulation["Simulation and control"]
  node_ego["Ego vehicle<br/>[ego_vehicle.cpp]"]
  node_acc["Adaptive cruise"]
  node_lane["Lane change"]
  node_logic["Traffic logic<br/>[traffic_logic.cpp]"]
  node_types["Shared domain types<br/>[types.hpp]"]
end

subgraph group_world["World and traffic"]
  node_npc["NPC behavior<br/>[npc_vehicle.cpp]"]
  node_pedestrians["Pedestrian simulation<br/>[pedestrian.cpp]"]
  node_road["Road and lanes<br/>[road_segment.cpp]"]
  node_lights["Traffic lights<br/>[traffic_light.cpp]"]
  node_signs["Traffic signs<br/>[traffic_sign.cpp]"]
  node_scenario["XML scenario parser"]
end

subgraph group_perception["Perception"]
  node_filter["Perception filter"]
  node_gap["Gap analysis<br/>[gap_analyzer.cpp]"]
  node_distance["Safe distance"]
end

subgraph group_interface["User interface"]
  node_window["Simulation coordinator<br/>[main_window.cpp]"]
  node_view["Perspective view"]
  node_overlay["Detection overlay"]
  node_speedwidget["Speed limit display"]
  node_logs["Diagnostic logs"]
end

node_driver(("Driver"))

node_driver -->|"starts and configures"| node_window
node_window -.->|"advances simulation"| node_ego
node_window -->|"configures ACC"| node_acc
node_window -->|"requests lane changes"| node_lane
node_window -.->|"applies traffic rules"| node_logic
node_window -->|"updates traffic"| node_npc
node_window -->|"simulates crossings"| node_pedestrians
node_window -.->|"uses road model"| node_road
node_window -.->|"updates traffic lights"| node_lights
node_window -->|"loads scenarios"| node_scenario
node_window -.->|"runs perception"| node_filter
node_window -.->|"updates scene"| node_view
node_window -->|"shows detections"| node_overlay
node_window -->|"reports events"| node_logs
node_window -->|"shows speed limit"| node_speedwidget
node_filter -.->|"uses gap analysis"| node_gap
node_filter -.->|"uses distance calculation"| node_distance
node_overlay -->|"displays detections"| node_filter
node_overlay -->|"integrates speed limit"| node_speedwidget
node_npc -->|"checks light state"| node_lights
node_npc -->|"checks signs"| node_signs
node_lane -->|"validates lane"| node_road
node_lane -->|"updates maneuver"| node_ego
node_filter -->|"checks lane relevance"| node_road
node_filter -->|"filters by vehicle state"| node_ego
node_view -->|"renders vehicle"| node_ego
node_view -->|"renders vehicles"| node_npc
node_view -->|"renders pedestrians"| node_pedestrians
node_view -->|"renders road"| node_road
node_view -->|"renders lights"| node_lights
node_view -->|"renders signs"| node_signs

click node_window "https://github.com/jacobjoseph-96/autonix/blob/master/UI/src/main_window.cpp"
click node_ego "https://github.com/jacobjoseph-96/autonix/blob/master/Core_API/src/ego_vehicle.cpp"
click node_acc "https://github.com/jacobjoseph-96/autonix/blob/master/Core_API/src/adaptive_cruise_controller.cpp"
click node_lane "https://github.com/jacobjoseph-96/autonix/blob/master/Core_API/src/lane_change_controller.cpp"
click node_logic "https://github.com/jacobjoseph-96/autonix/blob/master/Core_API/src/traffic_logic.cpp"
click node_npc "https://github.com/jacobjoseph-96/autonix/blob/master/Core_API/src/npc_vehicle.cpp"
click node_pedestrians "https://github.com/jacobjoseph-96/autonix/blob/master/Core_API/src/pedestrian.cpp"
click node_road "https://github.com/jacobjoseph-96/autonix/blob/master/Core_API/src/road_segment.cpp"
click node_lights "https://github.com/jacobjoseph-96/autonix/blob/master/Core_API/src/traffic_light.cpp"
click node_signs "https://github.com/jacobjoseph-96/autonix/blob/master/Core_API/src/traffic_sign.cpp"
click node_scenario "https://github.com/jacobjoseph-96/autonix/blob/master/Core_API/src/xml_scenario_parser.cpp"
click node_types "https://github.com/jacobjoseph-96/autonix/blob/master/Core_API/include/types.hpp"
click node_filter "https://github.com/jacobjoseph-96/autonix/blob/master/Perception/src/perception_filter.cpp"
click node_gap "https://github.com/jacobjoseph-96/autonix/blob/master/Perception/src/gap_analyzer.cpp"
click node_distance "https://github.com/jacobjoseph-96/autonix/blob/master/Perception/src/safe_distance_calculator.cpp"
click node_view "https://github.com/jacobjoseph-96/autonix/blob/master/UI/src/perspective_view.cpp"
click node_overlay "https://github.com/jacobjoseph-96/autonix/blob/master/UI/src/detection_overlay.cpp"
click node_speedwidget "https://github.com/jacobjoseph-96/autonix/blob/master/UI/src/speed_limit_widget.cpp"
click node_logs "https://github.com/jacobjoseph-96/autonix/blob/master/UI/src/diagnostic_logs.cpp"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_ego,node_acc,node_lane,node_logic,node_types toneBlue
class node_npc,node_pedestrians,node_road,node_lights,node_signs,node_scenario toneAmber
class node_filter,node_gap,node_distance toneMint
class node_window,node_view,node_overlay,node_speedwidget,node_logs toneRose
class node_driver toneIndigo
```

## Components

### Simulation and control

- [Ego vehicle](https://github.com/jacobjoseph-96/autonix/blob/master/Core_API/src/ego_vehicle.cpp): `Core_API/src/ego_vehicle.cpp`
- [Adaptive cruise](https://github.com/jacobjoseph-96/autonix/blob/master/Core_API/src/adaptive_cruise_controller.cpp): `Core_API/src/adaptive_cruise_controller.cpp`
- [Lane change](https://github.com/jacobjoseph-96/autonix/blob/master/Core_API/src/lane_change_controller.cpp): `Core_API/src/lane_change_controller.cpp`
- [Traffic logic](https://github.com/jacobjoseph-96/autonix/blob/master/Core_API/src/traffic_logic.cpp): `Core_API/src/traffic_logic.cpp`
- [Shared domain types](https://github.com/jacobjoseph-96/autonix/blob/master/Core_API/include/types.hpp): `Core_API/include/types.hpp`

### World and traffic

- [NPC behavior](https://github.com/jacobjoseph-96/autonix/blob/master/Core_API/src/npc_vehicle.cpp): `Core_API/src/npc_vehicle.cpp`
- [Pedestrian simulation](https://github.com/jacobjoseph-96/autonix/blob/master/Core_API/src/pedestrian.cpp): `Core_API/src/pedestrian.cpp`
- [Road and lanes](https://github.com/jacobjoseph-96/autonix/blob/master/Core_API/src/road_segment.cpp): `Core_API/src/road_segment.cpp`
- [Traffic lights](https://github.com/jacobjoseph-96/autonix/blob/master/Core_API/src/traffic_light.cpp): `Core_API/src/traffic_light.cpp`
- [Traffic signs](https://github.com/jacobjoseph-96/autonix/blob/master/Core_API/src/traffic_sign.cpp): `Core_API/src/traffic_sign.cpp`
- [XML scenario parser](https://github.com/jacobjoseph-96/autonix/blob/master/Core_API/src/xml_scenario_parser.cpp): `Core_API/src/xml_scenario_parser.cpp`

### Perception

- [Perception filter](https://github.com/jacobjoseph-96/autonix/blob/master/Perception/src/perception_filter.cpp): `Perception/src/perception_filter.cpp`
- [Gap analysis](https://github.com/jacobjoseph-96/autonix/blob/master/Perception/src/gap_analyzer.cpp): `Perception/src/gap_analyzer.cpp`
- [Safe distance](https://github.com/jacobjoseph-96/autonix/blob/master/Perception/src/safe_distance_calculator.cpp): `Perception/src/safe_distance_calculator.cpp`

### User interface

- [Simulation coordinator](https://github.com/jacobjoseph-96/autonix/blob/master/UI/src/main_window.cpp): `UI/src/main_window.cpp`
- [Perspective view](https://github.com/jacobjoseph-96/autonix/blob/master/UI/src/perspective_view.cpp): `UI/src/perspective_view.cpp`
- [Detection overlay](https://github.com/jacobjoseph-96/autonix/blob/master/UI/src/detection_overlay.cpp): `UI/src/detection_overlay.cpp`
- [Speed limit display](https://github.com/jacobjoseph-96/autonix/blob/master/UI/src/speed_limit_widget.cpp): `UI/src/speed_limit_widget.cpp`
- [Diagnostic logs](https://github.com/jacobjoseph-96/autonix/blob/master/UI/src/diagnostic_logs.cpp): `UI/src/diagnostic_logs.cpp`

### Other components

- **Driver**

## Connections

- Driver → Simulation coordinator: starts and configures
- Simulation coordinator → Ego vehicle: advances simulation
- Simulation coordinator → Adaptive cruise: configures ACC
- Simulation coordinator → Lane change: requests lane changes
- Simulation coordinator → Traffic logic: applies traffic rules
- Simulation coordinator → NPC behavior: updates traffic
- Simulation coordinator → Pedestrian simulation: simulates crossings
- Simulation coordinator → Road and lanes: uses road model
- Simulation coordinator → Traffic lights: updates traffic lights
- Simulation coordinator → XML scenario parser: loads scenarios
- Simulation coordinator → Perception filter: runs perception
- Simulation coordinator → Perspective view: updates scene
- Simulation coordinator → Detection overlay: shows detections
- Simulation coordinator → Diagnostic logs: reports events
- Simulation coordinator → Speed limit display: shows speed limit
- Perception filter → Gap analysis: uses gap analysis
- Perception filter → Safe distance: uses distance calculation
- Detection overlay → Perception filter: displays detections
- Detection overlay → Speed limit display: integrates speed limit
- NPC behavior → Traffic lights: checks light state
- NPC behavior → Traffic signs: checks signs
- Lane change → Road and lanes: validates lane
- Lane change → Ego vehicle: updates maneuver
- Perception filter → Road and lanes: checks lane relevance
- Perception filter → Ego vehicle: filters by vehicle state
- Perspective view → Ego vehicle: renders vehicle
- Perspective view → NPC behavior: renders vehicles
- Perspective view → Pedestrian simulation: renders pedestrians
- Perspective view → Road and lanes: renders road
- Perspective view → Traffic lights: renders lights
- Perspective view → Traffic signs: renders signs
