# umfieldrobotics/oceansim architecture

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

- Interactive diagram: https://gitdiagram.com/umfieldrobotics/oceansim
- Repository: https://github.com/umfieldrobotics/oceansim

## Overview

##### Main Components
- GPU Simulation Engine: At the heart of OceanSim is the simulation engine built with Isaac Sim. Represent this as a core block that highlights “GPU-Accelerated Simulation” and “Physics-Based Underwater Sensor Rendering.”
- Utilities & Libraries: Show a supporting layer that includes utility functions (such as files in isaacsim/oceansim/utils) which handle tasks like acoustic processing, renderer utilities, asset management, and input commands.
- Configuration & Data: Include aspects such as configuration files (config/extension.toml) and data/demo inputs that allow users to modify simulation parameters and provide input datasets.

##### Relationships and Interactions
- That the Simulation Engine (using Isaac Sim) orchestrates sensor modules to generate realistic sensor output based on input configurations, while relying on the GPU for parallelized computation.
- From “Configuration” and “Data/demo” into the “Simulation Engine”.
- From the “Simulation Engine” to the various sensor modules (barometer, sonar, camera, etc.), indicating they are part of the simulation pipeline.
- Between utility functions and sensor modules, highlighting that these utilities assist in rendering and processing simulation data.

##### Architectural Patterns and Technologies
- Modular design – each sensor type or extension is contained in its own module, making the system extensible.
- That the simulation is built on an event-driven or pipeline architecture where sensor data is processed sequentially or in parallel (thanks to GPU acceleration).
- Labels for relevant technologies: NVIDIA Isaac Sim, Omniverse, OpenUSD; GPU-based parallel computing; and possibly aspects of the simulation-to-real gap reduction through physics-based rendering.

## Diagram (Mermaid)

```mermaid
graph TD
    %% Configuration & Data
    subgraph "Configuration & Data"
        A1("Configuration (extension.toml)"):::config
        A2("Data/Demo Inputs"):::config
    end

    %% Core Simulation
    subgraph "Core Simulation"
        B1("GPU Simulation Engine (Isaac Sim Core)"):::simulation
    end

    %% Sensor Modules
    subgraph "Sensor Modules"
        C1("Barometer Sensor Module"):::sensor
        C2("DVL Sensor Module"):::sensor
        C3("Imaging Sonar Sensor Module"):::sensor
        C4("UW_Camera Sensor Module"):::sensor
    end

    %% Sensor Extensions
    subgraph "Sensor Extensions"
        D1("Sensor Extension (SensorExample_python)"):::sensor
        D2("Sensor Extension (colorpicker_python)"):::sensor
    end

    %% Utilities
    subgraph "Utilities"
        E1("Utilities & Libraries"):::utility
    end

    %% Documentation & Community
    subgraph "Documentation & Community"
        F1("Documentation & Community Interface"):::docs
    end

    %% Connections from Configuration & Data to Core Simulation
    A1 -->|"feeds"| B1
    A2 -->|"feeds"| B1

    %% Connections from Core Simulation to Sensor Modules and Extensions
    B1 -->|"simulates"| C1
    B1 -->|"simulates"| C2
    B1 -->|"simulates"| C3
    B1 -->|"simulates"| C4
    B1 -->|"integrates"| D1
    B1 -->|"integrates"| D2

    %% Utilities support Sensor Modules and Extensions
    E1 -->|"aids"| C1
    E1 -->|"aids"| C2
    E1 -->|"aids"| C3
    E1 -->|"aids"| C4
    E1 -->|"aids"| D1
    E1 -->|"aids"| D2

    %% Documentation influences Core Simulation architecture
    F1 ---|"influences"| B1

    %% Click Events
    click B1 "https://github.com/umfieldrobotics/oceansim/tree/main/isaacsim/oceansim"
    click C1 "https://github.com/umfieldrobotics/oceansim/blob/main/isaacsim/oceansim/sensors/BarometerSensor.py"
    click C2 "https://github.com/umfieldrobotics/oceansim/blob/main/isaacsim/oceansim/sensors/DVLsensor.py"
    click C3 "https://github.com/umfieldrobotics/oceansim/blob/main/isaacsim/oceansim/sensors/ImagingSonarSensor.py"
    click C4 "https://github.com/umfieldrobotics/oceansim/blob/main/isaacsim/oceansim/sensors/UW_Camera.py"
    click D1 "https://github.com/umfieldrobotics/oceansim/tree/main/isaacsim/oceansim/modules/SensorExample_python"
    click D2 "https://github.com/umfieldrobotics/oceansim/tree/main/isaacsim/oceansim/modules/colorpicker_python"
    click E1 "https://github.com/umfieldrobotics/oceansim/tree/main/isaacsim/oceansim/utils"
    click A1 "https://github.com/umfieldrobotics/oceansim/blob/main/config/extension.toml"
    click A2 "https://github.com/umfieldrobotics/oceansim/tree/main/demo"
    click F1 "https://github.com/umfieldrobotics/oceansim/tree/main/docs"

    %% Styles
    classDef simulation fill:#ccffcc,stroke:#333,stroke-width:2px;
    classDef sensor fill:#add8e6,stroke:#333,stroke-width:2px;
    classDef utility fill:#ffcc99,stroke:#333,stroke-width:2px;
    classDef config fill:#e6ccff,stroke:#333,stroke-width:2px;
    classDef docs fill:#d1e8e2,stroke:#333,stroke-width:2px;
```
