# samer-cyber/robotic-arm architecture

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

- Interactive diagram: https://gitdiagram.com/samer-cyber/robotic-arm
- Repository: https://github.com/samer-cyber/robotic-arm

## Overview

This repository builds and operates a six-axis robot arm: a browser panel or host API sends commands through the Python driver to ESP32 firmware, which controls stepper and servo joints. The host also provides simulation, kinematics, a 3D twin and hand-tracking teleoperation; separate repository branches generate gearbox CAD and support a legacy ROS 2 vision experiment. Edges are limited to calls visible in excerpts, source-index references, or README statements; unsampled implementations are represented only where their subsystem is documented.

Main entry points: [`archive/3dof-test-rig/src/console.cpp`](https://github.com/samer-cyber/robotic-arm/blob/main/archive/3dof-test-rig/src/console.cpp) (Test-rig console), [`host/control.py`](https://github.com/samer-cyber/robotic-arm/blob/main/host/control.py) (Browser panel and twin), [`host/armlink/arm.py`](https://github.com/samer-cyber/robotic-arm/blob/main/host/armlink/arm.py) (Arm API), [`firmware/src/main.cpp`](https://github.com/samer-cyber/robotic-arm/blob/main/firmware/src/main.cpp) (ESP32 controller)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_host["Host control"]
  node_panel["Browser panel and twin<br/>[control.py]"]
  node_teleop["Hand teleoperation<br/>[teleop.py]"]
  node_kinematics["6-DOF kinematics<br/>[kinematics.py]"]
  node_arm_api["Arm API<br/>[arm.py]"]
  node_serial_link["Serial link<br/>[link.py]"]
  node_simulator["Arm simulator<br/>[fake.py]"]
end

subgraph group_firmware["Arm firmware"]
  node_esp["ESP32 controller<br/>[main.cpp]"]
  node_protocol["Command protocol<br/>[Protocol.cpp]"]
  node_arm_control["Arm coordination<br/>[Arm.cpp]"]
  node_joint_interface["Joint interface<br/>[Joint.h]"]
  node_joint_drivers["Stepper and servo joints"]
  node_tmc_bus["TMC bus<br/>[TmcBus.cpp]"]
  node_arm_config["Arm configuration<br/>[ArmConfig.h]"]
end

subgraph group_design["Mechanical design"]
  node_gearbox["Cycloidal gearbox generator<br/>[cyclo_core.py]"]
  node_description["Robot description builder"]
  node_wiring["Wiring schematic generator"]
end

subgraph group_vision["Vision experiments"]
  node_vision_node["Spatial vision node"]
  node_vla_commander["VLA commander"]
  node_vision_kinematics["3-DOF kinematics<br/>[kinematics_3dof.py]"]
end

subgraph group_legacy["Archived test rig"]
  node_test_console["Test-rig console<br/>[console.cpp]"]
  node_test_motion["Test-rig motion<br/>[motion.cpp]"]
  node_test_drivers["Test-rig drivers<br/>[drivers.cpp]"]
  node_test_servos["Test-rig servos<br/>[servos.cpp]"]
  node_test_config["Test-rig configuration<br/>[config.h]"]
  node_test_kinematics["Test-rig kinematics<br/>[kinematics.h]"]
end

node_operator(("Operator"))
node_camera["Overhead camera"]

node_operator -->|"uses"| node_panel
node_panel -->|"commands"| node_arm_api
node_panel -->|"delegates to"| node_teleop
node_teleop -->|"solves targets"| node_kinematics
node_arm_api -->|"uses"| node_serial_link
node_arm_api -.->|"connects optionally"| node_simulator
node_serial_link -.->|"serial commands"| node_esp
node_esp -->|"polls"| node_protocol
node_esp -->|"polls"| node_arm_control
node_protocol -.->|"coordinates"| node_arm_control
node_arm_control -->|"uses"| node_joint_interface
node_joint_drivers -.->|"implements"| node_joint_interface
node_joint_drivers -.->|"configures steppers"| node_tmc_bus
node_arm_config -->|"configures"| node_joint_interface
node_operator -->|"generates CAD"| node_gearbox
node_operator -->|"builds model assets"| node_description
node_operator -->|"generates schematic"| node_wiring
node_camera -.->|"provides images"| node_vision_node
node_vision_node -.->|"computes reach"| node_vision_kinematics
node_vla_commander -.->|"coordinates"| node_vision_node
node_test_console -->|"commands"| node_test_motion
node_test_console -->|"configures"| node_test_drivers
node_test_console -->|"queries"| node_test_kinematics
node_test_motion -.->|"uses"| node_test_drivers
node_test_console -.->|"controls"| node_test_servos
node_test_config -->|"configures"| node_test_kinematics

click node_panel "https://github.com/samer-cyber/robotic-arm/blob/main/host/control.py"
click node_teleop "https://github.com/samer-cyber/robotic-arm/blob/main/host/armlink/teleop.py"
click node_kinematics "https://github.com/samer-cyber/robotic-arm/blob/main/host/armlink/kinematics.py"
click node_arm_api "https://github.com/samer-cyber/robotic-arm/blob/main/host/armlink/arm.py"
click node_serial_link "https://github.com/samer-cyber/robotic-arm/blob/main/host/armlink/link.py"
click node_simulator "https://github.com/samer-cyber/robotic-arm/blob/main/host/armlink/fake.py"
click node_esp "https://github.com/samer-cyber/robotic-arm/blob/main/firmware/src/main.cpp"
click node_protocol "https://github.com/samer-cyber/robotic-arm/blob/main/firmware/src/Protocol.cpp"
click node_arm_control "https://github.com/samer-cyber/robotic-arm/blob/main/firmware/src/Arm.cpp"
click node_joint_interface "https://github.com/samer-cyber/robotic-arm/blob/main/firmware/src/Joint.h"
click node_joint_drivers "https://github.com/samer-cyber/robotic-arm/tree/main/firmware/src"
click node_tmc_bus "https://github.com/samer-cyber/robotic-arm/blob/main/firmware/src/TmcBus.cpp"
click node_arm_config "https://github.com/samer-cyber/robotic-arm/blob/main/firmware/src/ArmConfig.h"
click node_gearbox "https://github.com/samer-cyber/robotic-arm/blob/main/hardware/gearbox-generator/CycloidalJoint/cyclo_core.py"
click node_description "https://github.com/samer-cyber/robotic-arm/blob/main/description/tools/build_description.py"
click node_wiring "https://github.com/samer-cyber/robotic-arm/blob/main/hardware/electronics/wiring/tools/make_wiring_schematic.py"
click node_vision_node "https://github.com/samer-cyber/robotic-arm/blob/main/ros2/vla_ws/src/arm_vla/arm_vla/vision_spatial_node.py"
click node_vla_commander "https://github.com/samer-cyber/robotic-arm/blob/main/ros2/vla_ws/src/arm_vla/arm_vla/vla_commander_node.py"
click node_vision_kinematics "https://github.com/samer-cyber/robotic-arm/blob/main/ros2/vla_ws/src/arm_vla/arm_vla/kinematics_3dof.py"
click node_test_console "https://github.com/samer-cyber/robotic-arm/blob/main/archive/3dof-test-rig/src/console.cpp"
click node_test_motion "https://github.com/samer-cyber/robotic-arm/blob/main/archive/3dof-test-rig/src/motion.cpp"
click node_test_drivers "https://github.com/samer-cyber/robotic-arm/blob/main/archive/3dof-test-rig/src/drivers.cpp"
click node_test_servos "https://github.com/samer-cyber/robotic-arm/blob/main/archive/3dof-test-rig/src/servos.cpp"
click node_test_config "https://github.com/samer-cyber/robotic-arm/blob/main/archive/3dof-test-rig/src/config.h"
click node_test_kinematics "https://github.com/samer-cyber/robotic-arm/blob/main/archive/3dof-test-rig/src/kinematics.h"

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_panel,node_teleop,node_kinematics,node_arm_api,node_serial_link,node_simulator toneBlue
class node_esp,node_protocol,node_arm_control,node_joint_interface,node_joint_drivers,node_tmc_bus,node_arm_config toneAmber
class node_gearbox,node_description,node_wiring toneMint
class node_vision_node,node_vla_commander,node_vision_kinematics toneRose
class node_test_console,node_test_motion,node_test_drivers,node_test_servos,node_test_config,node_test_kinematics,node_operator,node_camera toneIndigo
```

## Components

### Host control

- [Browser panel and twin](https://github.com/samer-cyber/robotic-arm/blob/main/host/control.py): `host/control.py`
- [Hand teleoperation](https://github.com/samer-cyber/robotic-arm/blob/main/host/armlink/teleop.py): `host/armlink/teleop.py`
- [6-DOF kinematics](https://github.com/samer-cyber/robotic-arm/blob/main/host/armlink/kinematics.py): `host/armlink/kinematics.py`
- [Arm API](https://github.com/samer-cyber/robotic-arm/blob/main/host/armlink/arm.py): `host/armlink/arm.py`
- [Serial link](https://github.com/samer-cyber/robotic-arm/blob/main/host/armlink/link.py): `host/armlink/link.py`
- [Arm simulator](https://github.com/samer-cyber/robotic-arm/blob/main/host/armlink/fake.py): `host/armlink/fake.py`

### Arm firmware

- [ESP32 controller](https://github.com/samer-cyber/robotic-arm/blob/main/firmware/src/main.cpp): `firmware/src/main.cpp`
- [Command protocol](https://github.com/samer-cyber/robotic-arm/blob/main/firmware/src/Protocol.cpp): `firmware/src/Protocol.cpp`
- [Arm coordination](https://github.com/samer-cyber/robotic-arm/blob/main/firmware/src/Arm.cpp): `firmware/src/Arm.cpp`
- [Joint interface](https://github.com/samer-cyber/robotic-arm/blob/main/firmware/src/Joint.h): `firmware/src/Joint.h`
- [Stepper and servo joints](https://github.com/samer-cyber/robotic-arm/tree/main/firmware/src): `firmware/src`
- [TMC bus](https://github.com/samer-cyber/robotic-arm/blob/main/firmware/src/TmcBus.cpp): `firmware/src/TmcBus.cpp`
- [Arm configuration](https://github.com/samer-cyber/robotic-arm/blob/main/firmware/src/ArmConfig.h): `firmware/src/ArmConfig.h`

### Mechanical design

- [Cycloidal gearbox generator](https://github.com/samer-cyber/robotic-arm/blob/main/hardware/gearbox-generator/CycloidalJoint/cyclo_core.py): `hardware/gearbox-generator/CycloidalJoint/cyclo_core.py`
- [Robot description builder](https://github.com/samer-cyber/robotic-arm/blob/main/description/tools/build_description.py): `description/tools/build_description.py`
- [Wiring schematic generator](https://github.com/samer-cyber/robotic-arm/blob/main/hardware/electronics/wiring/tools/make_wiring_schematic.py): `hardware/electronics/wiring/tools/make_wiring_schematic.py`

### Vision experiments

- [Spatial vision node](https://github.com/samer-cyber/robotic-arm/blob/main/ros2/vla_ws/src/arm_vla/arm_vla/vision_spatial_node.py): `ros2/vla_ws/src/arm_vla/arm_vla/vision_spatial_node.py`
- [VLA commander](https://github.com/samer-cyber/robotic-arm/blob/main/ros2/vla_ws/src/arm_vla/arm_vla/vla_commander_node.py): `ros2/vla_ws/src/arm_vla/arm_vla/vla_commander_node.py`
- [3-DOF kinematics](https://github.com/samer-cyber/robotic-arm/blob/main/ros2/vla_ws/src/arm_vla/arm_vla/kinematics_3dof.py): `ros2/vla_ws/src/arm_vla/arm_vla/kinematics_3dof.py`

### Archived test rig

- [Test-rig console](https://github.com/samer-cyber/robotic-arm/blob/main/archive/3dof-test-rig/src/console.cpp): `archive/3dof-test-rig/src/console.cpp`
- [Test-rig motion](https://github.com/samer-cyber/robotic-arm/blob/main/archive/3dof-test-rig/src/motion.cpp): `archive/3dof-test-rig/src/motion.cpp`
- [Test-rig drivers](https://github.com/samer-cyber/robotic-arm/blob/main/archive/3dof-test-rig/src/drivers.cpp): `archive/3dof-test-rig/src/drivers.cpp`
- [Test-rig servos](https://github.com/samer-cyber/robotic-arm/blob/main/archive/3dof-test-rig/src/servos.cpp): `archive/3dof-test-rig/src/servos.cpp`
- [Test-rig configuration](https://github.com/samer-cyber/robotic-arm/blob/main/archive/3dof-test-rig/src/config.h): `archive/3dof-test-rig/src/config.h`
- [Test-rig kinematics](https://github.com/samer-cyber/robotic-arm/blob/main/archive/3dof-test-rig/src/kinematics.h): `archive/3dof-test-rig/src/kinematics.h`

### Other components

- **Operator**
- **Overhead camera**

## Connections

- Operator → Browser panel and twin: uses
- Browser panel and twin → Arm API: commands (evidence: `host/control.py`)
- Browser panel and twin → Hand teleoperation: delegates to (evidence: `host/control.py`)
- Hand teleoperation → 6-DOF kinematics: solves targets (evidence: `host/armlink/teleop.py`)
- Arm API → Serial link: uses (evidence: `host/armlink/arm.py`)
- Arm API → Arm simulator: connects optionally (evidence: `host/armlink/__init__.py`)
- Serial link → ESP32 controller: serial commands
- ESP32 controller → Command protocol: polls (evidence: `firmware/src/main.cpp`)
- ESP32 controller → Arm coordination: polls (evidence: `firmware/src/main.cpp`)
- Command protocol → Arm coordination: coordinates
- Arm coordination → Joint interface: uses
- Stepper and servo joints → Joint interface: implements (evidence: `firmware/src/TmcBus.cpp`)
- Stepper and servo joints → TMC bus: configures steppers (evidence: `firmware/src/TmcBus.cpp`)
- Arm configuration → Joint interface: configures (evidence: `firmware/src/Joint.h`)
- Operator → Cycloidal gearbox generator: generates CAD
- Operator → Robot description builder: builds model assets
- Operator → Wiring schematic generator: generates schematic
- Overhead camera → Spatial vision node: provides images
- Spatial vision node → 3-DOF kinematics: computes reach
- VLA commander → Spatial vision node: coordinates
- Test-rig console → Test-rig motion: commands (evidence: `archive/3dof-test-rig/src/console.cpp`)
- Test-rig console → Test-rig drivers: configures (evidence: `archive/3dof-test-rig/src/console.cpp`)
- Test-rig console → Test-rig kinematics: queries (evidence: `archive/3dof-test-rig/src/console.cpp`)
- Test-rig motion → Test-rig drivers: uses
- Test-rig console → Test-rig servos: controls
- Test-rig configuration → Test-rig kinematics: configures (evidence: `archive/3dof-test-rig/src/kinematics.h`)
