Instructions to use FTG64/act_aloha_transfer_cube with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- LeRobot
How to use FTG64/act_aloha_transfer_cube with LeRobot:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
Model card: study results, checkpoints, simulation eval
Browse files
README.md
CHANGED
|
@@ -8,155 +8,99 @@ tags:
|
|
| 8 |
- robotics
|
| 9 |
- act
|
| 10 |
- lerobot
|
|
|
|
|
|
|
| 11 |
---
|
| 12 |
|
| 13 |
-
#
|
| 14 |
|
| 15 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
|
|
|
|
| 17 |
|
| 18 |
-
|
|
|
|
|
|
|
| 19 |
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
<!-- A short demo is worth more than any description! Record a GIF/video of the policy
|
| 24 |
-
running on your robot, upload it to this repo, and embed it here:
|
| 25 |
-
<p align="center">
|
| 26 |
-
<img src="https://huggingface.co/<hf_user>/<policy_repo_id>/resolve/main/demo.gif" width="60%"/>
|
| 27 |
-
</p>
|
| 28 |
-
-->
|
| 29 |
-
|
| 30 |
-
This policy has been trained and pushed to the Hub using [LeRobot](https://github.com/huggingface/lerobot).
|
| 31 |
-
|
| 32 |
-
Learn how to train and run it in the [LeRobot act guide](https://huggingface.co/docs/lerobot/main/en/act), or browse the [full documentation](https://huggingface.co/docs/lerobot/index).
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
---
|
| 36 |
-
|
| 37 |
-
## Model Details
|
| 38 |
-
|
| 39 |
-
- **License:** apache-2.0
|
| 40 |
-
- **Robot type:** `aloha`
|
| 41 |
-
- **Cameras:** `top`
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
## Inputs & Outputs
|
| 45 |
-
|
| 46 |
-
The policy consumes these observation features and produces these action features.
|
| 47 |
-
|
| 48 |
-
**Inputs**
|
| 49 |
|
| 50 |
| Feature | Type | Shape |
|
| 51 |
| --- | --- | --- |
|
| 52 |
| `observation.images.top` | VISUAL | `(3, 480, 640)` |
|
| 53 |
| `observation.state` | STATE | `(14,)` |
|
|
|
|
| 54 |
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
| Feature | Type | Shape |
|
| 58 |
-
| --- | --- | --- |
|
| 59 |
-
| `action` | ACTION | `(14,)` |
|
| 60 |
-
|
| 61 |
|
| 62 |
-
## Training
|
| 63 |
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
- **Frame rate:** 50 FPS
|
| 68 |
-
- **Task(s):** "Pick up the cube with the right arm and transfer it to the left arm."
|
| 69 |
-
|
| 70 |
-
<a class="flex" href="https://huggingface.co/spaces/lerobot/visualize_dataset?path=lerobot/aloha_sim_transfer_cube_human">
|
| 71 |
-
<img class="block dark:hidden" src="https://huggingface.co/datasets/huggingface/badges/resolve/main/visualize-this-dataset-xl.svg"/>
|
| 72 |
-
<img class="hidden dark:block" src="https://huggingface.co/datasets/huggingface/badges/resolve/main/visualize-this-dataset-xl-dark.svg"/>
|
| 73 |
-
</a>
|
| 74 |
|
|
|
|
| 75 |
|
| 76 |
-
|
| 77 |
|
| 78 |
-
|
|
| 79 |
| --- | --- |
|
| 80 |
-
|
|
| 81 |
-
|
|
| 82 |
-
|
|
| 83 |
-
|
|
| 84 |
-
|
|
| 85 |
-
| LeRobot version | 0.6.2 |
|
| 86 |
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
## How to Get Started with the Model
|
| 90 |
-
|
| 91 |
-
New to LeRobot? These guides cover the full workflow:
|
| 92 |
-
|
| 93 |
-
- **[Install LeRobot](https://huggingface.co/docs/lerobot/main/en/installation)** — set up the `lerobot` package.
|
| 94 |
-
- **[Hardware setup](https://huggingface.co/docs/lerobot/main/en/hardware_guide)** — assemble, wire, and calibrate your robot and cameras.
|
| 95 |
-
- **[Record data & train a policy](https://huggingface.co/docs/lerobot/en/il_robots)** — the end-to-end imitation-learning walkthrough.
|
| 96 |
-
- **[CLI cheat-sheet](https://huggingface.co/docs/lerobot/main/en/cheat-sheet)** — quick reference for the `lerobot-*` commands.
|
| 97 |
-
|
| 98 |
-
The short version to run and train this policy:
|
| 99 |
|
| 100 |
-
|
|
|
|
| 101 |
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
--duration=60
|
| 111 |
-
```
|
| 112 |
|
| 113 |
-
|
|
|
|
| 114 |
|
| 115 |
-
|
| 116 |
|
| 117 |
-
|
| 118 |
|
| 119 |
```bash
|
| 120 |
-
lerobot-
|
| 121 |
-
--
|
| 122 |
-
--policy.type=act \
|
| 123 |
-
--output_dir=outputs/train/<policy_repo_id> \
|
| 124 |
-
--job_name=lerobot_training \
|
| 125 |
-
--policy.device=cuda \
|
| 126 |
-
--policy.repo_id=${HF_USER}/<policy_repo_id> \
|
| 127 |
-
--wandb.enable=true
|
| 128 |
```
|
| 129 |
|
| 130 |
-
|
| 131 |
-
|
| 132 |
-
---
|
| 133 |
-
|
| 134 |
-
## Evaluation
|
| 135 |
-
|
| 136 |
-
<!-- Report real-robot results here: run the policy several times per task and count the
|
| 137 |
-
successes. Delete the "No evaluation results" line and fill in this table instead:
|
| 138 |
-
|
| 139 |
-
| Task | Trials | Successes | Success rate |
|
| 140 |
-
| ---- | ------ | --------- | ------------ |
|
| 141 |
-
| pick the lego brick | 10 | 8 | 80% |
|
| 142 |
-
|
| 143 |
-
Also worth noting: anything that affects difficulty (new object positions, lighting,
|
| 144 |
-
distractors, a different robot of the same type, ...).
|
| 145 |
-
-->
|
| 146 |
-
|
| 147 |
-
_No evaluation results have been provided for this policy yet._
|
| 148 |
-
|
| 149 |
-
---
|
| 150 |
|
| 151 |
## Citation
|
| 152 |
|
| 153 |
-
|
| 154 |
|
| 155 |
```bibtex
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 156 |
@misc{cadene2024lerobot,
|
| 157 |
author = {Cadene, Remi and Alibert, Simon and Soare, Alexander and Gallouedec, Quentin and Zouitine, Adil and Palma, Steven and Kooijmans, Pepijn and Aractingi, Michel and Shukor, Mustafa and Aubakirova, Dana and Russi, Martino and Capuano, Francesco and Pascal, Caroline and Choghari, Jade and Moss, Jess and Wolf, Thomas},
|
| 158 |
title = {LeRobot: State-of-the-art Machine Learning for Real-World Robotics in Pytorch},
|
| 159 |
howpublished = "\url{https://github.com/huggingface/lerobot}",
|
| 160 |
year = {2024}
|
| 161 |
}
|
| 162 |
-
```
|
|
|
|
| 8 |
- robotics
|
| 9 |
- act
|
| 10 |
- lerobot
|
| 11 |
+
- aloha
|
| 12 |
+
- simulation
|
| 13 |
---
|
| 14 |
|
| 15 |
+
# ACT for ALOHA sim transfer cube (retrained)
|
| 16 |
|
| 17 |
+
An [ACT](https://huggingface.co/papers/2304.13705) policy trained with LeRobot's official recipe on
|
| 18 |
+
[lerobot/aloha_sim_transfer_cube_human](https://huggingface.co/datasets/lerobot/aloha_sim_transfer_cube_human).
|
| 19 |
+
It is the retrained model of the study
|
| 20 |
+
[ACT action chunking under delay and disturbance](https://github.com/DiyunZ/act-chunking-study).
|
| 21 |
+
It runs in simulation (gym-aloha) only. It has not been tested on a real robot.
|
| 22 |
|
| 23 |
+
## Files
|
| 24 |
|
| 25 |
+
- The root of `main` holds the final 100k-step policy. It is identical to `checkpoints/100000/pretrained_model`.
|
| 26 |
+
- `checkpoints/<step>/pretrained_model` holds the checkpoints at 25k, 50k, 75k and 100k steps, and
|
| 27 |
+
`checkpoints/<step>/training_state` holds the optimizer state. Each step has a tag (`025000`, `050000`, `075000`, `100000`).
|
| 28 |
|
| 29 |
+
## Inputs and outputs
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
|
| 31 |
| Feature | Type | Shape |
|
| 32 |
| --- | --- | --- |
|
| 33 |
| `observation.images.top` | VISUAL | `(3, 480, 640)` |
|
| 34 |
| `observation.state` | STATE | `(14,)` |
|
| 35 |
+
| `action` (joint position targets) | ACTION | `(14,)` |
|
| 36 |
|
| 37 |
+
ACT predicts 100 actions (2 s at 50 Hz) at a time. By default, all 100 are executed before the next
|
| 38 |
+
prediction (`n_action_steps=100`).
|
|
|
|
|
|
|
|
|
|
|
|
|
| 39 |
|
| 40 |
+
## Training
|
| 41 |
|
| 42 |
+
LeRobot 0.6.2 (commit `e595b79`), 100k steps, batch size 8, AdamW with learning rate 1e-5, seed 1000,
|
| 43 |
+
about 3.3 h on one L4 GPU (Hugging Face Jobs). The exact command is in the study's
|
| 44 |
+
[README](https://github.com/DiyunZ/act-chunking-study#reproduce).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 45 |
|
| 46 |
+
## Evaluation
|
| 47 |
|
| 48 |
+
Success rate with the default full-chunk execution and no delay, on seeds 1000–1199 (95% Wilson intervals):
|
| 49 |
|
| 50 |
+
| Checkpoint | Success |
|
| 51 |
| --- | --- |
|
| 52 |
+
| 25k steps | 53.5% [46.6, 60.3] |
|
| 53 |
+
| 50k steps | 69.0% [62.3, 75.0] |
|
| 54 |
+
| 75k steps | 72.0% [65.4, 77.8] |
|
| 55 |
+
| 100k steps (this model) | 74.5% [68.0, 80.0] |
|
| 56 |
+
| Official `lerobot/act_aloha_sim_transfer_cube_human`, same seeds | 81.5% [75.5, 86.3] |
|
|
|
|
| 57 |
|
| 58 |
+
The difference from the official checkpoint is not significant on these seeds (exact McNemar p = 0.054).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 59 |
|
| 60 |
+
The study evaluates five ways of executing the chunks under observation latency and a mid-episode
|
| 61 |
+
cube displacement. Results for this model, 200 paired seeds per cell:
|
| 62 |
|
| 63 |
+
| Execution | Nominal | 400 ms latency | Cube moved 6 cm |
|
| 64 |
+
| --- | --- | --- | --- |
|
| 65 |
+
| Full chunk (default) | 75.0% | 71.5% | 18.5% |
|
| 66 |
+
| Replan every 50 steps | 80.5% | 74.0% | 26.5% |
|
| 67 |
+
| Replan every 25 steps | 73.5% | 54.0% | 61.5% |
|
| 68 |
+
| Replan every 10 steps | 6.0% | 12.0% | 3.5% |
|
| 69 |
+
| Temporal ensembling, coefficient 0.01 | 74.5% | 77.0% | 21.0% |
|
| 70 |
+
| Temporal ensembling, coefficient −0.05 | 66.5% | 80.0% | 68.0% |
|
|
|
|
|
|
|
| 71 |
|
| 72 |
+
Methods, statistics and failure analysis are in the study's
|
| 73 |
+
[writeup](https://github.com/DiyunZ/act-chunking-study/blob/main/WRITEUP.md).
|
| 74 |
|
| 75 |
+
## Run it in simulation
|
| 76 |
|
| 77 |
+
With LeRobot and its `aloha` extra installed:
|
| 78 |
|
| 79 |
```bash
|
| 80 |
+
lerobot-eval --policy.path=FTG64/act_aloha_transfer_cube --env.type=aloha --env.task=AlohaTransferCube-v0 \
|
| 81 |
+
--eval.n_episodes=50 --eval.batch_size=5 --eval.use_async_envs=false --policy.device=cuda --seed=1000
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 82 |
```
|
| 83 |
|
| 84 |
+
`--eval.use_async_envs=false` works around a LeRobot 0.6.2 bug: asynchronous environment workers
|
| 85 |
+
do not import `gym_aloha`. Add `--policy.n_action_steps=25` to replan every 25 steps, or
|
| 86 |
+
`--policy.n_action_steps=1 --policy.temporal_ensemble_coeff=0.01` for temporal ensembling.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 87 |
|
| 88 |
## Citation
|
| 89 |
|
| 90 |
+
Please cite ACT and LeRobot:
|
| 91 |
|
| 92 |
```bibtex
|
| 93 |
+
@inproceedings{zhao2023learning,
|
| 94 |
+
title = {Learning Fine-Grained Bimanual Manipulation with Low-Cost Hardware},
|
| 95 |
+
author = {Zhao, Tony Z. and Kumar, Vikash and Levine, Sergey and Finn, Chelsea},
|
| 96 |
+
booktitle = {Robotics: Science and Systems},
|
| 97 |
+
year = {2023}
|
| 98 |
+
}
|
| 99 |
+
|
| 100 |
@misc{cadene2024lerobot,
|
| 101 |
author = {Cadene, Remi and Alibert, Simon and Soare, Alexander and Gallouedec, Quentin and Zouitine, Adil and Palma, Steven and Kooijmans, Pepijn and Aractingi, Michel and Shukor, Mustafa and Aubakirova, Dana and Russi, Martino and Capuano, Francesco and Pascal, Caroline and Choghari, Jade and Moss, Jess and Wolf, Thomas},
|
| 102 |
title = {LeRobot: State-of-the-art Machine Learning for Real-World Robotics in Pytorch},
|
| 103 |
howpublished = "\url{https://github.com/huggingface/lerobot}",
|
| 104 |
year = {2024}
|
| 105 |
}
|
| 106 |
+
```
|