# luigipacheco/animaquina architecture

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

- Interactive diagram: https://gitdiagram.com/luigipacheco/animaquina
- Repository: https://github.com/luigipacheco/animaquina

## Overview

Animaquina is a Blender add-on for controlling multiple robots, visualizing their live state, previewing motion, and exporting offline programs. The principal workflow starts with a user configuring a robot slot in Blender, connecting through the manager and a robot-specific driver, then polling state back into the Blender rig. Separate branches support motion and toolpaths, simulation and validation, exports, and KUKA end-effector streaming. Relationships are based on the README and SOURCE INDEX references; unsampled feature internals are represented at their documented directory paths.

Main entry points: [`animaquina/ui/operators.py`](https://github.com/luigipacheco/animaquina/blob/main/animaquina/ui/operators.py) (Panels and Operators), [`animaquina/manager.py`](https://github.com/luigipacheco/animaquina/blob/main/animaquina/manager.py) (Robot Manager), [`animaquina/animaquina_core/drivers/base.py`](https://github.com/luigipacheco/animaquina/blob/main/animaquina/animaquina_core/drivers/base.py) (Driver Interface), [`animaquina/runtime/krl_export.py`](https://github.com/luigipacheco/animaquina/blob/main/animaquina/runtime/krl_export.py) (KRL Export)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_blender["Blender Interface"]
  node_ui["Panels and Operators<br/>[operators.py]"]
  node_properties["Robot Slots<br/>[properties.py]"]
  node_markers["TCP Markers<br/>[markers.py]"]
end

subgraph group_control["Robot Control"]
  node_manager["Robot Manager<br/>[manager.py]"]
  node_driverbase["Driver Interface<br/>[base.py]"]
  node_urdriver["UR Driver<br/>[ur_driver.py]"]
  node_kukadriver["KUKA Driver<br/>[kuka_driver.py]"]
  node_xarmdriver["xArm Driver<br/>[xarm_driver.py]"]
end

subgraph group_motion["Motion and Simulation"]
  node_rig["Rig Pose Apply<br/>[rig_apply.py]"]
  node_simulation["IK Simulation Rig<br/>[simulation.py]"]
  node_validation["Path Validation"]
  node_toolpaths["Toolpath Waypoints<br/>[export_points.py]"]
  node_krlstream["KUKA Stream<br/>[krl_stream.py]"]
  node_streamruntime["KUKA Stream Runtime"]
  node_parser["KRL Parser<br/>[kuka_krl_parser.py]"]
end

subgraph group_programs["Programs and Data"]
  node_exports["Program Exports<br/>[program_exports.py]"]
  node_ur_export["URScript Export<br/>[ur_export.py]"]
  node_krl_export["KRL Export<br/>[krl_export.py]"]
  node_recorder["Dataset Recorder<br/>[recorder.py]"]
end

node_user(("Robot Operator"))
node_robot{{"Robot Controller"}}

node_user -->|"operates"| node_ui
node_ui -->|"configures"| node_properties
node_ui -->|"controls"| node_manager
node_manager -->|"creates drivers"| node_driverbase
node_manager -->|"applies pose"| node_rig
node_manager -->|"records samples"| node_recorder
node_driverbase -.->|"implemented by"| node_urdriver
node_driverbase -.->|"implemented by"| node_kukadriver
node_driverbase -.->|"implemented by"| node_xarmdriver
node_urdriver -->|"communicates with"| node_robot
node_kukadriver -->|"communicates with"| node_robot
node_xarmdriver -->|"communicates with"| node_robot
node_ui -->|"sets up preview"| node_simulation
node_ui -->|"requests checks"| node_validation
node_ui -->|"runs toolpath"| node_toolpaths
node_ui -->|"streams path"| node_krlstream
node_ui -->|"runs KUKA stream"| node_streamruntime
node_streamruntime -->|"parses commands"| node_parser
node_ui -->|"exports KRL"| node_krl_export
node_ui -->|"exports URScript"| node_ur_export
node_krl_export -->|"extracts points"| node_toolpaths
node_krl_export -->|"uses export helpers"| node_exports
node_ui -->|"drops markers"| node_markers
node_robot -->|"returns state"| node_manager
node_ui -.->|"uploads or runs program"| node_robot

click node_ui "https://github.com/luigipacheco/animaquina/blob/main/animaquina/ui/operators.py"
click node_properties "https://github.com/luigipacheco/animaquina/blob/main/animaquina/properties.py"
click node_manager "https://github.com/luigipacheco/animaquina/blob/main/animaquina/manager.py"
click node_driverbase "https://github.com/luigipacheco/animaquina/blob/main/animaquina/animaquina_core/drivers/base.py"
click node_urdriver "https://github.com/luigipacheco/animaquina/blob/main/animaquina/animaquina_core/drivers/ur_driver.py"
click node_kukadriver "https://github.com/luigipacheco/animaquina/blob/main/animaquina/animaquina_core/drivers/kuka_driver.py"
click node_xarmdriver "https://github.com/luigipacheco/animaquina/blob/main/animaquina/animaquina_core/drivers/xarm_driver.py"
click node_rig "https://github.com/luigipacheco/animaquina/blob/main/animaquina/runtime/rig_apply.py"
click node_simulation "https://github.com/luigipacheco/animaquina/blob/main/animaquina/runtime/simulation.py"
click node_validation "https://github.com/luigipacheco/animaquina/blob/main/animaquina/runtime/newton_validator.py"
click node_toolpaths "https://github.com/luigipacheco/animaquina/blob/main/animaquina/runtime/export_points.py"
click node_krlstream "https://github.com/luigipacheco/animaquina/blob/main/animaquina/animaquina_core/runtime/krl_stream.py"
click node_streamruntime "https://github.com/luigipacheco/animaquina/blob/main/animaquina/animaquina_core/runtime/kuka_stream_runtime.py"
click node_parser "https://github.com/luigipacheco/animaquina/blob/main/animaquina/animaquina_core/runtime/kuka_krl_parser.py"
click node_exports "https://github.com/luigipacheco/animaquina/blob/main/animaquina/animaquina_core/runtime/program_exports.py"
click node_ur_export "https://github.com/luigipacheco/animaquina/blob/main/animaquina/runtime/ur_export.py"
click node_krl_export "https://github.com/luigipacheco/animaquina/blob/main/animaquina/runtime/krl_export.py"
click node_recorder "https://github.com/luigipacheco/animaquina/blob/main/animaquina/runtime/recorder.py"
click node_markers "https://github.com/luigipacheco/animaquina/blob/main/animaquina/runtime/markers.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_ui,node_properties,node_markers toneBlue
class node_manager,node_driverbase,node_urdriver,node_kukadriver,node_xarmdriver toneAmber
class node_rig,node_simulation,node_validation,node_toolpaths,node_krlstream,node_streamruntime,node_parser toneMint
class node_exports,node_ur_export,node_krl_export,node_recorder toneRose
class node_user,node_robot toneIndigo
```

## Components

### Blender Interface

- [Panels and Operators](https://github.com/luigipacheco/animaquina/blob/main/animaquina/ui/operators.py): `animaquina/ui/operators.py`
- [Robot Slots](https://github.com/luigipacheco/animaquina/blob/main/animaquina/properties.py): `animaquina/properties.py`
- [TCP Markers](https://github.com/luigipacheco/animaquina/blob/main/animaquina/runtime/markers.py): `animaquina/runtime/markers.py`

### Robot Control

- [Robot Manager](https://github.com/luigipacheco/animaquina/blob/main/animaquina/manager.py): `animaquina/manager.py`
- [Driver Interface](https://github.com/luigipacheco/animaquina/blob/main/animaquina/animaquina_core/drivers/base.py): `animaquina/animaquina_core/drivers/base.py`
- [UR Driver](https://github.com/luigipacheco/animaquina/blob/main/animaquina/animaquina_core/drivers/ur_driver.py): `animaquina/animaquina_core/drivers/ur_driver.py`
- [KUKA Driver](https://github.com/luigipacheco/animaquina/blob/main/animaquina/animaquina_core/drivers/kuka_driver.py): `animaquina/animaquina_core/drivers/kuka_driver.py`
- [xArm Driver](https://github.com/luigipacheco/animaquina/blob/main/animaquina/animaquina_core/drivers/xarm_driver.py): `animaquina/animaquina_core/drivers/xarm_driver.py`

### Motion and Simulation

- [Rig Pose Apply](https://github.com/luigipacheco/animaquina/blob/main/animaquina/runtime/rig_apply.py): `animaquina/runtime/rig_apply.py`
- [IK Simulation Rig](https://github.com/luigipacheco/animaquina/blob/main/animaquina/runtime/simulation.py): `animaquina/runtime/simulation.py`
- [Path Validation](https://github.com/luigipacheco/animaquina/blob/main/animaquina/runtime/newton_validator.py): `animaquina/runtime/newton_validator.py`
- [Toolpath Waypoints](https://github.com/luigipacheco/animaquina/blob/main/animaquina/runtime/export_points.py): `animaquina/runtime/export_points.py`
- [KUKA Stream](https://github.com/luigipacheco/animaquina/blob/main/animaquina/animaquina_core/runtime/krl_stream.py): `animaquina/animaquina_core/runtime/krl_stream.py`
- [KUKA Stream Runtime](https://github.com/luigipacheco/animaquina/blob/main/animaquina/animaquina_core/runtime/kuka_stream_runtime.py): `animaquina/animaquina_core/runtime/kuka_stream_runtime.py`
- [KRL Parser](https://github.com/luigipacheco/animaquina/blob/main/animaquina/animaquina_core/runtime/kuka_krl_parser.py): `animaquina/animaquina_core/runtime/kuka_krl_parser.py`

### Programs and Data

- [Program Exports](https://github.com/luigipacheco/animaquina/blob/main/animaquina/animaquina_core/runtime/program_exports.py): `animaquina/animaquina_core/runtime/program_exports.py`
- [URScript Export](https://github.com/luigipacheco/animaquina/blob/main/animaquina/runtime/ur_export.py): `animaquina/runtime/ur_export.py`
- [KRL Export](https://github.com/luigipacheco/animaquina/blob/main/animaquina/runtime/krl_export.py): `animaquina/runtime/krl_export.py`
- [Dataset Recorder](https://github.com/luigipacheco/animaquina/blob/main/animaquina/runtime/recorder.py): `animaquina/runtime/recorder.py`

### Other components

- **Robot Operator**
- **Robot Controller**

## Connections

- Robot Operator → Panels and Operators: operates
- Panels and Operators → Robot Slots: configures
- Panels and Operators → Robot Manager: controls (evidence: `animaquina/ui/operators.py`)
- Robot Manager → Driver Interface: creates drivers (evidence: `animaquina/manager.py`)
- Robot Manager → Rig Pose Apply: applies pose (evidence: `animaquina/manager.py`)
- Robot Manager → Dataset Recorder: records samples (evidence: `animaquina/manager.py`)
- Driver Interface → UR Driver: implemented by (evidence: `animaquina/animaquina_core/drivers/ur_driver.py`)
- Driver Interface → KUKA Driver: implemented by (evidence: `animaquina/animaquina_core/drivers/kuka_driver.py`)
- Driver Interface → xArm Driver: implemented by (evidence: `animaquina/animaquina_core/drivers/xarm_driver.py`)
- UR Driver → Robot Controller: communicates with
- KUKA Driver → Robot Controller: communicates with
- xArm Driver → Robot Controller: communicates with
- Panels and Operators → IK Simulation Rig: sets up preview (evidence: `animaquina/ui/operators.py`)
- Panels and Operators → Path Validation: requests checks (evidence: `animaquina/ui/operators.py`)
- Panels and Operators → Toolpath Waypoints: runs toolpath
- Panels and Operators → KUKA Stream: streams path (evidence: `animaquina/ui/operators.py`)
- Panels and Operators → KUKA Stream Runtime: runs KUKA stream (evidence: `animaquina/ui/operators.py`)
- KUKA Stream Runtime → KRL Parser: parses commands (evidence: `animaquina/animaquina_core/runtime/kuka_stream_runtime.py`)
- Panels and Operators → KRL Export: exports KRL (evidence: `animaquina/ui/operators.py`)
- Panels and Operators → URScript Export: exports URScript (evidence: `animaquina/ui/operators.py`)
- KRL Export → Toolpath Waypoints: extracts points (evidence: `animaquina/runtime/krl_export.py`)
- KRL Export → Program Exports: uses export helpers (evidence: `animaquina/runtime/krl_export.py`)
- Panels and Operators → TCP Markers: drops markers (evidence: `animaquina/ui/operators.py`)
- Robot Controller → Robot Manager: returns state
- Panels and Operators → Robot Controller: uploads or runs program
