Skip to content

Commit 80c272e

Browse files
committed
Merge branch 'main' into user/pepijn/2025_01_27_steps_assembly_intructions
2 parents ffb8a5f + f994feb commit 80c272e

8 files changed

+47
-47
lines changed

.pre-commit-config.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ repos:
2929
- id: end-of-file-fixer
3030
- id: trailing-whitespace
3131
- repo: https://github.com/crate-ci/typos
32-
rev: v1.30.0
32+
rev: v1
3333
hooks:
3434
- id: typos
3535
args: [--force-exclude]
@@ -38,7 +38,7 @@ repos:
3838
hooks:
3939
- id: pyupgrade
4040
- repo: https://github.com/astral-sh/ruff-pre-commit
41-
rev: v0.9.9
41+
rev: v0.9.10
4242
hooks:
4343
- id: ruff
4444
args: [--fix]

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -232,8 +232,8 @@ python lerobot/scripts/eval.py \
232232
--env.type=pusht \
233233
--eval.batch_size=10 \
234234
--eval.n_episodes=10 \
235-
--use_amp=false \
236-
--device=cuda
235+
--policy.use_amp=false \
236+
--policy.device=cuda
237237
```
238238

239239
Note: After training your own policy, you can re-evaluate the checkpoints with:

examples/10_use_so100.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -454,8 +454,8 @@ Next, you'll need to calibrate your SO-100 robot to ensure that the leader and f
454454
455455
You will need to move the follower arm to these positions sequentially:
456456

457-
| 1. Zero position | 2. Rotated position | 3. Rest position |
458-
|---|---|---|
457+
| 1. Zero position | 2. Rotated position | 3. Rest position |
458+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
459459
| <img src="../media/so100/follower_zero.webp?raw=true" alt="SO-100 follower arm zero position" title="SO-100 follower arm zero position" style="width:100%;"> | <img src="../media/so100/follower_rotated.webp?raw=true" alt="SO-100 follower arm rotated position" title="SO-100 follower arm rotated position" style="width:100%;"> | <img src="../media/so100/follower_rest.webp?raw=true" alt="SO-100 follower arm rest position" title="SO-100 follower arm rest position" style="width:100%;"> |
460460

461461
Make sure both arms are connected and run this script to launch manual calibration:
@@ -470,8 +470,8 @@ python lerobot/scripts/control_robot.py \
470470
#### b. Manual calibration of leader arm
471471
Follow step 6 of the [assembly video](https://youtu.be/FioA2oeFZ5I?t=724) which illustrates the manual calibration. You will need to move the leader arm to these positions sequentially:
472472

473-
| 1. Zero position | 2. Rotated position | 3. Rest position |
474-
|---|---|---|
473+
| 1. Zero position | 2. Rotated position | 3. Rest position |
474+
| ------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
475475
| <img src="../media/so100/leader_zero.webp?raw=true" alt="SO-100 leader arm zero position" title="SO-100 leader arm zero position" style="width:100%;"> | <img src="../media/so100/leader_rotated.webp?raw=true" alt="SO-100 leader arm rotated position" title="SO-100 leader arm rotated position" style="width:100%;"> | <img src="../media/so100/leader_rest.webp?raw=true" alt="SO-100 leader arm rest position" title="SO-100 leader arm rest position" style="width:100%;"> |
476476

477477
Run this script to launch manual calibration:
@@ -571,14 +571,14 @@ python lerobot/scripts/train.py \
571571
--policy.type=act \
572572
--output_dir=outputs/train/act_so100_test \
573573
--job_name=act_so100_test \
574-
--device=cuda \
574+
--policy.device=cuda \
575575
--wandb.enable=true
576576
```
577577

