# intelligent-control-lab/aidf architecture

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

- Interactive diagram: https://gitdiagram.com/intelligent-control-lab/aidf
- Repository: https://github.com/intelligent-control-lab/aidf

## Overview

AIDF models robotic assembly as an ontology-backed skill graph, plans multi-robot task execution, and provides planner-driven and webpage-driven simulation workflows. The planner path starts at `plan_lego`; the web path sends individual skills through the webpage backend. The graph preserves task, skill, robot/object, planning, and MoveIt capabilities. Several implementation links are supported only by README documentation or imports; unsampled runtime behavior is not inferred.

Main entry points: [`skillgraph/src/skillgraph.cpp`](https://github.com/intelligent-control-lab/aidf/blob/main/skillgraph/src/skillgraph.cpp) (Skillgraph), [`planner/src/planner.cpp`](https://github.com/intelligent-control-lab/aidf/blob/main/planner/src/planner.cpp) (Planner), [`exe/plan_lego.cpp`](https://github.com/intelligent-control-lab/aidf/blob/main/exe/plan_lego.cpp) (Planner app), [`skillgraph/api/tasks.hpp`](https://github.com/intelligent-control-lab/aidf/blob/main/skillgraph/api/tasks.hpp) (Task sequences)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["User entry points"]
  node_planner_app["Planner app<br/>[plan_lego.cpp]"]
  node_web_app["Web backend<br/>[server.py]"]
end

subgraph group_model["Skillgraph ontology"]
  node_skillgraph["Skillgraph<br/>[skillgraph.cpp]"]
  node_lego_graph["Lego graph"]
  node_task_model["Task sequences<br/>[tasks.hpp]"]
  node_lego_tasks["Lego tasks<br/>[lego_tasks.cpp]"]
  node_skill_model["Skills<br/>[skills.hpp]"]
  node_robot_model["Robot model<br/>[robots.hpp]"]
  node_object_model["Object model<br/>[objects.hpp]"]
  node_environment["Environment state<br/>[environment.cpp]"]
end

subgraph group_planning["Task and motion planning"]
  node_algorithms["Planning algorithms"]
  node_planner["Planner<br/>[planner.cpp]"]
  node_task_graph["Task graph<br/>[task_graph.cpp]"]
  node_adg["Activity graph<br/>[adg.cpp]"]
  node_tpg["Temporal graph<br/>[tpg.cpp]"]
  node_skillplan["Skill plans<br/>[skillplan.cpp]"]
end

subgraph group_execution["Robot execution"]
  node_moveit["MoveIt backend<br/>[moveit_backend.cpp]"]
  node_executor["Plan executor<br/>[executor.py]"]
  node_validation["Plan validation<br/>[validate.py]"]
end

node_operator(("Operator"))
node_simulator["Robot simulator"]

node_operator -->|"starts planning"| node_planner_app
node_planner_app -->|"initializes graph"| node_skillgraph
node_planner_app -->|"requests plan"| node_planner
node_planner_app -.->|"executes skills"| node_moveit
node_operator -->|"sends skills"| node_web_app
node_web_app -.->|"submits commands"| node_moveit
node_skillgraph -->|"uses state"| node_environment
node_skillgraph -->|"uses tasks"| node_task_model
node_skillgraph -->|"uses skills"| node_skill_model
node_skillgraph -->|"uses robots"| node_robot_model
node_skillgraph -->|"uses objects"| node_object_model
node_lego_graph -->|"extends graph"| node_skillgraph
node_lego_graph -->|"uses tasks"| node_lego_tasks
node_lego_tasks -->|"specializes sequence"| node_task_model
node_task_model -->|"references skills"| node_skill_model
node_task_model -->|"references algorithms"| node_algorithms
node_algorithms -->|"uses backend"| node_moveit
node_planner -.->|"builds graph"| node_task_graph
node_planner -.->|"plans activities"| node_adg
node_planner -.->|"computes timing"| node_tpg
node_planner -.->|"produces plan"| node_skillplan
node_planner -->|"reads graph"| node_skillgraph
node_skillplan -->|"replayed by"| node_executor
node_executor -->|"validates plan"| node_validation
node_executor -.->|"dispatches actions"| node_simulator
node_moveit -.->|"controls robot"| node_simulator

click node_planner_app "https://github.com/intelligent-control-lab/aidf/blob/main/exe/plan_lego.cpp"
click node_web_app "https://github.com/intelligent-control-lab/aidf/blob/main/webpage/server.py"
click node_skillgraph "https://github.com/intelligent-control-lab/aidf/blob/main/skillgraph/src/skillgraph.cpp"
click node_lego_graph "https://github.com/intelligent-control-lab/aidf/blob/main/skillgraph/src/lego/lego_skillgraph.cpp"
click node_task_model "https://github.com/intelligent-control-lab/aidf/blob/main/skillgraph/api/tasks.hpp"
click node_lego_tasks "https://github.com/intelligent-control-lab/aidf/blob/main/skillgraph/src/lego/lego_tasks.cpp"
click node_skill_model "https://github.com/intelligent-control-lab/aidf/blob/main/skillgraph/api/skills.hpp"
click node_robot_model "https://github.com/intelligent-control-lab/aidf/blob/main/skillgraph/api/robots.hpp"
click node_object_model "https://github.com/intelligent-control-lab/aidf/blob/main/skillgraph/api/objects.hpp"
click node_environment "https://github.com/intelligent-control-lab/aidf/blob/main/skillgraph/src/environment.cpp"
click node_algorithms "https://github.com/intelligent-control-lab/aidf/blob/main/skillgraph/src/lego/lego_algorithms.cpp"
click node_planner "https://github.com/intelligent-control-lab/aidf/blob/main/planner/src/planner.cpp"
click node_task_graph "https://github.com/intelligent-control-lab/aidf/blob/main/planner/src/task_graph.cpp"
click node_adg "https://github.com/intelligent-control-lab/aidf/blob/main/planner/src/adg.cpp"
click node_tpg "https://github.com/intelligent-control-lab/aidf/blob/main/planner/src/tpg.cpp"
click node_skillplan "https://github.com/intelligent-control-lab/aidf/blob/main/skillgraph/src/skillplan.cpp"
click node_moveit "https://github.com/intelligent-control-lab/aidf/blob/main/skillgraph/src/moveit_backend.cpp"
click node_executor "https://github.com/intelligent-control-lab/aidf/blob/main/executor/executor.py"
click node_validation "https://github.com/intelligent-control-lab/aidf/blob/main/executor/validate.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_planner_app,node_web_app toneBlue
class node_skillgraph,node_lego_graph,node_task_model,node_lego_tasks,node_skill_model,node_robot_model,node_object_model,node_environment toneAmber
class node_algorithms,node_planner,node_task_graph,node_adg,node_tpg,node_skillplan toneMint
class node_moveit,node_executor,node_validation toneRose
class node_operator,node_simulator toneIndigo
```

## Components

### User entry points

- [Planner app](https://github.com/intelligent-control-lab/aidf/blob/main/exe/plan_lego.cpp): `exe/plan_lego.cpp`
- [Web backend](https://github.com/intelligent-control-lab/aidf/blob/main/webpage/server.py): `webpage/server.py`

### Skillgraph ontology

- [Skillgraph](https://github.com/intelligent-control-lab/aidf/blob/main/skillgraph/src/skillgraph.cpp): `skillgraph/src/skillgraph.cpp`
- [Lego graph](https://github.com/intelligent-control-lab/aidf/blob/main/skillgraph/src/lego/lego_skillgraph.cpp): `skillgraph/src/lego/lego_skillgraph.cpp`
- [Task sequences](https://github.com/intelligent-control-lab/aidf/blob/main/skillgraph/api/tasks.hpp): `skillgraph/api/tasks.hpp`
- [Lego tasks](https://github.com/intelligent-control-lab/aidf/blob/main/skillgraph/src/lego/lego_tasks.cpp): `skillgraph/src/lego/lego_tasks.cpp`
- [Skills](https://github.com/intelligent-control-lab/aidf/blob/main/skillgraph/api/skills.hpp): `skillgraph/api/skills.hpp`
- [Robot model](https://github.com/intelligent-control-lab/aidf/blob/main/skillgraph/api/robots.hpp): `skillgraph/api/robots.hpp`
- [Object model](https://github.com/intelligent-control-lab/aidf/blob/main/skillgraph/api/objects.hpp): `skillgraph/api/objects.hpp`
- [Environment state](https://github.com/intelligent-control-lab/aidf/blob/main/skillgraph/src/environment.cpp): `skillgraph/src/environment.cpp`

### Task and motion planning

- [Planning algorithms](https://github.com/intelligent-control-lab/aidf/blob/main/skillgraph/src/lego/lego_algorithms.cpp): `skillgraph/src/lego/lego_algorithms.cpp`
- [Planner](https://github.com/intelligent-control-lab/aidf/blob/main/planner/src/planner.cpp): `planner/src/planner.cpp`
- [Task graph](https://github.com/intelligent-control-lab/aidf/blob/main/planner/src/task_graph.cpp): `planner/src/task_graph.cpp`
- [Activity graph](https://github.com/intelligent-control-lab/aidf/blob/main/planner/src/adg.cpp): `planner/src/adg.cpp`
- [Temporal graph](https://github.com/intelligent-control-lab/aidf/blob/main/planner/src/tpg.cpp): `planner/src/tpg.cpp`
- [Skill plans](https://github.com/intelligent-control-lab/aidf/blob/main/skillgraph/src/skillplan.cpp): `skillgraph/src/skillplan.cpp`

### Robot execution

- [MoveIt backend](https://github.com/intelligent-control-lab/aidf/blob/main/skillgraph/src/moveit_backend.cpp): `skillgraph/src/moveit_backend.cpp`
- [Plan executor](https://github.com/intelligent-control-lab/aidf/blob/main/executor/executor.py): `executor/executor.py`
- [Plan validation](https://github.com/intelligent-control-lab/aidf/blob/main/executor/validate.py): `executor/validate.py`

### Other components

- **Operator**
- **Robot simulator**

## Connections

- Operator → Planner app: starts planning
- Planner app → Skillgraph: initializes graph (evidence: `exe/plan_lego.cpp`)
- Planner app → Planner: requests plan (evidence: `exe/plan_lego.cpp`)
- Planner app → MoveIt backend: executes skills
- Operator → Web backend: sends skills
- Web backend → MoveIt backend: submits commands
- Skillgraph → Environment state: uses state
- Skillgraph → Task sequences: uses tasks
- Skillgraph → Skills: uses skills
- Skillgraph → Robot model: uses robots
- Skillgraph → Object model: uses objects
- Lego graph → Skillgraph: extends graph
- Lego graph → Lego tasks: uses tasks
- Lego tasks → Task sequences: specializes sequence
- Task sequences → Skills: references skills (evidence: `skillgraph/api/tasks.hpp`)
- Task sequences → Planning algorithms: references algorithms (evidence: `skillgraph/api/tasks.hpp`)
- Planning algorithms → MoveIt backend: uses backend
- Planner → Task graph: builds graph
- Planner → Activity graph: plans activities
- Planner → Temporal graph: computes timing
- Planner → Skill plans: produces plan
- Planner → Skillgraph: reads graph
- Skill plans → Plan executor: replayed by
- Plan executor → Plan validation: validates plan (evidence: `executor/validate.py`)
- Plan executor → Robot simulator: dispatches actions
- MoveIt backend → Robot simulator: controls robot
