Robotics
LeRobot
Safetensors
Piper
act
imitation-learning
RoboticsCollectiveAachen commited on
Commit
ec025c0
·
verified ·
1 Parent(s): 3899c0a

Model card for final 100k checkpoint

Browse files
Files changed (1) hide show
  1. README.md +127 -108
README.md CHANGED
@@ -1,162 +1,181 @@
1
  ---
2
- datasets: Samisaliveagain/piper-hexagonal-bolt-insertion-80-demos-zero-home-v1
3
  library_name: lerobot
4
- model_name: act
5
  pipeline_tag: robotics
6
  tags:
7
- - robotics
8
- - act
9
- - lerobot
 
 
 
 
10
  ---
11
 
12
- # Model Card for act
13
 
14
- <!-- Provide a quick summary of what the model is/does. -->
15
-
16
-
17
- [Action Chunking with Transformers (ACT)](https://huggingface.co/papers/2304.13705) is an imitation-learning method that predicts short action chunks instead of single steps. It learns from teleoperated data and often achieves high success rates.
18
-
19
-
20
-
21
-
22
- <!-- A short demo is worth more than any description! Record a GIF/video of the policy
23
- running on your robot, upload it to this repo, and embed it here:
24
- <p align="center">
25
- <img src="https://huggingface.co/<hf_user>/<policy_repo_id>/resolve/main/demo.gif" width="60%"/>
26
- </p>
27
- -->
28
-
29
- This policy has been trained and pushed to the Hub using [LeRobot](https://github.com/huggingface/lerobot).
30
-
31
- 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).
32
 
 
33
 
34
  ---
35
 
36
  ## Model Details
37
 
38
- - **License:** \[More Information Needed]
39
- - **Robot type:** `piper_follower`
40
- - **Cameras:** `overhead`, `angled`
 
 
 
41
 
 
42
 
43
- ## Inputs & Outputs
44
-
45
- The policy consumes these observation features and produces these action features.
 
 
 
 
 
46
 
47
- **Inputs**
48
 
49
- | Feature | Type | Shape |
50
  | --- | --- | --- |
51
- | `observation.state` | STATE | `(7,)` |
52
- | `observation.images.overhead` | VISUAL | `(3, 480, 640)` |
53
- | `observation.images.angled` | VISUAL | `(3, 480, 640)` |
 
54
 
55
- **Outputs**
56
-
57
- | Feature | Type | Shape |
58
- | --- | --- | --- |
59
- | `action` | ACTION | `(7,)` |
60
 
 
61
 
62
- ## Training Dataset
63
 
64
- - **Repository:** [Samisaliveagain/piper-hexagonal-bolt-insertion-80-demos-zero-home-v1](https://huggingface.co/datasets/Samisaliveagain/piper-hexagonal-bolt-insertion-80-demos-zero-home-v1)
65
- - **Episodes:** 80
66
- - **Frames:** 50921
67
- - **Frame rate:** 30 FPS
68
- - **Task(s):** "Pick up the hexagonal bolt and place it in the matching opening"
69
 
70
  <a class="flex" href="https://huggingface.co/spaces/lerobot/visualize_dataset?path=Samisaliveagain/piper-hexagonal-bolt-insertion-80-demos-zero-home-v1">
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
- ## Training Configuration
77
 
78
  | Setting | Value |
79
  | --- | --- |
80
- | Training steps | 100000 |
81
- | Batch size | 16 |
82
- | Optimizer | adamw |
83
- | Learning rate | 2e-05 |
 
 
84
  | Seed | 1000 |
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
- ### Run the policy on your robot
101
-
102
- ```bash
103
- lerobot-rollout \
104
- --strategy.type=base \
105
- --robot.type=piper_follower \
106
- --robot.port=<your_robot_port> \
107
- --robot.cameras="{ <camera_1>: {type: opencv, index_or_path: <index_or_path>, width: 640, height: 480, fps: 30}, <camera_2>: {type: opencv, index_or_path: <index_or_path>, width: 640, height: 480, fps: 30}}" \
108
- --policy.path=RoboticsCollectiveAachen/act_piper_hexagonal_bolt_insertion_zero_home \
109
- --task="Pick up the hexagonal bolt and place it in the matching opening" \
110
- --duration=60
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
111
  ```
112
 
113
- Replace the remaining `<...>` placeholders with your own values: `--robot.port` and the camera names/indices are specific to your machine, and the camera names must match the observation keys this policy was trained on.
114
-
115
- When `--strategy.type=base` is used the script doesn't record the episodes. Skipping duration will make the policy run indefinitely. For more information look at [rollout documentation](https://huggingface.co/docs/lerobot/main/en/inference).
116
 
117
- ### Train your own policy
118
-
119
- ```bash
120
- lerobot-train \
121
- --dataset.repo_id=${HF_USER}/<dataset> \
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
- _Writes checkpoints to `outputs/train/<policy_repo_id>/checkpoints/`._
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
- If you use this policy, please cite the method linked in the description above, along with LeRobot:
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
- ```
 
1
  ---
2
+ license: apache-2.0
3
  library_name: lerobot
 
4
  pipeline_tag: robotics
5
  tags:
6
+ - robotics
7
+ - lerobot
8
+ - act
9
+ - piper
10
+ - imitation-learning
11
+ datasets:
12
+ - Samisaliveagain/piper-hexagonal-bolt-insertion-80-demos-zero-home-v1
13
  ---
14
 
15
+ # ACT: Piper Hexagonal Bolt Insertion (zero-home, 80 demos)
16
 
17
+ An ACT policy for an AgileX Piper arm that picks up a hexagonal bolt and places it in the matching opening, using two RGB cameras and joint positions. It is trained on 80 demonstrations that all start from the zero home pose. The `main` branch holds the final 100k-step checkpoint. The 80k-step checkpoint is kept on the `step-80000` branch (`revision="step-80000"`).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
18
 
19
+ > **Status:** final 100k-step checkpoint, not yet evaluated on the robot. It has seen each training frame about 94 times. Compare it on the robot with the 80k checkpoint on the `step-80000` branch before relying on it.
20
 
21
  ---
22
 
23
  ## Model Details
24
 
25
+ - **Method:** [ACT (Action Chunking with Transformers)](https://huggingface.co/papers/2304.13705), trained from scratch with [LeRobot](https://github.com/huggingface/lerobot)
26
+ - **Robot:** AgileX Piper, single arm (`piper_follower`), joint-space control
27
+ - **Task:** "Pick up the hexagonal bolt and place it in the matching opening."
28
+ - **Control rate:** 30 Hz
29
+ - **Developed by:** RoboticsCollectiveAachen
30
+ - **License:** Apache 2.0
31
 
32
+ ### Architecture
33
 
34
+ | Setting | Value |
35
+ | --- | --- |
36
+ | Vision backbone | ResNet-18, initialized from ImageNet (`IMAGENET1K_V1`) |
37
+ | Transformer | 4 encoder layers, 1 decoder layer, `dim_model` 512, 8 heads, FFN 3200 |
38
+ | CVAE | enabled, latent dim 32, 4 encoder layers, KL weight 10 |
39
+ | Chunk size / actions executed per chunk | 100 / 100 |
40
+ | Dropout | 0.1 |
41
+ | Parameters | 51.6 M |
42
 
43
+ ## Inputs & Outputs
44
 
45
+ | Feature | Shape | Description |
46
  | --- | --- | --- |
47
+ | `observation.images.overhead` | 3 × 480 × 640 | Overhead RGB camera |
48
+ | `observation.images.angled` | 3 × 480 × 640 | Angled RGB camera |
49
+ | `observation.state` | 7 | Measured positions: joints 1–6 (degrees), then gripper opening (mm) |
50
+ | `action` (output) | 7 | **Absolute** follower targets in the same order and units as the state |
51
 
52
+ The policy predicts a chunk of 100 future actions (3.3 s at 30 FPS) per inference call.
53
+ All inputs and outputs are normalized with mean/std statistics from the training dataset;
54
+ the bundled pre/post-processors apply this automatically.
 
 
55
 
56
+ ## Training Data
57
 
58
+ [Samisaliveagain/piper-hexagonal-bolt-insertion-80-demos-zero-home-v1](https://huggingface.co/datasets/Samisaliveagain/piper-hexagonal-bolt-insertion-80-demos-zero-home-v1)
59
 
60
+ - **Episodes:** 80 teleoperated demonstrations (Piper follower driven by a 6-joint leader with a gripper trigger)
61
+ - **Frames:** 50,921 at 30 FPS (≈ 28 min). Episodes are 14–34 s long (mean 21 s)
62
+ - **Recording limits:** firmware speed 40 %, max target offset 4 °/mm, joint 4 locked at 0 °
63
+ - **Start pose:** every episode starts within 1 °/mm of all-zero joints with the gripper closed
 
64
 
65
  <a class="flex" href="https://huggingface.co/spaces/lerobot/visualize_dataset?path=Samisaliveagain/piper-hexagonal-bolt-insertion-80-demos-zero-home-v1">
66
  <img class="block dark:hidden" src="https://huggingface.co/datasets/huggingface/badges/resolve/main/visualize-this-dataset-xl.svg"/>
67
  <img class="hidden dark:block" src="https://huggingface.co/datasets/huggingface/badges/resolve/main/visualize-this-dataset-xl-dark.svg"/>
68
  </a>
69
 
70
+ ## Training Procedure
 
71
 
72
  | Setting | Value |
73
  | --- | --- |
74
+ | Hardware | 3 × NVIDIA TITAN Xp (12 GB), DDP |
75
+ | Batch size | 16 per GPU (48 effective) |
76
+ | Optimizer | AdamW, lr 2e-5 (backbone 2e-5), weight decay 1e-4, constant schedule |
77
+ | Gradient clipping | 10.0 |
78
+ | Precision | fp32 |
79
+ | Steps (this checkpoint) | 100,000 (≈ 4.8 M samples, ≈ 94 epochs) |
80
  | Seed | 1000 |
 
81
 
82
+ **Image augmentation** (applied on the GPU, up to 3 per frame, randomly chosen): brightness
83
+ 0.8–1.2, contrast 0.8–1.2, saturation 0.5–1.5, hue ±0.05, sharpness 0.5–1.5, and a random
84
+ affine transform (±5° rotation, ±5 % translation).
85
+
86
+ **Training loss** (action L1 in normalized units; the KL term falls to ≈0 within the first
87
+ 10k steps, which is typical for ACT):
88
+
89
+ | Step | 5k | 10k | 20k | 30k | 40k | 50k | 60k | 70k | 80k | 90k | 100k |
90
+ | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
91
+ | L1 loss | 0.103 | 0.074 | 0.055 | 0.046 | 0.038 | 0.035 | 0.032 | 0.030 | 0.028 | 0.026 | 0.025 |
92
+
93
+ These are training-set losses. The dataset has no held-out split, so they do not measure
94
+ overfitting or task success.
95
+
96
+ ## How to Use
97
+
98
+ LeRobot has no built-in Piper robot driver, so `lerobot-rollout` cannot drive this
99
+ arm directly. Load the policy inside your own 30 Hz control loop:
100
+
101
+ ```python
102
+ import torch
103
+ from lerobot.policies import make_pre_post_processors
104
+ from lerobot.policies.act import ACTPolicy
105
+
106
+ repo = "RoboticsCollectiveAachen/act_piper_hexagonal_bolt_insertion_zero_home"
107
+ policy = ACTPolicy.from_pretrained(repo).to("cuda").eval()
108
+ preprocessor, postprocessor = make_pre_post_processors(
109
+ policy.config, pretrained_path=repo
110
+ )
111
+
112
+ policy.reset() # at the start of every episode
113
+ while running: # 30 Hz
114
+ obs = {
115
+ "observation.state": state, # torch.float32, shape (7,): joints 1-6 [deg], gripper [mm]
116
+ "observation.images.overhead": img_ovh, # torch.float32, shape (3, 480, 640), RGB in [0, 1]
117
+ "observation.images.angled": img_ang, # same format
118
+ "task": "Pick up the hexagonal bolt and place it in the matching opening.",
119
+ }
120
+ with torch.inference_mode():
121
+ action = postprocessor(policy.select_action(preprocessor(obs)))
122
+ send_absolute_joint_targets(action.squeeze(0)) # 7 values, same order/units as the state
123
  ```
124
 
125
+ **Deployment notes**
 
 
126
 
127
+ - **Start every rollout from the zero home pose**: all joint targets at 0 ° and the gripper closed. Every training episode begins there, so other start poses are out of distribution.
128
+ - Apply the same safety limits used during recording: firmware speed 40 % and a maximum
129
+ target offset of 4 °/mm from the measured position. The training actions are the targets
130
+ *after* this limiting, so the policy has never seen large jumps.
131
+ - Joint 4 was locked to a 0 ° target in the training data. Keep it locked, or force its target to 0.
132
+ - Camera placement, resolution (640 × 480), and the `overhead`/`angled` key names must match
133
+ the recording setup.
134
+ - By default the policy executes each 100-step chunk open-loop. For smoother, more reactive
135
+ motion near the insertion, enable temporal ensembling:
136
+ `policy.config.temporal_ensemble_coeff = 0.01` and `policy.config.n_action_steps = 1`
137
+ (one inference per control step; costs more GPU time).
 
 
 
 
 
138
 
139
  ## Evaluation
140
 
141
+ _No real-robot evaluation has been run on this checkpoint yet._
 
142
 
143
+ <!-- Fill in after testing on the robot:
 
 
144
 
145
+ | Setup | Trials | Successes | Success rate |
146
+ | --- | --- | --- | --- |
147
+ | Training configuration | 10 | ? | ?% |
148
  -->
149
 
150
+ ## Limitations
151
 
152
+ - Trained on a single robot, cell, camera setup, and object. Expect degraded behavior under
153
+ different lighting, camera poses, bolt or fixture positions outside the demonstrated range,
154
+ or a different Piper unit.
155
+ - The training demonstrations carry no success labels and were not exhaustively reviewed,
156
+ so the policy imitates whatever the operator did, including imperfect attempts.
157
+ - Single-task policy. The task string is not used by ACT, so the policy cannot be steered with language.
158
+ - Run it with a hand on the emergency stop. Nothing in the model enforces joint limits,
159
+ collision avoidance, or force limits.
160
+ - 94 epochs over 80 demonstrations is a lot of training. The policy may reproduce the demonstrated
161
+ trajectories closely but generalize less to new bolt or fixture placements than an earlier checkpoint would.
162
 
163
  ## Citation
164
 
 
 
165
  ```bibtex
166
+ @inproceedings{zhao2023learning,
167
+ title = {Learning Fine-Grained Bimanual Manipulation with Low-Cost Hardware},
168
+ author = {Zhao, Tony Z. and Kumar, Vikash and Levine, Sergey and Finn, Chelsea},
169
+ booktitle = {Robotics: Science and Systems (RSS)},
170
+ year = {2023},
171
+ eprint = {2304.13705},
172
+ archivePrefix = {arXiv}
173
+ }
174
+
175
  @misc{cadene2024lerobot,
176
  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},
177
  title = {LeRobot: State-of-the-art Machine Learning for Real-World Robotics in Pytorch},
178
  howpublished = "\url{https://github.com/huggingface/lerobot}",
179
  year = {2024}
180
  }
181
+ ```