578578
Let's explain it:
579579
1. We provided the dataset as argument with `--dataset.repo_id=${HF_USER}/so100_test`.
580580
2. We provided the policy with `policy.type=act`. This loads configurations from [`configuration_act.py`](../lerobot/common/policies/act/configuration_act.py). Importantly, this policy will automatically adapt to the number of motor sates, motor actions and cameras of your robot (e.g. `laptop` and `phone`) which have been saved in your dataset.
581-
4. We provided `device=cuda` since we are training on a Nvidia GPU, but you could use `device=mps` to train on Apple silicon.
581+
4. We provided `policy.device=cuda` since we are training on a Nvidia GPU, but you could use `policy.device=mps` to train on Apple silicon.
582582
5. We provided `wandb.enable=true` to use [Weights and Biases](https://docs.wandb.ai/quickstart) for visualizing training plots. This is optional but if you use it, make sure you are logged in by running `wandb login`.
583583

584584
Training should take several hours. You will find checkpoints in `outputs/train/act_so100_test/checkpoints`.

examples/11_use_lekiwi.md

+22-22
Original file line numberDiff line numberDiff line change
@@ -366,8 +366,8 @@ Now we have to calibrate the leader arm and the follower arm. The wheel motors d
366366
367367
You will need to move the follower arm to these positions sequentially:
368368

369-
| 1. Zero position | 2. Rotated position | 3. Rest position |
370-
|---|---|---|
369+
| 1. Zero position | 2. Rotated position | 3. Rest position |
370+
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
371371
| <img src="../media/lekiwi/mobile_calib_zero.webp?raw=true" alt="SO-100 follower arm zero position" title="SO-100 follower arm zero position" style="width:100%;"> | <img src="../media/lekiwi/mobile_calib_rotated.webp?raw=true" alt="SO-100 follower arm rotated position" title="SO-100 follower arm rotated position" style="width:100%;"> | <img src="../media/lekiwi/mobile_calib_rest.webp?raw=true" alt="SO-100 follower arm rest position" title="SO-100 follower arm rest position" style="width:100%;"> |
372372

373373
Make sure the arm is connected to the Raspberry Pi and run this script (on the Raspberry Pi) to launch manual calibration:
@@ -385,8 +385,8 @@ If you have the **wired** LeKiwi version please run all commands including this
385385
### Calibrate leader arm
386386
Then to calibrate the leader arm (which is attached to the laptop/pc). You will need to move the leader arm to these positions sequentially:
387387

388-
| 1. Zero position | 2. Rotated position | 3. Rest position |
389-
|---|---|---|
388+
| 1. Zero position | 2. Rotated position | 3. Rest position |
389+
| ------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
390390
| <img src="../media/so100/leader_zero.webp?raw=true" alt="SO-100 leader arm zero position" title="SO-100 leader arm zero position" style="width:100%;"> | <img src="../media/so100/leader_rotated.webp?raw=true" alt="SO-100 leader arm rotated position" title="SO-100 leader arm rotated position" style="width:100%;"> | <img src="../media/so100/leader_rest.webp?raw=true" alt="SO-100 leader arm rest position" title="SO-100 leader arm rest position" style="width:100%;"> |
391391

392392
Run this script (on your laptop/pc) to launch manual calibration:
@@ -416,22 +416,22 @@ python lerobot/scripts/control_robot.py \
416416

417417
You should see on your laptop something like this: ```[INFO] Connected to remote robot at tcp://172.17.133.91:5555 and video stream at tcp://172.17.133.91:5556.``` Now you can move the leader arm and use the keyboard (w,a,s,d) to drive forward, left, backwards, right. And use (z,x) to turn left or turn right. You can use (r,f) to increase and decrease the speed of the mobile robot. There are three speed modes, see the table below:
418418
| Speed Mode | Linear Speed (m/s) | Rotation Speed (deg/s) |
419-
|------------|-------------------|-----------------------|
420-
| Fast | 0.4 | 90 |
421-
| Medium | 0.25 | 60 |
422-
| Slow | 0.1 | 30 |
423-
424-
425-
| Key | Action |
426-
|------|--------------------------------|
427-
| W | Move forward |
428-
| A | Move left |
429-
| S | Move backward |
430-
| D | Move right |
431-
| Z | Turn left |
432-
| X | Turn right |
433-
| R | Increase speed |
434-
| F | Decrease speed |
419+
| ---------- | ------------------ | ---------------------- |
420+
| Fast | 0.4 | 90 |
421+
| Medium | 0.25 | 60 |
422+
| Slow | 0.1 | 30 |
423+
424+
425+
| Key | Action |
426+
| --- | -------------- |
427+
| W | Move forward |
428+
| A | Move left |
429+
| S | Move backward |
430+
| D | Move right |
431+
| Z | Turn left |
432+
| X | Turn right |
433+
| R | Increase speed |
434+
| F | Decrease speed |
435435

436436
> [!TIP]
437437
> If you use a different keyboard you can change the keys for each command in the [`LeKiwiRobotConfig`](../lerobot/common/robot_devices/robots/configs.py).
@@ -549,14 +549,14 @@ python lerobot/scripts/train.py \
549549
--policy.type=act \
550550
--output_dir=outputs/train/act_lekiwi_test \
551551
--job_name=act_lekiwi_test \
552-
--device=cuda \
552+
--policy.device=cuda \
553553
--wandb.enable=true
554554
```
555555

556556
Let's explain it:
557557
1. We provided the dataset as argument with `--dataset.repo_id=${HF_USER}/lekiwi_test`.
558558
2. We provided the policy with `policy.type=act`. This loads configurations from [`configuration_act.py`](../lerobot/common/policies/act/configuration_act.py). Importantly, this policy will automatically adapt to the number of motor sates, motor actions and cameras of your robot (e.g. `laptop` and `phone`) which have been saved in your dataset.
559-
4. We provided `device=cuda` since we are training on a Nvidia GPU, but you could use `device=mps` to train on Apple silicon.
559+
4. We provided `policy.device=cuda` since we are training on a Nvidia GPU, but you could use `policy.device=mps` to train on Apple silicon.
560560
5. We provided `wandb.enable=true` to use [Weights and Biases](https://docs.wandb.ai/quickstart) for visualizing training plots. This is optional but if you use it, make sure you are logged in by running `wandb login`.
561561

562562
Training should take several hours. You will find checkpoints in `outputs/train/act_lekiwi_test/checkpoints`.

examples/11_use_moss.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,8 @@ Next, you'll need to calibrate your Moss v1 robot to ensure that the leader and
176176

177177
You will need to move the follower arm to these positions sequentially:
178178

179-
| 1. Zero position | 2. Rotated position | 3. Rest position |
180-
|---|---|---|
179+
| 1. Zero position | 2. Rotated position | 3. Rest position |
180+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
181181
| <img src="../media/moss/follower_zero.webp?raw=true" alt="Moss v1 follower arm zero position" title="Moss v1 follower arm zero position" style="width:100%;"> | <img src="../media/moss/follower_rotated.webp?raw=true" alt="Moss v1 follower arm rotated position" title="Moss v1 follower arm rotated position" style="width:100%;"> | <img src="../media/moss/follower_rest.webp?raw=true" alt="Moss v1 follower arm rest position" title="Moss v1 follower arm rest position" style="width:100%;"> |
182182

183183
Make sure both arms are connected and run this script to launch manual calibration:
@@ -192,8 +192,8 @@ python lerobot/scripts/control_robot.py \
192192
**Manual calibration of leader arm**
193193
Follow step 6 of the [assembly video](https://www.youtube.com/watch?v=DA91NJOtMic) which illustrates the manual calibration. You will need to move the leader arm to these positions sequentially:
194194

195-
| 1. Zero position | 2. Rotated position | 3. Rest position |
196-
|---|---|---|
195+
| 1. Zero position | 2. Rotated position | 3. Rest position |
196+
| ------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
197197
| <img src="../media/moss/leader_zero.webp?raw=true" alt="Moss v1 leader arm zero position" title="Moss v1 leader arm zero position" style="width:100%;"> | <img src="../media/moss/leader_rotated.webp?raw=true" alt="Moss v1 leader arm rotated position" title="Moss v1 leader arm rotated position" style="width:100%;"> | <img src="../media/moss/leader_rest.webp?raw=true" alt="Moss v1 leader arm rest position" title="Moss v1 leader arm rest position" style="width:100%;"> |
198198

199199
Run this script to launch manual calibration:
@@ -293,14 +293,14 @@ python lerobot/scripts/train.py \
293293
--policy.type=act \
294294
--output_dir=outputs/train/act_moss_test \
295295
--job_name=act_moss_test \
296-
--device=cuda \
296+
--policy.device=cuda \
297297
--wandb.enable=true
298298
```
299299

300300
Let's explain it:
301301
1. We provided the dataset as argument with `--dataset.repo_id=${HF_USER}/moss_test`.
302302
2. We provided the policy with `policy.type=act`. This loads configurations from [`configuration_act.py`](../lerobot/common/policies/act/configuration_act.py). Importantly, this policy will automatically adapt to the number of motor sates, motor actions and cameras of your robot (e.g. `laptop` and `phone`) which have been saved in your dataset.
303-
4. We provided `device=cuda` since we are training on a Nvidia GPU, but you could use `device=mps` to train on Apple silicon.
303+
4. We provided `policy.device=cuda` since we are training on a Nvidia GPU, but you could use `policy.device=mps` to train on Apple silicon.
304304
5. We provided `wandb.enable=true` to use [Weights and Biases](https://docs.wandb.ai/quickstart) for visualizing training plots. This is optional but if you use it, make sure you are logged in by running `wandb login`.
305305

306306
Training should take several hours. You will find checkpoints in `outputs/train/act_moss_test/checkpoints`.

examples/4_train_policy_with_script.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
This tutorial will explain the training script, how to use it, and particularly how to configure everything needed for the training run.
2-
> **Note:** The following assume you're running these commands on a machine equipped with a cuda GPU. If you don't have one (or if you're using a Mac), you can add `--device=cpu` (`--device=mps` respectively). However, be advised that the code executes much slower on cpu.
2+
> **Note:** The following assume you're running these commands on a machine equipped with a cuda GPU. If you don't have one (or if you're using a Mac), you can add `--policy.device=cpu` (`--policy.device=mps` respectively). However, be advised that the code executes much slower on cpu.
33
44

55
## The training script

0 commit comments

Comments
 (0)