# ugo-plus/lerobot-robot-ugo-pro architecture

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

- Interactive diagram: https://gitdiagram.com/ugo-plus/lerobot-robot-ugo-pro
- Repository: https://github.com/ugo-plus/lerobot-robot-ugo-pro

## Overview

This package integrates ugo Pro hardware with LeRobot: telemetry enters over UDP, is parsed into joint frames, and feeds robot observations or the bilateral teleoperator; LeRobot actions are mapped, safety-clipped, and sent back as MCU commands. Configuration, camera capture, timeout hold behavior, and monitoring are additional capabilities. Edges follow the excerpts and explicit README descriptions; the monitor’s internals and unsampled subsystem details are not inferred.

Main entry points: [`lerobot_robot_ugo_pro/ugo_pro.py`](https://github.com/ugo-plus/lerobot-robot-ugo-pro/blob/main/lerobot_robot_ugo_pro/ugo_pro.py) (Follower robot), [`lerobot_robot_ugo_pro/transport/udp_client.py`](https://github.com/ugo-plus/lerobot-robot-ugo-pro/blob/main/lerobot_robot_ugo_pro/transport/udp_client.py) (UDP telemetry client), [`lerobot_robot_ugo_pro/teleop/ugo_bilcon.py`](https://github.com/ugo-plus/lerobot-robot-ugo-pro/blob/main/lerobot_robot_ugo_pro/teleop/ugo_bilcon.py) (Bilcon teleoperator), [`lerobot_robot_ugo_pro/telemetry/frame.py`](https://github.com/ugo-plus/lerobot-robot-ugo-pro/blob/main/lerobot_robot_ugo_pro/telemetry/frame.py) (Telemetry frame)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_integration["LeRobot integration"]
  node_robot_config["Robot configuration<br/>[config_ugo_pro.py]"]
  node_robot["Follower robot<br/>[ugo_pro.py]"]
  node_bilcon_config["Bilcon configuration"]
  node_bilcon["Bilcon teleoperator<br/>[ugo_bilcon.py]"]
end

subgraph group_telemetry["Telemetry"]
  node_telemetry_client["UDP telemetry client<br/>[udp_client.py]"]
  node_parser["CSV parser<br/>[parser.py]"]
  node_frame["Telemetry frame<br/>[frame.py]"]
  node_time["Time helpers<br/>[time.py]"]
end

subgraph group_commands["Follower commands"]
  node_mapper["Action mapper<br/>[mapper.py]"]
  node_command_client["UDP command client<br/>[udp_client.py]"]
end

subgraph group_operations["Hardware operations"]
  node_monitor["Arm monitor<br/>[ugo_arm_monitor.py]"]
  node_mock["Controller mock"]
end

node_lerobot(("LeRobot tools"))
node_leader(("Leader controller"))
node_mcu(("ugo MCU"))
node_cameras(("Configured cameras"))

node_lerobot -->|"uses robot"| node_robot
node_robot_config -->|"configures"| node_robot
node_leader -.->|"drives"| node_bilcon
node_bilcon_config -->|"configures"| node_bilcon
node_bilcon -->|"starts listener"| node_telemetry_client
node_bilcon -->|"reads actions"| node_frame
node_robot -->|"starts listener"| node_telemetry_client
node_telemetry_client -->|"feeds packets"| node_parser
node_parser -->|"creates frames"| node_frame
node_frame -->|"ages packets"| node_time
node_robot -->|"builds observations"| node_frame
node_robot -->|"maps actions"| node_mapper
node_robot -->|"sends targets"| node_command_client
node_command_client -->|"sends UDP commands"| node_mcu
node_mcu -->|"sends UDP telemetry"| node_telemetry_client
node_robot -->|"captures images"| node_cameras
node_monitor -.->|"monitors hardware"| node_mcu
node_mock -.->|"emulates telemetry"| node_telemetry_client

click node_robot_config "https://github.com/ugo-plus/lerobot-robot-ugo-pro/blob/main/lerobot_robot_ugo_pro/config_ugo_pro.py"
click node_robot "https://github.com/ugo-plus/lerobot-robot-ugo-pro/blob/main/lerobot_robot_ugo_pro/ugo_pro.py"
click node_bilcon_config "https://github.com/ugo-plus/lerobot-robot-ugo-pro/blob/main/lerobot_robot_ugo_pro/teleop/config_ugo_bilcon.py"
click node_bilcon "https://github.com/ugo-plus/lerobot-robot-ugo-pro/blob/main/lerobot_robot_ugo_pro/teleop/ugo_bilcon.py"
click node_mapper "https://github.com/ugo-plus/lerobot-robot-ugo-pro/blob/main/lerobot_robot_ugo_pro/follower/mapper.py"
click node_command_client "https://github.com/ugo-plus/lerobot-robot-ugo-pro/blob/main/lerobot_robot_ugo_pro/transport/udp_client.py"
click node_telemetry_client "https://github.com/ugo-plus/lerobot-robot-ugo-pro/blob/main/lerobot_robot_ugo_pro/transport/udp_client.py"
click node_parser "https://github.com/ugo-plus/lerobot-robot-ugo-pro/blob/main/lerobot_robot_ugo_pro/telemetry/parser.py"
click node_frame "https://github.com/ugo-plus/lerobot-robot-ugo-pro/blob/main/lerobot_robot_ugo_pro/telemetry/frame.py"
click node_time "https://github.com/ugo-plus/lerobot-robot-ugo-pro/blob/main/lerobot_robot_ugo_pro/utils/time.py"
click node_monitor "https://github.com/ugo-plus/lerobot-robot-ugo-pro/blob/main/tools/ugo_arm_monitor.py"
click node_mock "https://github.com/ugo-plus/lerobot-robot-ugo-pro/blob/main/tools/ugo_controller_mock.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_robot_config,node_robot,node_bilcon_config,node_bilcon toneBlue
class node_telemetry_client,node_parser,node_frame,node_time toneAmber
class node_mapper,node_command_client toneMint
class node_monitor,node_mock toneRose
class node_lerobot,node_leader,node_mcu,node_cameras toneIndigo
```

## Components

### LeRobot integration

- [Robot configuration](https://github.com/ugo-plus/lerobot-robot-ugo-pro/blob/main/lerobot_robot_ugo_pro/config_ugo_pro.py): `lerobot_robot_ugo_pro/config_ugo_pro.py`
- [Follower robot](https://github.com/ugo-plus/lerobot-robot-ugo-pro/blob/main/lerobot_robot_ugo_pro/ugo_pro.py): `lerobot_robot_ugo_pro/ugo_pro.py`
- [Bilcon configuration](https://github.com/ugo-plus/lerobot-robot-ugo-pro/blob/main/lerobot_robot_ugo_pro/teleop/config_ugo_bilcon.py): `lerobot_robot_ugo_pro/teleop/config_ugo_bilcon.py`
- [Bilcon teleoperator](https://github.com/ugo-plus/lerobot-robot-ugo-pro/blob/main/lerobot_robot_ugo_pro/teleop/ugo_bilcon.py): `lerobot_robot_ugo_pro/teleop/ugo_bilcon.py`

### Telemetry

- [UDP telemetry client](https://github.com/ugo-plus/lerobot-robot-ugo-pro/blob/main/lerobot_robot_ugo_pro/transport/udp_client.py): `lerobot_robot_ugo_pro/transport/udp_client.py`
- [CSV parser](https://github.com/ugo-plus/lerobot-robot-ugo-pro/blob/main/lerobot_robot_ugo_pro/telemetry/parser.py): `lerobot_robot_ugo_pro/telemetry/parser.py`
- [Telemetry frame](https://github.com/ugo-plus/lerobot-robot-ugo-pro/blob/main/lerobot_robot_ugo_pro/telemetry/frame.py): `lerobot_robot_ugo_pro/telemetry/frame.py`
- [Time helpers](https://github.com/ugo-plus/lerobot-robot-ugo-pro/blob/main/lerobot_robot_ugo_pro/utils/time.py): `lerobot_robot_ugo_pro/utils/time.py`

### Follower commands

- [Action mapper](https://github.com/ugo-plus/lerobot-robot-ugo-pro/blob/main/lerobot_robot_ugo_pro/follower/mapper.py): `lerobot_robot_ugo_pro/follower/mapper.py`
- [UDP command client](https://github.com/ugo-plus/lerobot-robot-ugo-pro/blob/main/lerobot_robot_ugo_pro/transport/udp_client.py): `lerobot_robot_ugo_pro/transport/udp_client.py`

### Hardware operations

- [Arm monitor](https://github.com/ugo-plus/lerobot-robot-ugo-pro/blob/main/tools/ugo_arm_monitor.py): `tools/ugo_arm_monitor.py`
- [Controller mock](https://github.com/ugo-plus/lerobot-robot-ugo-pro/blob/main/tools/ugo_controller_mock.py): `tools/ugo_controller_mock.py`

### Other components

- **LeRobot tools**
- **Leader controller**
- **ugo MCU**
- **Configured cameras**

## Connections

- LeRobot tools → Follower robot: uses robot (evidence: `README.md`)
- Robot configuration → Follower robot: configures (evidence: `lerobot_robot_ugo_pro/ugo_pro.py`)
- Leader controller → Bilcon teleoperator: drives
- Bilcon configuration → Bilcon teleoperator: configures (evidence: `lerobot_robot_ugo_pro/teleop/ugo_bilcon.py`)
- Bilcon teleoperator → UDP telemetry client: starts listener (evidence: `lerobot_robot_ugo_pro/teleop/ugo_bilcon.py`)
- Bilcon teleoperator → Telemetry frame: reads actions (evidence: `lerobot_robot_ugo_pro/teleop/ugo_bilcon.py`)
- Follower robot → UDP telemetry client: starts listener (evidence: `README.md`)
- UDP telemetry client → CSV parser: feeds packets (evidence: `lerobot_robot_ugo_pro/transport/udp_client.py`)
- CSV parser → Telemetry frame: creates frames (evidence: `lerobot_robot_ugo_pro/telemetry/parser.py`)
- Telemetry frame → Time helpers: ages packets (evidence: `lerobot_robot_ugo_pro/telemetry/frame.py`)
- Follower robot → Telemetry frame: builds observations (evidence: `lerobot_robot_ugo_pro/ugo_pro.py`)
- Follower robot → Action mapper: maps actions (evidence: `lerobot_robot_ugo_pro/ugo_pro.py`)
- Follower robot → UDP command client: sends targets (evidence: `lerobot_robot_ugo_pro/ugo_pro.py`)
- UDP command client → ugo MCU: sends UDP commands (evidence: `README.md`)
- ugo MCU → UDP telemetry client: sends UDP telemetry (evidence: `README.md`)
- Follower robot → Configured cameras: captures images (evidence: `README.md`)
- Arm monitor → ugo MCU: monitors hardware
- Controller mock → UDP telemetry client: emulates telemetry
