Datasets:
File size: 5,211 Bytes
1b8ae96 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 | ---
license: mit
task_categories:
- robotics
tags:
- lerobot
- so101
- act
- reinforcement-learning
- exploration
- outcome-labeled
- manipulation
size_categories:
- n<1K
---
# so101_pick_diverse_objects_rl_round1
## Dataset Description
This dataset contains **exploration rollout episodes with outcome labels** collected on the SO-101 robot arm pair using [`rl_rollout_act.py`](https://github.com/TakuyaHiraoka/LeRobot-Playground).
The collection procedure is as follows:
1. An ACT policy (trained on HIL-corrected data; see [so101_pick_diverse_objects_hil_round1](https://huggingface.co/datasets/TakuyaHiraoka/so101_pick_diverse_objects_hil_round1)) drives the follower arm autonomously.
2. Gaussian noise is injected into the ACT **latent space** (`z`) at each step to encourage exploration beyond the nominal policy distribution.
3. At the end of each episode, the human operator labels the outcome as **success** or **failure**.
4. Every saved episode includes `next.reward` and `next.done` columns: `0 / 0` for all frames, with the final frame of a success episode set to `reward = 1, done = 1`.
This format makes the dataset directly compatible with **REINFORCE-style policy updates** (filtering to success episodes only, via `train_act_filtered.py`) and **binary reward classifier training** (via `train_reward_classifier.py`).
## Task
**Pick diverse objects** — the robot arm picks up a variety of objects placed on a tabletop. Multiple task prompts are supported (e.g., *"Pick the red cube."*, *"Pick a pen."*); the task string is assigned at the start of each episode.
## Key Differences from the HIL Dataset
| Property | [hil_round1](https://huggingface.co/datasets/TakuyaHiraoka/so101_pick_diverse_objects_hil_round1) | **rl_round1** (this dataset) |
|---|---|---|
| Data source | Human intervention corrections | Autonomous rollouts with noise |
| Human role | Takes over during failures | Labels outcome at episode end |
| Exploration mechanism | Human guidance | Gaussian latent-space noise (`--noise_std`) |
| Reward signal | Not included | `next.reward`, `next.done` per frame |
| Primary use | Policy fine-tuning (BC) | REINFORCE update / reward classifier |
## Related Resources
| Resource | Link |
|---|---|
| **Seed HIL dataset (Round 1)** | [TakuyaHiraoka/so101_pick_diverse_objects_hil_round1](https://huggingface.co/datasets/TakuyaHiraoka/so101_pick_diverse_objects_hil_round1) |
| **Policy trained on HIL data** | [TakuyaHiraoka/act_so101_pick_diverse_objects](https://huggingface.co/TakuyaHiraoka/act_so101_pick_diverse_objects) |
| **Full pipeline & scripts** | [TakuyaHiraoka/LeRobot-Playground](https://github.com/TakuyaHiraoka/LeRobot-Playground) |
## Hardware
- **Robot:** SO-101 leader–follower arm pair
- **Camera:** USB or IP/MJPEG stream (640 px wide)
- **Framework:** [LeRobot](https://github.com/huggingface/lerobot) `== 0.4.4`
## Data Collection Procedure
The dataset was collected using `rl_rollout_act.py` from [LeRobot-Playground](https://github.com/TakuyaHiraoka/LeRobot-Playground).
Key keyboard controls during recording:
| Key | Action |
|---|---|
| `s` | Save current episode as **success** |
| `f` | Save current episode as **failure** |
| `r` | Discard and re-record |
| `q` | End the session |
On timeout, the terminal always prompts for an outcome label — every saved episode is guaranteed to have a `success` or `failure` annotation.
Example launch command:
```bash
python rl_rollout_act.py \
--follower_port /dev/ttyACM1 --follower_id <follower-id> \
--leader_port /dev/ttyACM0 --leader_id <leader-id> \
--camera_url "http://<camera-host>:8080" \
--policy_path <path-to-pretrained-act> \
--repo_id TakuyaHiraoka/so101_pick_diverse_objects_rl_round1 \
--tasks "Pick a pen." \
--num_episodes 20 --episode_time_s 20 --reset_time_s 5 --fps 30 \
--noise_std 0.05 --resume
```
## Downstream Usage
### REINFORCE-style ACT re-training (success filtering)
```bash
python train_act_filtered.py \
--dataset_repo_id TakuyaHiraoka/so101_pick_diverse_objects_rl_round1 \
--base_policy <path-to-act-v1> \
--output_dir outputs/train/act_v2 \
-- \
--steps 30000 --batch_size 64 --policy.optimizer_lr 1e-5
```
`train_act_filtered.py` scans for episodes where `max(next.reward) > threshold` and passes only those to `lerobot-train`. For binary reward with no advantage, this is equivalent to a REINFORCE update:
```
∇θ J = E_τ [ ∇θ log π(τ) · R(τ) ]
```
### Binary reward classifier training
```bash
python train_reward_classifier.py \
--dataset_repo_id TakuyaHiraoka/so101_pick_diverse_objects_rl_round1 \
--output_dir outputs/reward_clf/round1 \
--epochs 20 --batch_size 64
```
Trains a ResNet-18 head to predict `P(success | s)` per frame. Validation is held out at the episode level to prevent data leakage.
## Intended Use
This dataset is intended for:
- **REINFORCE / filtered BC** — re-train the ACT policy on success episodes only.
- **Learned value / reward functions** — train a binary success classifier as an approximate value function.
## License
[MIT](https://opensource.org/licenses/MIT)
|