Skip to content

Commit e7d35fb

Browse files
Dora integration (#35)
Signed-off-by: Franco Cipollone <franco.c@ekumenlabs.com>
1 parent 5d3d3af commit e7d35fb

File tree

28 files changed

+1420
-140
lines changed

28 files changed

+1420
-140
lines changed

README.md

Lines changed: 242 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -1,111 +1,286 @@
1-
# lekiwi
1+
# LeKiwi
22

3-
## :globe_with_meridians: Description
3+
[![CI](https://github.com/ekumenlabs/rnd_lekiwi/workflows/ci/badge.svg)](https://github.com/ekumenlabs/rnd_lekiwi/actions)
4+
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
45

5-
Monorepo for Lekiwi robot software and tooling. This workspace combines Rust and Python packages to provide:
6-
- Simulation for LeKiwi robot.
7-
- LeRobot scripts to be used in both simulated and real robot.
8-
- Dora integration (TODO)
9-
- Robotic stack (TODO)
6+
## :globe_with_meridians: Overview
107

11-
## Prerequisites
8+
Comprehensive monorepo for LeKiwi robot software development, combining simulation, control, and machine learning capabilities. This workspace integrates Rust and Python packages to provide a complete robotics development environment supporting both physical and simulated LeKiwi robots.
129

13-
- For real robot:
14-
- [LeKiwi](https://github.com/SIGRobotics-UIUC/LeKiwi) robot
15-
- For simulation:
16-
- Docker (See [#code-development](#code-development))
10+
### Key Features
1711

18-
## Platforms
12+
- **🔄 Simulation Environment**: High-fidelity MuJoCo-based simulation
13+
- **🤖 Real Robot Integration**: Direct control of physical LeKiwi robots
14+
- **🧠 ML Pipeline**: LeRobot integration for learning and inference
15+
- **📡 Dora Integration**: Distributed computing with Dora framework
16+
- **🔧 Development Tools**: Comprehensive tooling for teleoperation and data collection
1917

20-
- OS:
21-
- Ubuntu 22.04 Jammy Jellyfish
18+
## :package: Project Structure
2219

23-
## :package: Project structure
20+
```
21+
lekiwi-dora/
22+
├── 📁 packages/ # Python packages
23+
│ ├── 🎮 lekiwi_sim/ # MuJoCo simulation environment
24+
│ ├── 🤖 lekiwi_lerobot/ # LeRobot integration scripts
25+
│ └── 🕹️ lekiwi_teleoperate/ # Teleoperation interface
26+
├── 📁 dora/ # Dora Integration
27+
│ └── 📁 graphs/ # Dora dataflows
28+
│ └── 📁 node_hub/ # Dora nodes
29+
│ ├── 🔗 dora_lekiwi_client/ # Robot interface node
30+
│ ├── 🧠 dora_run_policy/ # Policy execution node
31+
│ └── 📡 dora_lekiwi_action_publisher/ # Action publisher
32+
├── 📁 crates/ # Rust packages
33+
└── 📁 .devcontainer/ # Development environment
34+
```
35+
36+
## :rocket: Quick Start
37+
38+
### Prerequisites
2439

25-
TODO
40+
**For Real Robot:**
41+
- [LeKiwi robot hardware](https://github.com/SIGRobotics-UIUC/LeKiwi)
42+
- Ubuntu 22.04 LTS
2643

27-
## :pick: Workspace setup
44+
**For Simulation:**
45+
- Docker with GPU support
46+
- Ubuntu 22.04 LTS (or via devcontainer)
2847

29-
Refer to [.devcontainer/README.md](.devcontainer/README.md)
48+
### Development Setup
3049

31-
## :gear: Build
50+
1. **Clone the repository:**
51+
```bash
52+
git clone https://github.com/ekumenlabs/rnd_lekiwi.git
53+
cd lekiwi-dora
54+
```
3255

33-
### Build systems
56+
2. **Use devcontainer (Recommended):**
57+
See [Development Environment Setup](.devcontainer/README.md)
3458

35-
This repository combines both `rust` and `python` packages. `cargo` and `uv` are the tools of choice.
59+
```bash
60+
# Open in VS Code and select "Reopen in Container"
61+
# OR use devcontainer CLI
62+
devcontainer up --workspace-folder .
63+
```
3664

37-
#### Rust packages
65+
3. **Manual setup:**
66+
```bash
67+
# Create Python virtual environment
68+
uv venv -p 3.11 --seed
69+
source .venv/bin/activate
3870

39-
- Building `rust` packages:
40-
```
41-
cargo build
42-
```
71+
# Install packages in development mode
72+
uv pip install -e .
4373

44-
#### Python packages
45-
- Setup a `venv` within `andino-rs` folder.
46-
```
47-
uv venv -p 3.11 --seed
48-
```
74+
# Build Rust packages
75+
cargo build
76+
```
4977

50-
- Building `python` packages:
51-
```
52-
uv build --all-packages
53-
```
78+
### Running the Simulation
79+
80+
**Terminal 1 - Start simulation:**
81+
```bash
82+
uv run lekiwi_host_sim
83+
```
5484

55-
## Real Robot
85+
**Terminal 2 - Teleoperate:**
86+
```bash
87+
uv run lekiwi_teleoperate
88+
```
5689

57-
Refer to https://huggingface.co/docs/lerobot/en/lekiwi for information about using LeKiwi robot
90+
## :gear: Build System
5891

92+
This monorepo uses multiple build systems:
5993

60-
## Simulation
94+
### Python Packages (UV)
95+
```bash
96+
# Install all packages in development mode
97+
uv pip install -e .
6198

62-
[lekiwi-sim](packages/lekiwi_sim/) package provides a MuJoCo simulation.
63-
It works as replacement of the `lerobot`'s lekiwi host server that is used with the real robot, allowing the user to continue using `lerobot` API with the simulated environment
99+
# Build distribution packages
100+
uv build --all-packages
64101

65-
<img src="docs/media/lekiwi_sim.png">
102+
# Run specific package command
103+
uv run lekiwi_sim_standalone
104+
```
66105

67-
### Quick Start
106+
### Rust Packages (Cargo)
107+
```bash
108+
# Build all Rust crates
109+
cargo build
68110

111+
# Run tests
112+
cargo test
69113
```
70-
uv pip install -e .
114+
115+
## 🎮 Simulation
116+
117+
The `lekiwi_sim` package provides a high-fidelity MuJoCo simulation environment that serves as a drop-in replacement for the real robot's host server. The implementation replicates LeRobot's `lekiwi_host` server interface, allowing seamless switching between simulation and real hardware without code changes. This means all LeRobot tools and scripts (teleoperation, recording, policy execution) work identically with both the simulated and physical robot.
118+
119+
<img src="docs/media/lekiwi_sim.png" alt="LeKiwi Simulation" width="600">
120+
121+
**Key Features:**
122+
- Physics-accurate omniwheel modeling
123+
- Real-time robot visualization
124+
- Camera feed simulation
125+
- Compatible with LeRobot API
126+
127+
**Two Modes Available:**
128+
129+
1. **Standalone Viewer** (`standalone_mujoco_sim`):
130+
- Direct MuJoCo visualization only
131+
- Interactive joint control via GUI
132+
- Useful for model debugging and physics parameter tuning
133+
- No server/client architecture required
134+
135+
```bash
136+
uv run standalone_mujoco_sim
137+
```
138+
139+
2. **Server Mode** (`lekiwi_host_sim`):
140+
- Replicates LeRobot's `lekiwi_host` server
141+
- Enables interaction via `LeKiwiClient` API
142+
- Compatible with teleoperation, recording, and policy execution
143+
- Works exactly like the real robot from the client perspective
144+
145+
```bash
146+
uv run lekiwi_host_sim
147+
```
148+
149+
See [packages/lekiwi_sim/README.md](packages/lekiwi_sim/README.md) for detailed documentation.
150+
151+
## 🤖 LeRobot Integration
152+
153+
Integration with [LeRobot](https://huggingface.co/docs/lerobot/en/lekiwi) provides machine learning capabilities for the LeKiwi robot, including teleoperation, data collection, and policy training.
154+
155+
**Features:**
156+
- **🕹️ Teleoperation**: Manual robot control via keyboard for demonstrations
157+
- **📹 Data Collection**: Record teleoperation episodes for training
158+
- **🧠 Policy Training**: Train ACT and other imitation learning policies
159+
- **🚀 Policy Deployment**: Run trained models on robot/simulation
160+
161+
### Teleoperation
162+
163+
Manual control interface using the LeRobot API:
164+
165+
```bash
166+
# Start simulation or real robot first
167+
uv run lekiwi_host_sim # For simulation
168+
169+
# Then teleoperate
170+
uv run lekiwi_teleoperate
71171
```
72-
On terminal #1:
172+
173+
### Data Collection & Training
174+
175+
```bash
176+
# Record teleoperation demonstrations
177+
uv run lekiwi_lerobot_record --repo-id your_username/dataset_name --episodes 50
178+
179+
# Replay recorded episodes to verify
180+
uv run lekiwi_lerobot_replay --repo-id your_username/dataset_name --episode 0
181+
182+
# Train a policy (see lekiwi_lerobot README for full training options)
183+
python -m lerobot.scripts.train \
184+
--dataset.repo_id=your_username/dataset_name \
185+
--policy.type=act \
186+
--output_dir=outputs/my_policy
73187
```
188+
189+
See [packages/lekiwi_lerobot/README.md](packages/lekiwi_lerobot/README.md) for detailed documentation.
190+
191+
## 📡 Dora Integration
192+
193+
[Dora](https://dora-rs.ai/) enables distributed computing and dataflow orchestration for robotics applications, providing a powerful framework for building modular, distributed robot control systems.
194+
195+
### Dora Nodes
196+
197+
- **dora_lekiwi_client**: Interfaces with robot hardware/simulation, publishes observations and executes actions
198+
- **dora_run_policy**: Executes trained ML policies (ACT, Diffusion, etc.) for action prediction
199+
- **dora_lekiwi_action_publisher**: Publishes hardcoded robot actions for testing and debugging
200+
201+
### Available Dataflows
202+
203+
The repository includes pre-configured dataflow graphs in `dora/lekiwi_sim/graphs/`:
204+
205+
**1. Policy Execution Dataflow** (`mujoco_sim.yml`):
206+
- Complete pipeline for running trained policies on simulation
207+
- Connects robot observations → policy inference → robot actions
208+
- Includes camera feeds and state observations
209+
- Configurable policy model via environment variables
210+
211+
### Running Dora Dataflows
212+
213+
**Prerequisites:**
214+
```bash
215+
# Start simulation in separate terminal
74216
uv run lekiwi_host_sim
75217
```
76-
On terminal #2:
218+
219+
**Run the policy execution dataflow:**
220+
```bash
221+
# Navigate to dataflow directory
222+
cd dora/lekiwi_sim/graphs/
223+
224+
# Start the dataflow
225+
dora run mujoco_sim.yml --uv
226+
77227
```
78-
uv run lekiwi_teleoperate
228+
229+
**Optional features** (uncomment in `mujoco_sim.yml`):
230+
- **Visualization**: Enable `rerun-viz` node for real-time 3D visualization
231+
- **Data Recording**: Enable `dora-record` node to save observations to Parquet files
232+
- **Testing Mode**: Use `dora_lekiwi_action_publisher` instead of policy for hardcoded actions
233+
234+
See [Dora documentation](https://dora-rs.ai/docs) for more details on dataflow configuration.
235+
236+
## :test_tube: Testing
237+
238+
```bash
239+
# Run Python tests
240+
uv run pytest
241+
242+
# Run Rust tests
243+
cargo test
244+
245+
# Run pre-commit checks
246+
pre-commit run --all-files
79247
```
80-
Use the second terminal to teleoperate the robot.
81248

82-
Refer to [lekiwi-sim](packages/lekiwi_sim/README.md) for further information
249+
## :raised_hands: Contributing
83250

84-
## *`lerobot`* Integration
251+
We welcome contributions! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
85252

86-
Naturally we rely on [lerobot](https://huggingface.co/docs/lerobot/en/lekiwi) machinery for controlling the Lekiwi robot as it contains all the functionalities to control and to integrate it with other ML workflows.
87-
The [`lekiwi_lerobot`](packages/lekiwi_lerobot/README.md) package contains some scripts and tooling for using lerobot API with real and simulated robot.
253+
### Development Workflow
88254

89-
## *`dora`* Integration
255+
1. Fork the repository
256+
2. Create a feature branch
257+
3. Make your changes
258+
4. Run tests and linting
259+
5. Submit a pull request
90260

91-
What is dora? See https://dora-rs.ai/
261+
### Code Quality
92262

93-
TODO
263+
This repository uses:
264+
- **pre-commit hooks** for automated code quality checks
265+
- **GitHub Actions CI** for continuous integration
266+
- **ruff** for Python linting and formatting
267+
- **cargo clippy** for Rust linting
94268

269+
## :books: Documentation
95270

96-
### Appendix
271+
- [Development Environment Setup](.devcontainer/README.md)
272+
- [Simulation Package](packages/lekiwi_sim/README.md)
273+
- [LeRobot Integration](packages/lekiwi_lerobot/README.md)
274+
- [Teleoperation](packages/lekiwi_teleoperate/README.md)
275+
- [LeKiwi Hardware Documentation](https://github.com/SIGRobotics-UIUC/LeKiwi)
276+
- [LeRobot Official Docs](https://huggingface.co/docs/lerobot/en/lekiwi)
97277

98-
## :raised_hands: Contributing
278+
## :scroll: License
99279

100-
Issues or PRs are always welcome! Please refer to [CONTRIBUTING](CONTRIBUTING.md) doc.
280+
This project is licensed under the Apache License 2.0. See [LICENSE](LICENSE) for details.
101281

102-
## Code development
282+
## :busts_in_silhouette: Acknowledgments
103283

104-
- Workspace setup: Refer to [.devcontainer/README.md](.devcontainer/README.md)
105-
- This repository uses `pre-commit`.
106-
- To add it to git's hook, use:
107-
```
108-
pip install pre-commit
109-
pre-commit install
110-
```
111-
- Every time a commit is attempted, pre-commit will run. The checks can be by-passed by adding `--no-verify` to *git commit*, but take into account pre-commit also runs as a required Github Actions check, so you will need it to pass.
284+
- [SIGRobotics-UIUC](https://github.com/SIGRobotics-UIUC) for the original LeKiwi robot design
285+
- [LeRobot team](https://github.com/huggingface/lerobot) for the robotics learning framework
286+
- [Dora team](https://dora-rs.ai/) for the distributed computing framework

0 commit comments

Comments
 (0)