You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
6. Take off the headset and hang it around your neck — you will operate with the controllers while the headset rests there.
43
+
<BlockImagesrc="tutorial/data-collection/how_to_wear_headset.png"alt="Headset around neck"width="90%" />
44
+
45
+
## Data collection in MuJoCo environment
46
+
47
+
Even if you don't have the physical robot, you can still go through the data collection process using the MuJoCo environment.
48
+
This will allow you to understand the data collection process and the data format before collecting the data on the real robot.
49
+
Also, this section is useful for testing your VR teleoperation setup and to make sure that everything is working properly before collecting the data on the real robot.
50
+
51
+
### Setup for MuJoCo environment
52
+
53
+
```bash
54
+
cd path/to/openarm_vr_teleop
55
+
uv sync
56
+
source .venv/bin/activate
57
+
dora build config/dataflow-mujoco.yaml --uv
58
+
```
59
+
60
+
### Teleoperation in MuJoCo environment
61
+
62
+
```bash
63
+
dora run config/dataflow-mujoco.yaml --uv
64
+
```
65
+
66
+
If VR teleoperation is working properly, you should see the robot arm moving in the MuJoCo environment when you operate the VR controllers.
67
+
68
+
Also, data collection web UI will open automatically, and you can check the data collection status at `http://localhost:8000`.
When the web UI looks like the image above, you can start the data collection by pressing the A button on the right VR controller. This will start recording the data.
After finishing the data collection, you can check the collected data in the specified directory. The data will be stored in the OpenArmDataset format.
113
+
114
+
If you don't have the real robot, skip the next section and move to the dataset format conversion section to convert the collected data to the LeRobot dataset format for training the policy.
115
+
116
+
## Data collection on the real robot
117
+
118
+
First, make sure that the CAN interface is up and running and the cameras are set up properly, VR teleoperation is working. Then, run the following command to start the data collection.
119
+
120
+
### Start data collection
121
+
122
+
```bash
123
+
uv run dora build config/dataflow.yaml --uv
124
+
uv run dora run config/dataflow.yaml --uv
125
+
```
126
+
127
+
Same as the MuJoCo data collection, you can specify the output directory by modifying `config/dataflow.yaml`.
128
+
129
+
If the command runs successfully, the arm will move to the initial position. You need to align your VR controllers to the arm first by holding the trigger button.
130
+
131
+
Once the alignment completes, you can fully control the arm with the VR controllers.
132
+
133
+
{/*
134
+
add photo of the real robot data collection.
135
+
*/}
136
+
137
+
## Dataset format conversion to LeRobot dataset format
138
+
139
+
After collecting the dataset, we need to convert the dataset to the LeRobot dataset format for training the policy.
uv run openarm-dataset-convert path/to/collected_dataset_path path/to/output_path --format lerobot_v2.1
146
+
```
147
+
148
+
LeRobot Dataset v2.1 format file structure:
149
+
150
+
```
151
+
output_path/
152
+
├── data/
153
+
│ ├── chunk-000/
154
+
│ │ ├── episode_000000.parquet
155
+
│ │ ├── episode_000001.parquet
156
+
│ │ └── ...
157
+
├── meta/
158
+
│ ├── info.json
159
+
│ ├── episodes.jsonl
160
+
│ ├── episodes_stats.jsonl
161
+
│ ├── tasks.jsonl
162
+
│ ├── stats.jsonl
163
+
├── videos/
164
+
│ ├── chunk-000/
165
+
│ │ ├── observation.images.wrist_right/
166
+
│ │ ├── observation.images.wrist_left/
167
+
│ │ ├── observation.images.ceiling/
168
+
│ │ ├── observation.images.head_left/
169
+
│ │ ├── observation.images.head_right/
170
+
│ │ | ├── episode_000000.mp4
171
+
│ │ | ├── episode_000001.mp4
172
+
│ │ | └── ...
173
+
```
174
+
175
+
We are planning to support the conversion to LeRobot Dataset v3.0 format in the future, but for now, we only support the conversion to LeRobot Dataset v2.1 format.
176
+
If you want to convert to the LeRobot Dataset v3.0 format please check the article below:
177
+
[LeRobot Dataset v3.0 format conversion](https://huggingface.co/docs/lerobot/porting_datasets_v3#migrating-from-dataset-v21)
0 commit comments