# mahdibegg/vision-guided-arm-6dof architecture

> Architecture diagram of the GitHub repository mahdibegg/vision-guided-arm-6dof, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/mahdibegg/vision-guided-arm-6dof
- Repository: https://github.com/mahdibegg/vision-guided-arm-6dof

## Overview

This is a desktop robot-pickup controller: an operator starts the simulated camera, requests object detection, and can direct the arm to pick and place a detected target. The main window coordinates camera and arm workers, while vision and robot-model code perform detection, pixel-to-robot conversion, and simulated motion. Configuration supplies application, camera, detection, arm, and simulator settings. The README is empty; links below are limited to relationships visible in the supplied excerpts or SOURCE INDEX, so unsampled capabilities and wiring are not inferred.

Main entry points: [`python/src/robot_arm/ui/main_window.py`](https://github.com/mahdibegg/vision-guided-arm-6dof/blob/main/python/src/robot_arm/ui/main_window.py) (Main window), [`python/src/robot_arm/vision/cameras/simulation_camera.py`](https://github.com/mahdibegg/vision-guided-arm-6dof/blob/main/python/src/robot_arm/vision/cameras/simulation_camera.py) (Simulation camera), [`python/src/robot_arm/ui/workers/camera_worker.py`](https://github.com/mahdibegg/vision-guided-arm-6dof/blob/main/python/src/robot_arm/ui/workers/camera_worker.py) (Camera worker), [`python/src/robot_arm/model/robot_arm.py`](https://github.com/mahdibegg/vision-guided-arm-6dof/blob/main/python/src/robot_arm/model/robot_arm.py) (Robot arm model)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Desktop interface"]
  node_controller["App launcher<br/>[controller.py]"]
  node_window["Main window<br/>[main_window.py]"]
  node_camera_ui["Camera display<br/>[camera_widget.py]"]
  node_log_ui["Log display<br/>[log_widget.py]"]
  node_validation["Input validation<br/>[validation.py]"]
end

subgraph group_vision["Vision pipeline"]
  node_camera_worker["Camera worker<br/>[camera_worker.py]"]
  node_grounding_worker["Detection worker"]
  node_detector["Object detector<br/>[detect.py]"]
  node_sim_camera["Simulation camera"]
  node_frame_types["Frame types<br/>[types.py]"]
end

subgraph group_robot["Robot control"]
  node_arm_worker["Arm worker"]
  node_arm_model["Robot arm model<br/>[robot_arm.py]"]
  node_sim_connection["Simulator connection<br/>[connection.py]"]
end

subgraph group_setup["Configuration"]
  node_config["Configuration<br/>[config.py]"]
end

node_operator(("Operator"))
node_simulator["CoppeliaSim"]

node_operator -->|"operates"| node_window
node_controller -->|"opens"| node_window
node_window -->|"controls"| node_camera_worker
node_window -->|"initializes"| node_grounding_worker
node_window -->|"controls"| node_arm_worker
node_window -->|"updates"| node_camera_ui
node_window -->|"logs to"| node_log_ui
node_window -->|"uses"| node_validation
node_window -->|"loads"| node_config
node_camera_worker -->|"captures from"| node_sim_camera
node_camera_worker -->|"processes frames"| node_detector
node_grounding_worker -->|"runs inference"| node_detector
node_camera_worker -->|"requests detection"| node_grounding_worker
node_camera_worker -->|"handles frames"| node_frame_types
node_sim_camera -->|"returns frames"| node_frame_types
node_arm_worker -->|"commands"| node_arm_model
node_arm_model -->|"uses sensor"| node_sim_camera
node_arm_model -->|"uses"| node_sim_connection
node_sim_camera -->|"uses"| node_sim_connection
node_sim_connection -->|"connects to"| node_simulator
node_sim_camera -->|"reads sensor"| node_simulator
node_arm_model -->|"controls motion"| node_simulator
node_config -->|"configures"| node_sim_connection
node_config -->|"configures"| node_sim_camera
node_config -->|"configures"| node_arm_model

click node_controller "https://github.com/mahdibegg/vision-guided-arm-6dof/blob/main/python/src/robot_arm/apps/controller.py"
click node_window "https://github.com/mahdibegg/vision-guided-arm-6dof/blob/main/python/src/robot_arm/ui/main_window.py"
click node_camera_ui "https://github.com/mahdibegg/vision-guided-arm-6dof/blob/main/python/src/robot_arm/ui/widgets/camera_widget.py"
click node_log_ui "https://github.com/mahdibegg/vision-guided-arm-6dof/blob/main/python/src/robot_arm/ui/widgets/log_widget.py"
click node_validation "https://github.com/mahdibegg/vision-guided-arm-6dof/blob/main/python/src/robot_arm/ui/validation.py"
click node_camera_worker "https://github.com/mahdibegg/vision-guided-arm-6dof/blob/main/python/src/robot_arm/ui/workers/camera_worker.py"
click node_grounding_worker "https://github.com/mahdibegg/vision-guided-arm-6dof/blob/main/python/src/robot_arm/ui/workers/grounding_dino_worker.py"
click node_detector "https://github.com/mahdibegg/vision-guided-arm-6dof/blob/main/python/src/robot_arm/vision/detect.py"
click node_sim_camera "https://github.com/mahdibegg/vision-guided-arm-6dof/blob/main/python/src/robot_arm/vision/cameras/simulation_camera.py"
click node_frame_types "https://github.com/mahdibegg/vision-guided-arm-6dof/blob/main/python/src/robot_arm/vision/cameras/types.py"
click node_arm_worker "https://github.com/mahdibegg/vision-guided-arm-6dof/blob/main/python/src/robot_arm/ui/workers/robot_arm_worker.py"
click node_arm_model "https://github.com/mahdibegg/vision-guided-arm-6dof/blob/main/python/src/robot_arm/model/robot_arm.py"
click node_sim_connection "https://github.com/mahdibegg/vision-guided-arm-6dof/blob/main/python/src/robot_arm/simulation/connection.py"
click node_config "https://github.com/mahdibegg/vision-guided-arm-6dof/blob/main/python/src/robot_arm/config.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_controller,node_window,node_camera_ui,node_log_ui,node_validation toneBlue
class node_camera_worker,node_grounding_worker,node_detector,node_sim_camera,node_frame_types toneAmber
class node_arm_worker,node_arm_model,node_sim_connection toneMint
class node_config toneRose
class node_operator,node_simulator toneIndigo
```

## Components

### Desktop interface

- [App launcher](https://github.com/mahdibegg/vision-guided-arm-6dof/blob/main/python/src/robot_arm/apps/controller.py): `python/src/robot_arm/apps/controller.py`
- [Main window](https://github.com/mahdibegg/vision-guided-arm-6dof/blob/main/python/src/robot_arm/ui/main_window.py): `python/src/robot_arm/ui/main_window.py`
- [Camera display](https://github.com/mahdibegg/vision-guided-arm-6dof/blob/main/python/src/robot_arm/ui/widgets/camera_widget.py): `python/src/robot_arm/ui/widgets/camera_widget.py`
- [Log display](https://github.com/mahdibegg/vision-guided-arm-6dof/blob/main/python/src/robot_arm/ui/widgets/log_widget.py): `python/src/robot_arm/ui/widgets/log_widget.py`
- [Input validation](https://github.com/mahdibegg/vision-guided-arm-6dof/blob/main/python/src/robot_arm/ui/validation.py): `python/src/robot_arm/ui/validation.py`

### Vision pipeline

- [Camera worker](https://github.com/mahdibegg/vision-guided-arm-6dof/blob/main/python/src/robot_arm/ui/workers/camera_worker.py): `python/src/robot_arm/ui/workers/camera_worker.py`
- [Detection worker](https://github.com/mahdibegg/vision-guided-arm-6dof/blob/main/python/src/robot_arm/ui/workers/grounding_dino_worker.py): `python/src/robot_arm/ui/workers/grounding_dino_worker.py`
- [Object detector](https://github.com/mahdibegg/vision-guided-arm-6dof/blob/main/python/src/robot_arm/vision/detect.py): `python/src/robot_arm/vision/detect.py`
- [Simulation camera](https://github.com/mahdibegg/vision-guided-arm-6dof/blob/main/python/src/robot_arm/vision/cameras/simulation_camera.py): `python/src/robot_arm/vision/cameras/simulation_camera.py`
- [Frame types](https://github.com/mahdibegg/vision-guided-arm-6dof/blob/main/python/src/robot_arm/vision/cameras/types.py): `python/src/robot_arm/vision/cameras/types.py`

### Robot control

- [Arm worker](https://github.com/mahdibegg/vision-guided-arm-6dof/blob/main/python/src/robot_arm/ui/workers/robot_arm_worker.py): `python/src/robot_arm/ui/workers/robot_arm_worker.py`
- [Robot arm model](https://github.com/mahdibegg/vision-guided-arm-6dof/blob/main/python/src/robot_arm/model/robot_arm.py): `python/src/robot_arm/model/robot_arm.py`
- [Simulator connection](https://github.com/mahdibegg/vision-guided-arm-6dof/blob/main/python/src/robot_arm/simulation/connection.py): `python/src/robot_arm/simulation/connection.py`

### Configuration

- [Configuration](https://github.com/mahdibegg/vision-guided-arm-6dof/blob/main/python/src/robot_arm/config.py): `python/src/robot_arm/config.py`

### Other components

- **Operator**
- **CoppeliaSim**

## Connections

- Operator → Main window: operates
- App launcher → Main window: opens (evidence: `python/src/robot_arm/apps/controller.py`)
- Main window → Camera worker: controls (evidence: `python/src/robot_arm/ui/main_window.py`)
- Main window → Detection worker: initializes (evidence: `python/src/robot_arm/ui/main_window.py`)
- Main window → Arm worker: controls (evidence: `python/src/robot_arm/ui/main_window.py`)
- Main window → Camera display: updates (evidence: `python/src/robot_arm/ui/main_window.py`)
- Main window → Log display: logs to (evidence: `python/src/robot_arm/ui/main_window.py`)
- Main window → Input validation: uses (evidence: `python/src/robot_arm/ui/main_window.py`)
- Main window → Configuration: loads (evidence: `python/src/robot_arm/ui/main_window.py`)
- Camera worker → Simulation camera: captures from (evidence: `python/src/robot_arm/ui/workers/camera_worker.py`)
- Camera worker → Object detector: processes frames (evidence: `python/src/robot_arm/ui/workers/camera_worker.py`)
- Detection worker → Object detector: runs inference (evidence: `python/src/robot_arm/ui/workers/grounding_dino_worker.py`)
- Camera worker → Detection worker: requests detection (evidence: `python/src/robot_arm/ui/main_window.py`)
- Camera worker → Frame types: handles frames (evidence: `python/src/robot_arm/ui/workers/camera_worker.py`)
- Simulation camera → Frame types: returns frames (evidence: `python/src/robot_arm/vision/cameras/simulation_camera.py`)
- Arm worker → Robot arm model: commands (evidence: `python/src/robot_arm/ui/workers/robot_arm_worker.py`)
- Robot arm model → Simulation camera: uses sensor (evidence: `python/src/robot_arm/model/robot_arm.py`)
- Robot arm model → Simulator connection: uses (evidence: `python/src/robot_arm/model/robot_arm.py`)
- Simulation camera → Simulator connection: uses (evidence: `python/src/robot_arm/vision/cameras/simulation_camera.py`)
- Simulator connection → CoppeliaSim: connects to (evidence: `python/src/robot_arm/simulation/connection.py`)
- Simulation camera → CoppeliaSim: reads sensor (evidence: `python/src/robot_arm/vision/cameras/simulation_camera.py`)
- Robot arm model → CoppeliaSim: controls motion (evidence: `python/src/robot_arm/model/robot_arm.py`)
- Configuration → Simulator connection: configures (evidence: `python/src/robot_arm/simulation/connection.py`)
- Configuration → Simulation camera: configures (evidence: `python/src/robot_arm/vision/cameras/simulation_camera.py`)
- Configuration → Robot arm model: configures (evidence: `python/src/robot_arm/model/robot_arm.py`)
