# tna001-ai/lerobot_tactile architecture

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

- Interactive diagram: https://gitdiagram.com/tna001-ai/lerobot_tactile
- Repository: https://github.com/tna001-ai/lerobot_tactile

## Overview

LeFlexiTac extends LeRobot with FlexiTac tactile sensing across robot data collection, dataset processing, and policy training/inference. A typical workflow collects synchronized robot, camera, and touch observations; stores them in LeRobot datasets; trains a supported policy; and evaluates or runs that policy on a robot. The README documents ACT, Diffusion, Pi0.5, and SmolVLA support. The sampled source confirms processor pipelines and robot-client behavior, but not the full recording or training call paths, so those links are shown only where supported by the documented product workflow.

Main entry points: [`src/lerobot/scripts/lerobot_record.py`](https://github.com/tna001-ai/lerobot_tactile/blob/main/src/lerobot/scripts/lerobot_record.py) (Record workflow), [`src/lerobot/policies/factory.py`](https://github.com/tna001-ai/lerobot_tactile/blob/main/src/lerobot/policies/factory.py) (Policy selection), [`src/lerobot/async_inference/robot_client.py`](https://github.com/tna001-ai/lerobot_tactile/blob/main/src/lerobot/async_inference/robot_client.py) (Async robot client), [`src/lerobot/scripts/lerobot_train.py`](https://github.com/tna001-ai/lerobot_tactile/blob/main/src/lerobot/scripts/lerobot_train.py) (Training workflow)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_capture["Robot Capture"]
  node_record["Record workflow<br/>[lerobot_record.py]"]
  node_teleop["Teleoperation<br/>[teleoperator.py]"]
  node_robot["Robot drivers<br/>[robot.py]"]
  node_camera["Camera drivers<br/>[camera.py]"]
  node_tactile["Tactile sensing<br/>[tactile_sensor.py]"]
end

subgraph group_data["Data Processing"]
  node_tactile_proc["Tactile processing"]
  node_processor["Processor pipeline<br/>[pipeline.py]"]
  node_dataset[("Robot datasets<br/>[lerobot_dataset.py]")]
  node_dataset_tools["Dataset tools<br/>[dataset_tools.py]"]
end

subgraph group_learning["Policy Learning"]
  node_train["Training workflow<br/>[lerobot_train.py]"]
  node_policy_factory["Policy selection<br/>[factory.py]"]
  node_act["ACT policy<br/>[modeling_act.py]"]
  node_diffusion["Diffusion policy"]
  node_pi05["Pi0.5 policy<br/>[modeling_pi05.py]"]
  node_smolvla["SmolVLA policy"]
end

subgraph group_runtime["Robot Inference"]
  node_eval["Evaluation workflow<br/>[lerobot_eval.py]"]
  node_async_client["Async robot client<br/>[robot_client.py]"]
  node_policy_server["Policy server<br/>[policy_server.py]"]
end

node_user(("Operator"))
node_pyflexitac["PyFlexiTac driver"]

node_user -->|"starts collection"| node_record
node_record -->|"uses controls"| node_teleop
node_record -->|"records state"| node_robot
node_record -->|"records images"| node_camera
node_record -->|"records touch"| node_tactile
node_tactile -.->|"reads sensor"| node_pyflexitac
node_record -->|"processes observations"| node_processor
node_tactile_proc -->|"processes touch"| node_processor
node_processor -->|"writes samples"| node_dataset
node_user -->|"starts training"| node_train
node_train -->|"reads samples"| node_dataset
node_train -->|"selects policy"| node_policy_factory
node_policy_factory -->|"creates ACT"| node_act
node_policy_factory -->|"creates Diffusion"| node_diffusion
node_policy_factory -->|"creates Pi0.5"| node_pi05
node_policy_factory -->|"creates SmolVLA"| node_smolvla
node_user -->|"starts evaluation"| node_eval
node_eval -->|"runs policy on"| node_robot
node_user -->|"starts remote control"| node_async_client
node_async_client -->|"sends actions"| node_robot
node_async_client -->|"streams observations"| node_policy_server
node_policy_server -->|"returns actions"| node_async_client

click node_record "https://github.com/tna001-ai/lerobot_tactile/blob/main/src/lerobot/scripts/lerobot_record.py"
click node_teleop "https://github.com/tna001-ai/lerobot_tactile/blob/main/src/lerobot/teleoperators/teleoperator.py"
click node_robot "https://github.com/tna001-ai/lerobot_tactile/blob/main/src/lerobot/robots/robot.py"
click node_camera "https://github.com/tna001-ai/lerobot_tactile/blob/main/src/lerobot/cameras/camera.py"
click node_tactile "https://github.com/tna001-ai/lerobot_tactile/blob/main/src/lerobot/sensors/tactile_sensor.py"
click node_tactile_proc "https://github.com/tna001-ai/lerobot_tactile/blob/main/src/lerobot/processor/tactile_processor.py"
click node_processor "https://github.com/tna001-ai/lerobot_tactile/blob/main/src/lerobot/processor/pipeline.py"
click node_dataset "https://github.com/tna001-ai/lerobot_tactile/blob/main/src/lerobot/datasets/lerobot_dataset.py"
click node_dataset_tools "https://github.com/tna001-ai/lerobot_tactile/blob/main/src/lerobot/datasets/dataset_tools.py"
click node_train "https://github.com/tna001-ai/lerobot_tactile/blob/main/src/lerobot/scripts/lerobot_train.py"
click node_policy_factory "https://github.com/tna001-ai/lerobot_tactile/blob/main/src/lerobot/policies/factory.py"
click node_act "https://github.com/tna001-ai/lerobot_tactile/blob/main/src/lerobot/policies/act/modeling_act.py"
click node_diffusion "https://github.com/tna001-ai/lerobot_tactile/blob/main/src/lerobot/policies/diffusion/modeling_diffusion.py"
click node_pi05 "https://github.com/tna001-ai/lerobot_tactile/blob/main/src/lerobot/policies/pi05/modeling_pi05.py"
click node_smolvla "https://github.com/tna001-ai/lerobot_tactile/blob/main/src/lerobot/policies/smolvla/modeling_smolvla.py"
click node_eval "https://github.com/tna001-ai/lerobot_tactile/blob/main/src/lerobot/scripts/lerobot_eval.py"
click node_async_client "https://github.com/tna001-ai/lerobot_tactile/blob/main/src/lerobot/async_inference/robot_client.py"
click node_policy_server "https://github.com/tna001-ai/lerobot_tactile/blob/main/src/lerobot/async_inference/policy_server.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_record,node_teleop,node_robot,node_camera,node_tactile toneBlue
class node_tactile_proc,node_processor,node_dataset,node_dataset_tools toneAmber
class node_train,node_policy_factory,node_act,node_diffusion,node_pi05,node_smolvla toneMint
class node_eval,node_async_client,node_policy_server toneRose
class node_user,node_pyflexitac toneIndigo
```

## Components

### Robot Capture

- [Record workflow](https://github.com/tna001-ai/lerobot_tactile/blob/main/src/lerobot/scripts/lerobot_record.py): `src/lerobot/scripts/lerobot_record.py`
- [Teleoperation](https://github.com/tna001-ai/lerobot_tactile/blob/main/src/lerobot/teleoperators/teleoperator.py): `src/lerobot/teleoperators/teleoperator.py`
- [Robot drivers](https://github.com/tna001-ai/lerobot_tactile/blob/main/src/lerobot/robots/robot.py): `src/lerobot/robots/robot.py`
- [Camera drivers](https://github.com/tna001-ai/lerobot_tactile/blob/main/src/lerobot/cameras/camera.py): `src/lerobot/cameras/camera.py`
- [Tactile sensing](https://github.com/tna001-ai/lerobot_tactile/blob/main/src/lerobot/sensors/tactile_sensor.py): `src/lerobot/sensors/tactile_sensor.py`

### Data Processing

- [Tactile processing](https://github.com/tna001-ai/lerobot_tactile/blob/main/src/lerobot/processor/tactile_processor.py): `src/lerobot/processor/tactile_processor.py`
- [Processor pipeline](https://github.com/tna001-ai/lerobot_tactile/blob/main/src/lerobot/processor/pipeline.py): `src/lerobot/processor/pipeline.py`
- [Robot datasets](https://github.com/tna001-ai/lerobot_tactile/blob/main/src/lerobot/datasets/lerobot_dataset.py): `src/lerobot/datasets/lerobot_dataset.py`
- [Dataset tools](https://github.com/tna001-ai/lerobot_tactile/blob/main/src/lerobot/datasets/dataset_tools.py): `src/lerobot/datasets/dataset_tools.py`

### Policy Learning

- [Training workflow](https://github.com/tna001-ai/lerobot_tactile/blob/main/src/lerobot/scripts/lerobot_train.py): `src/lerobot/scripts/lerobot_train.py`
- [Policy selection](https://github.com/tna001-ai/lerobot_tactile/blob/main/src/lerobot/policies/factory.py): `src/lerobot/policies/factory.py`
- [ACT policy](https://github.com/tna001-ai/lerobot_tactile/blob/main/src/lerobot/policies/act/modeling_act.py): `src/lerobot/policies/act/modeling_act.py`
- [Diffusion policy](https://github.com/tna001-ai/lerobot_tactile/blob/main/src/lerobot/policies/diffusion/modeling_diffusion.py): `src/lerobot/policies/diffusion/modeling_diffusion.py`
- [Pi0.5 policy](https://github.com/tna001-ai/lerobot_tactile/blob/main/src/lerobot/policies/pi05/modeling_pi05.py): `src/lerobot/policies/pi05/modeling_pi05.py`
- [SmolVLA policy](https://github.com/tna001-ai/lerobot_tactile/blob/main/src/lerobot/policies/smolvla/modeling_smolvla.py): `src/lerobot/policies/smolvla/modeling_smolvla.py`

### Robot Inference

- [Evaluation workflow](https://github.com/tna001-ai/lerobot_tactile/blob/main/src/lerobot/scripts/lerobot_eval.py): `src/lerobot/scripts/lerobot_eval.py`
- [Async robot client](https://github.com/tna001-ai/lerobot_tactile/blob/main/src/lerobot/async_inference/robot_client.py): `src/lerobot/async_inference/robot_client.py`
- [Policy server](https://github.com/tna001-ai/lerobot_tactile/blob/main/src/lerobot/async_inference/policy_server.py): `src/lerobot/async_inference/policy_server.py`

### Other components

- **Operator**
- **PyFlexiTac driver**

## Connections

- Operator → Record workflow: starts collection
- Record workflow → Teleoperation: uses controls
- Record workflow → Robot drivers: records state
- Record workflow → Camera drivers: records images
- Record workflow → Tactile sensing: records touch
- Tactile sensing → PyFlexiTac driver: reads sensor
- Record workflow → Processor pipeline: processes observations
- Tactile processing → Processor pipeline: processes touch
- Processor pipeline → Robot datasets: writes samples
- Operator → Training workflow: starts training
- Training workflow → Robot datasets: reads samples
- Training workflow → Policy selection: selects policy
- Policy selection → ACT policy: creates ACT
- Policy selection → Diffusion policy: creates Diffusion
- Policy selection → Pi0.5 policy: creates Pi0.5
- Policy selection → SmolVLA policy: creates SmolVLA
- Operator → Evaluation workflow: starts evaluation
- Evaluation workflow → Robot drivers: runs policy on
- Operator → Async robot client: starts remote control
- Async robot client → Robot drivers: sends actions
- Async robot client → Policy server: streams observations
- Policy server → Async robot client: returns actions
