# dlacksdn/drema_repeat architecture

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

- Interactive diagram: https://gitdiagram.com/dlacksdn/drema_repeat
- Repository: https://github.com/dlacksdn/drema_repeat

## Overview

DreMa builds Gaussian-splatting robot manipulation simulations from recorded scene data, then executes robot trajectories in the reconstructed environment and can generate augmented observations. The graph follows the documented prepare/build/run workflow and includes reconstruction, scene representation, rendering, and augmentation capabilities. Some orchestration files and subsystems were not sampled; documented or strongly implied links without source evidence are dashed.

Main entry points: [`drema/environment/builder.py`](https://github.com/dlacksdn/drema_repeat/blob/main/drema/environment/builder.py) (Environment builder), [`drema/environment/robot_envirionment.py`](https://github.com/dlacksdn/drema_repeat/blob/main/drema/environment/robot_envirionment.py) (Robot environment), [`simulate.py`](https://github.com/dlacksdn/drema_repeat/blob/main/simulate.py) (Simulation runner), [`drema/gaussian_renderer/original_gaussian_renderer/__init__.py`](https://github.com/dlacksdn/drema_repeat/blob/main/drema/gaussian_renderer/original_gaussian_renderer/__init__.py) (Gaussian renderers)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_data["Scene data"]
  node_recordings["Scene recordings"]
  node_data_prep["Data preparation<br/>[data_manager.py]"]
  node_pose_align["Pose alignment<br/>[frame_manager.py]"]
  node_colmap["COLMAP conversion"]
end

subgraph group_build["Simulation construction"]
  node_simulation_build["Simulation builder"]
  node_asset_extract["Asset extraction"]
  node_gaussian_extract["Gaussian extraction"]
  node_optimizers["Gaussian optimization<br/>[base_optimizer.py]"]
end

subgraph group_runtime["Simulation runtime"]
  node_interactive_scene["Interactive objects"]
  node_environment_builder["Environment builder<br/>[builder.py]"]
  node_environment["Environment"]
  node_robot_environment["Robot environment"]
  node_trajectory["Robot trajectory<br/>[trajectory.py]"]
  node_robot["Robot control<br/>[robot.py]"]
  node_cameras["Simulation cameras<br/>[camera.py]"]
  node_simulation["Simulation runner<br/>[simulate.py]"]
end

subgraph group_render["Gaussian rendering"]
  node_gaussian_scene["Gaussian scene model<br/>[gaussian_model.py]"]
  node_renderer["Gaussian renderers<br/>[__init__.py]"]
  node_depth_renderer["Depth renderer<br/>[__init__.py]"]
  node_surfel_renderer["Surfel renderer<br/>[__init__.py]"]
  node_rasterizers["Rasterization kernels<br/>[__init__.py]"]
end

subgraph group_augment["Augmentation"]
  node_augmentation["Augmentation generation<br/>[augmentations.py]"]
  node_generation_runner["Generation runner"]
  node_generated_data["Generated observations"]
  node_augmentation_viewer["Augmentation viewer"]
end

node_researcher(("Researcher"))
node_coppelia(("CoppeliaSim"))

node_coppelia -->|"records scenes"| node_recordings
node_researcher -->|"provides data"| node_recordings
node_recordings -.->|"prepares"| node_data_prep
node_data_prep -->|"computes poses"| node_pose_align
node_pose_align -->|"runs reconstruction"| node_colmap
node_researcher -->|"starts build"| node_simulation_build
node_simulation_build -.->|"extracts assets"| node_asset_extract
node_asset_extract -.->|"extracts Gaussians"| node_gaussian_extract
node_gaussian_extract -.->|"optimizes model"| node_optimizers
node_optimizers -->|"uses model"| node_interactive_scene
node_interactive_scene -->|"extends model"| node_gaussian_scene
node_researcher -->|"runs simulation"| node_simulation
node_simulation -.->|"configures environment"| node_environment_builder
node_environment_builder -->|"creates environment"| node_environment
node_environment_builder -->|"creates robot setup"| node_robot_environment
node_environment_builder -->|"loads trajectory"| node_trajectory
node_robot_environment -->|"extends environment"| node_environment
node_robot_environment -->|"uses robot"| node_robot
node_environment_builder -->|"configures cameras"| node_cameras
node_simulation -.->|"renders scene"| node_renderer
node_renderer -->|"reads model"| node_gaussian_scene
node_depth_renderer -->|"reads model"| node_gaussian_scene
node_surfel_renderer -->|"renders surface model"| node_interactive_scene
node_renderer -->|"rasterizes"| node_rasterizers
node_depth_renderer -.->|"rasterizes depth"| node_rasterizers
node_surfel_renderer -.->|"rasterizes surfels"| node_rasterizers
node_researcher -->|"starts generation"| node_generation_runner
node_generation_runner -->|"generates variations"| node_augmentation
node_augmentation -->|"uses simulation"| node_robot_environment
node_generation_runner -->|"saves observations"| node_generated_data
node_generated_data -->|"visualizes"| node_augmentation_viewer

click node_data_prep "https://github.com/dlacksdn/drema_repeat/blob/main/drema/r2s_builder/data_manager.py"
click node_pose_align "https://github.com/dlacksdn/drema_repeat/blob/main/drema/r2s_builder/frame_manager.py"
click node_colmap "https://github.com/dlacksdn/drema_repeat/blob/main/drema/gaussian_splatting_utils/colmap_converter.py"
click node_simulation_build "https://github.com/dlacksdn/drema_repeat/blob/main/create_simulation.py"
click node_asset_extract "https://github.com/dlacksdn/drema_repeat/blob/main/drema/r2s_builder/assets_extractor.py"
click node_gaussian_extract "https://github.com/dlacksdn/drema_repeat/blob/main/drema/r2s_builder/extractors/gaussians_extractor.py"
click node_optimizers "https://github.com/dlacksdn/drema_repeat/blob/main/drema/r2s_builder/gaussians_optimizers/base_optimizer.py"
click node_gaussian_scene "https://github.com/dlacksdn/drema_repeat/blob/main/drema/scene/gaussian_model.py"
click node_interactive_scene "https://github.com/dlacksdn/drema_repeat/blob/main/drema/drema_scene/interactive_gaussian_model.py"
click node_environment_builder "https://github.com/dlacksdn/drema_repeat/blob/main/drema/environment/builder.py"
click node_environment "https://github.com/dlacksdn/drema_repeat/blob/main/drema/environment/base_environment.py"
click node_robot_environment "https://github.com/dlacksdn/drema_repeat/blob/main/drema/environment/robot_envirionment.py"
click node_trajectory "https://github.com/dlacksdn/drema_repeat/blob/main/drema/environment/robot/trajectory.py"
click node_robot "https://github.com/dlacksdn/drema_repeat/blob/main/drema/environment/robot/robot.py"
click node_cameras "https://github.com/dlacksdn/drema_repeat/blob/main/drema/environment/observer/camera.py"
click node_simulation "https://github.com/dlacksdn/drema_repeat/blob/main/simulate.py"
click node_renderer "https://github.com/dlacksdn/drema_repeat/blob/main/drema/gaussian_renderer/original_gaussian_renderer/__init__.py"
click node_depth_renderer "https://github.com/dlacksdn/drema_repeat/blob/main/drema/gaussian_renderer/depth_gaussian_renderer/__init__.py"
click node_surfel_renderer "https://github.com/dlacksdn/drema_repeat/blob/main/drema/gaussian_renderer/surf_gaussian_renderer/__init__.py"
click node_rasterizers "https://github.com/dlacksdn/drema_repeat/blob/main/submodules/diff-gaussian-rasterization/diff_gaussian_rasterization/__init__.py"
click node_augmentation "https://github.com/dlacksdn/drema_repeat/blob/main/drema/environment/augmentations.py"
click node_generation_runner "https://github.com/dlacksdn/drema_repeat/blob/main/generate_new_data.py"
click node_augmentation_viewer "https://github.com/dlacksdn/drema_repeat/blob/main/visualize_new_data.py"

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_recordings,node_data_prep,node_pose_align,node_colmap toneBlue
class node_simulation_build,node_asset_extract,node_gaussian_extract,node_optimizers toneAmber
class node_interactive_scene,node_environment_builder,node_environment,node_robot_environment,node_trajectory,node_robot,node_cameras,node_simulation toneMint
class node_gaussian_scene,node_renderer,node_depth_renderer,node_surfel_renderer,node_rasterizers toneRose
class node_augmentation,node_generation_runner,node_generated_data,node_augmentation_viewer,node_researcher,node_coppelia toneIndigo
```

## Components

### Scene data

- **Scene recordings**
- [Data preparation](https://github.com/dlacksdn/drema_repeat/blob/main/drema/r2s_builder/data_manager.py): `drema/r2s_builder/data_manager.py`
- [Pose alignment](https://github.com/dlacksdn/drema_repeat/blob/main/drema/r2s_builder/frame_manager.py): `drema/r2s_builder/frame_manager.py`
- [COLMAP conversion](https://github.com/dlacksdn/drema_repeat/blob/main/drema/gaussian_splatting_utils/colmap_converter.py): `drema/gaussian_splatting_utils/colmap_converter.py`

### Simulation construction

- [Simulation builder](https://github.com/dlacksdn/drema_repeat/blob/main/create_simulation.py): `create_simulation.py`
- [Asset extraction](https://github.com/dlacksdn/drema_repeat/blob/main/drema/r2s_builder/assets_extractor.py): `drema/r2s_builder/assets_extractor.py`
- [Gaussian extraction](https://github.com/dlacksdn/drema_repeat/blob/main/drema/r2s_builder/extractors/gaussians_extractor.py): `drema/r2s_builder/extractors/gaussians_extractor.py`
- [Gaussian optimization](https://github.com/dlacksdn/drema_repeat/blob/main/drema/r2s_builder/gaussians_optimizers/base_optimizer.py): `drema/r2s_builder/gaussians_optimizers/base_optimizer.py`

### Simulation runtime

- [Interactive objects](https://github.com/dlacksdn/drema_repeat/blob/main/drema/drema_scene/interactive_gaussian_model.py): `drema/drema_scene/interactive_gaussian_model.py`
- [Environment builder](https://github.com/dlacksdn/drema_repeat/blob/main/drema/environment/builder.py): `drema/environment/builder.py`
- [Environment](https://github.com/dlacksdn/drema_repeat/blob/main/drema/environment/base_environment.py): `drema/environment/base_environment.py`
- [Robot environment](https://github.com/dlacksdn/drema_repeat/blob/main/drema/environment/robot_envirionment.py): `drema/environment/robot_envirionment.py`
- [Robot trajectory](https://github.com/dlacksdn/drema_repeat/blob/main/drema/environment/robot/trajectory.py): `drema/environment/robot/trajectory.py`
- [Robot control](https://github.com/dlacksdn/drema_repeat/blob/main/drema/environment/robot/robot.py): `drema/environment/robot/robot.py`
- [Simulation cameras](https://github.com/dlacksdn/drema_repeat/blob/main/drema/environment/observer/camera.py): `drema/environment/observer/camera.py`
- [Simulation runner](https://github.com/dlacksdn/drema_repeat/blob/main/simulate.py): `simulate.py`

### Gaussian rendering

- [Gaussian scene model](https://github.com/dlacksdn/drema_repeat/blob/main/drema/scene/gaussian_model.py): `drema/scene/gaussian_model.py`
- [Gaussian renderers](https://github.com/dlacksdn/drema_repeat/blob/main/drema/gaussian_renderer/original_gaussian_renderer/__init__.py): `drema/gaussian_renderer/original_gaussian_renderer/__init__.py`
- [Depth renderer](https://github.com/dlacksdn/drema_repeat/blob/main/drema/gaussian_renderer/depth_gaussian_renderer/__init__.py): `drema/gaussian_renderer/depth_gaussian_renderer/__init__.py`
- [Surfel renderer](https://github.com/dlacksdn/drema_repeat/blob/main/drema/gaussian_renderer/surf_gaussian_renderer/__init__.py): `drema/gaussian_renderer/surf_gaussian_renderer/__init__.py`
- [Rasterization kernels](https://github.com/dlacksdn/drema_repeat/blob/main/submodules/diff-gaussian-rasterization/diff_gaussian_rasterization/__init__.py): `submodules/diff-gaussian-rasterization/diff_gaussian_rasterization/__init__.py`

### Augmentation

- [Augmentation generation](https://github.com/dlacksdn/drema_repeat/blob/main/drema/environment/augmentations.py): `drema/environment/augmentations.py`
- [Generation runner](https://github.com/dlacksdn/drema_repeat/blob/main/generate_new_data.py): `generate_new_data.py`
- **Generated observations**
- [Augmentation viewer](https://github.com/dlacksdn/drema_repeat/blob/main/visualize_new_data.py): `visualize_new_data.py`

### Other components

- **Researcher**
- **CoppeliaSim**

## Connections

- CoppeliaSim → Scene recordings: records scenes (evidence: `README.md`)
- Researcher → Scene recordings: provides data (evidence: `README.md`)
- Scene recordings → Data preparation: prepares
- Data preparation → Pose alignment: computes poses (evidence: `drema/r2s_builder/data_manager.py`)
- Pose alignment → COLMAP conversion: runs reconstruction (evidence: `drema/r2s_builder/frame_manager.py`)
- Researcher → Simulation builder: starts build (evidence: `README.md`)
- Simulation builder → Asset extraction: extracts assets
- Asset extraction → Gaussian extraction: extracts Gaussians
- Gaussian extraction → Gaussian optimization: optimizes model
- Gaussian optimization → Interactive objects: uses model (evidence: `drema/r2s_builder/gaussians_optimizers/base_optimizer.py`)
- Interactive objects → Gaussian scene model: extends model (evidence: `drema/drema_scene/interactive_gaussian_model.py`)
- Researcher → Simulation runner: runs simulation (evidence: `README.md`)
- Simulation runner → Environment builder: configures environment
- Environment builder → Environment: creates environment (evidence: `drema/environment/builder.py`)
- Environment builder → Robot environment: creates robot setup (evidence: `drema/environment/builder.py`)
- Environment builder → Robot trajectory: loads trajectory (evidence: `drema/environment/builder.py`)
- Robot environment → Environment: extends environment (evidence: `drema/environment/robot_envirionment.py`)
- Robot environment → Robot control: uses robot (evidence: `drema/environment/robot_envirionment.py`)
- Environment builder → Simulation cameras: configures cameras (evidence: `drema/environment/builder.py`)
- Simulation runner → Gaussian renderers: renders scene
- Gaussian renderers → Gaussian scene model: reads model (evidence: `drema/gaussian_renderer/original_gaussian_renderer/__init__.py`)
- Depth renderer → Gaussian scene model: reads model (evidence: `drema/gaussian_renderer/depth_gaussian_renderer/__init__.py`)
- Surfel renderer → Interactive objects: renders surface model (evidence: `drema/gaussian_renderer/surf_gaussian_renderer/__init__.py`)
- Gaussian renderers → Rasterization kernels: rasterizes (evidence: `drema/gaussian_renderer/original_gaussian_renderer/__init__.py`)
- Depth renderer → Rasterization kernels: rasterizes depth
- Surfel renderer → Rasterization kernels: rasterizes surfels
- Researcher → Generation runner: starts generation (evidence: `README.md`)
- Generation runner → Augmentation generation: generates variations (evidence: `generate_new_data.py`)
- Augmentation generation → Robot environment: uses simulation (evidence: `drema/environment/augmentations.py`)
- Generation runner → Generated observations: saves observations (evidence: `README.md`)
- Generated observations → Augmentation viewer: visualizes (evidence: `README.md`)
