# gowravthota/graphslam-sim architecture

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

- Interactive diagram: https://gitdiagram.com/gowravthota/graphslam-sim
- Repository: https://github.com/gowravthota/graphslam-sim

## Overview

##### Main System Components

a) Frontend Layer
- Main visualization components
- Configuration and control interfaces

b) Simulation Core
- SLAM Algorithms subsystem
- Multi-Robot Coordination system
- Obstacle Management system

c) Utilities & Support Systems
- Sensor simulation
- Generation
- Performance metrics

##### Component Relationships

Frontend Components (Top Layer):
- SimulationCanvas (Main Display)
- Scene3D (3D Visualization)
- ConfigPanel (Configuration Interface)
- AlgorithmSelector (Algorithm Choice)
- ObstacleControls (Obstacle Management)
- PerformanceMetrics (Performance Display)

Core Algorithms (Middle Layer):
- EKF-SLAM Implementation
- Graph SLAM Implementation
- Loop Closure Detection

Simulation Systems (Lower Layer):
- Multi-Robot Coordinator
- Dynamic Obstacle Manager
- Sensor Simulation
- Map Generator

##### Key Interactions to Highlight

- Bidirectional data flow between SimulationCanvas and the SLAM algorithms
- How the Multi-Robot Coordinator interfaces with both SLAM implementations
- Demonstrate the sensor simulation feed into the SLAM systems
- How obstacle management affects the simulation environment

##### Technical Stack Indicators

Technology badges or labels for:
- React + TypeScript
- Vite (Build tool)
- Three.js (implied by 3D visualization)
- Tailwind CSS

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Frontend
        SC["SimulationCanvas"]:::frontend
        S3D["Scene3D"]:::frontend
        CP["ConfigPanel"]:::frontend
        AS["AlgorithmSelector"]:::frontend
        OC["ObstacleControls"]:::frontend
        PM["PerformanceMetrics"]:::frontend
        MRD["Multi-Robot Display"]:::frontend
        CM["Camera Management"]:::frontend
    end

    subgraph Algorithms
        EKFS["EKF-SLAM"]:::algorithm
        GS["Graph SLAM"]:::algorithm
        LCD["Loop Closure Detection"]:::algorithm
    end

    subgraph Simulation
        MRC["Multi-Robot Coordinator"]:::simulation
        DOM["Dynamic Obstacle Manager"]:::simulation
        SS["Sensor Simulation"]:::simulation
        MG["Map Generator"]:::simulation
    end

    subgraph Types
        AT["Algorithm Types"]:::type
        OT["Obstacle Types"]:::type
        ST["Simulation Types"]:::type
        VT["Visualization Types"]:::type
    end

    %% Frontend Relationships
    SC --> S3D
    CP --> SC
    AS --> SC
    OC --> SC
    SC --> PM
    CM --> S3D
    MRD --> S3D

    %% Algorithm Relationships
    EKFS <--> LCD
    GS <--> LCD
    EKFS --> MRC
    GS --> MRC

    %% Simulation Relationships
    MRC --> SC
    DOM --> SC
    SS --> EKFS
    SS --> GS
    MG --> DOM

    %% Type Relationships
    AT --> EKFS
    AT --> GS
    OT --> DOM
    ST --> MRC
    VT --> SC

    %% Click Events
    click SC "https://github.com/gowravthota/GraphSLAM-Sim/blob/main/src/components/SimulationCanvas.tsx"
    click S3D "https://github.com/gowravthota/GraphSLAM-Sim/blob/main/src/components/Scene3D.tsx"
    click CP "https://github.com/gowravthota/GraphSLAM-Sim/blob/main/src/components/ConfigPanel.tsx"
    click AS "https://github.com/gowravthota/GraphSLAM-Sim/blob/main/src/components/AlgorithmSelector.tsx"
    click OC "https://github.com/gowravthota/GraphSLAM-Sim/blob/main/src/components/ObstacleControls.tsx"
    click PM "https://github.com/gowravthota/GraphSLAM-Sim/blob/main/src/components/PerformanceMetrics.tsx"
    click MRD "https://github.com/gowravthota/GraphSLAM-Sim/blob/main/src/components/MultiRobotDisplay.tsx"
    click CM "https://github.com/gowravthota/GraphSLAM-Sim/blob/main/src/visualization/camera.ts"
    click EKFS "https://github.com/gowravthota/GraphSLAM-Sim/blob/main/src/algorithms/ekf-slam.ts"
    click GS "https://github.com/gowravthota/GraphSLAM-Sim/tree/main/src/algorithms/graph-slam/"
    click LCD "https://github.com/gowravthota/GraphSLAM-Sim/blob/main/src/algorithms/loop-closure.ts"
    click MRC "https://github.com/gowravthota/GraphSLAM-Sim/blob/main/src/multi-robot/coordinator.ts"
    click DOM "https://github.com/gowravthota/GraphSLAM-Sim/blob/main/src/obstacles/dynamicObstacleManager.ts"
    click SS "https://github.com/gowravthota/GraphSLAM-Sim/blob/main/src/utils/sensorSimulation.ts"
    click MG "https://github.com/gowravthota/GraphSLAM-Sim/blob/main/src/utils/mapGenerator.ts"
    click AT "https://github.com/gowravthota/GraphSLAM-Sim/blob/main/src/types/algorithms.ts"
    click OT "https://github.com/gowravthota/GraphSLAM-Sim/blob/main/src/types/obstacles.ts"
    click ST "https://github.com/gowravthota/GraphSLAM-Sim/blob/main/src/types/simulation.ts"
    click VT "https://github.com/gowravthota/GraphSLAM-Sim/blob/main/src/types/visualization.ts"

    classDef frontend fill:#3498db,stroke:#2980b9,color:white
    classDef algorithm fill:#2ecc71,stroke:#27ae60,color:white
    classDef simulation fill:#e67e22,stroke:#d35400,color:white
    classDef type fill:#9b59b6,stroke:#8e44ad,color:white

    %% Legend
    subgraph Legend
        F[Frontend Component]:::frontend
        A[Algorithm Component]:::algorithm
        S[Simulation Component]:::simulation
        T[Type Definition]:::type
    end
```
