- Ubuntu 20.04 LTS
- ROS Noetic
详细使用文档 Y1数据采集使用说明
Choose one of the following two methods
conda create -n imeta_data_collection python=3.8.10
conda activate imeta_data_collection
pip install numpy
pip install rospkg
pip install opencv-python
pip install omegaconf
pip install pynput
pip install dm_env
pip install h5py
pip install matplotlib
conda env create -f conda_environment.yaml
conda activate imeta_data_collection| KeyBoard | Description |
|---|---|
| S(s) | Start collect current episode |
| E(e) | End and save current episode |
| R(r) | Restart collect current episode |
| Q(q) | exit |
source the ros env first, because we use rosmsg in data collection. if you use python sdk:
cd y1_sdk_python/y1_ros
source devel/setup.bashif you use c++ sdk:
cd y1_sdk
source devel/setup.bashif you have only one master arm:
python -m scripts.record_data config_file=cfg/one_master.yaml
if you have two master arms:
python -m scripts.record_data config_file=cfg/two_master.yaml
if you have one master and one slave arm:
python -m scripts.record_data config_file=cfg/one_master_slave.yaml
if you have two master and two slave arm:
python -m scripts.record_data config_file=cfg/two_master_slave.yaml
以two_master_slave.yaml配置为例解释:
| param | value | Description |
|---|---|---|
| task_description | "pick and place" | Language prompts for tasks |
| num_episodes | 100 | Number of episodes to collect |
| save_rate | 30 | Save data rate, Unit: hz |
| param | value | Description |
|---|---|---|
| save_as_h5 | True | save data as hdf5 format |
| dataset_dir | "data/" | save data directory |
| task_name | "two_arm_teleop" | save directory name |
| param | value | Description |
|---|---|---|
| save_as_lerobot | True | save data as LeRobotDataset v2.1 format |
| repo_id | "y1/two_arm_teleop" | repository id |
| robot_type | "y1" | robot type |
| param | value | Description |
|---|---|---|
| collection_type | "two_master_slave" | collection type |
| master_arm_right_topic | "/master_arm_right/joint_states" | right master arm joint state feedback |
| puppet_arm_right_topic | "/puppet_arm_right/joint_states" | right puppet arm joint state feedback |
| master_arm_left_topic | "/master_arm_left/joint_states" | left master arm joint state feedback |
| puppet_arm_left_topic | "/puppet_arm_left/joint_states" | left puppet arm joint state feedback |
| param | value | Description |
|---|---|---|
| camera_names | ["cam_right_wrist", "cam_front", "came_left_wrist"] | Names of cameras at different location |
| img_right_topic | "/camera_right/color/image_raw" | right wrist camera rgb image topic |
| img_left_topic | "/camera_left/color/image_raw" | left wrist camera rgb image topic |
| img_front_topic | "/camera_front/color/image_raw" | front camera rgb image topic |
if you want use LeRobotDataset V2.1, install lerobot first:
git clone https://github.com/imeta-lab/imeta_lerobot.git
cd imeta_lerobot/lerobot
pip install -e .save_as_lerobot: Truepython -m scripts.record_data config_file=cfg/your_example.yamlpython -m scripts.convert_h5_to_lerobot --config.raw-dir=data/pick_and_place/ --config.repo-id=y1/pick_and_placepython -m scripts.visualize_h5_episode --dataset_dir data/pick_and_place/ --episode_idx 0Refer to the script of lerobot:
'lerobot.scripts.visualize_dataset.py`
Show only the file structure (no data):
sudo apt install hdf5-tools
h5dump -H example.h5