haosulab / ManiSkill2-Learn

Apache License 2.0
77 stars 15 forks source link

Disk space requirements of each pointcloud/rgbd dataset for each task #9

Closed Zed-Wu closed 1 year ago

Zed-Wu commented 1 year ago

I downloaded the demonstrations of PickSingleYCB-v0, merged all h5 files into "trajectory_merged.h5" using mani_skill2.merge_trajectory, and then generated the point cloud data using mani_skill2.replay_trajectory. The command is the following:

python -m mani_skill2.trajectory.replay_trajectory --traj-path demos/rigid_body/PickSingleYCB-v0/trajectory_merged.h5 \
--save-traj --obs-mode pointcloud --target-control-mode pd_ee_delta_pose --num-procs 10

The generated data is more than 400G, and my disk is not enough. Is the command correct? And if it is correct, could you list the disk space requirements of each pointcloud/rgbd dataset for all tasks (including other tasks like PickSingleEGAD-v0, PickClutterYCB-v0)? Then I can prepare the disk properly.

The second problem is that when I have enough space to store all the data and merge all data into one h5 file (more than 400G), can I load this big h5 file into memory at one time?

And can we use only a part of the objects (e.g., 20 objects from YCB or EGAD) for online training and evaluation?

xuanlinli17 commented 1 year ago

Per documentation here, please avoid using mani_skill2.trajectory.replay_trajectory --obs-mode pointcloud/rgbd to convert trajectories into visual observations (only use this script to convert between control modes). This is because visual observations are not processed by the ManiSkill2 repo, and they will take up lots of space. They can't be fed into ManiSkill2-Learn either for agent training.

Instead, follow the scripts in https://github.com/haosulab/ManiSkill2-Learn/blob/main/scripts/example_demo_conversion/pick_place_multi_object_envs.sh to convert demonstrations into point clouds (for these particular PickSingleEGAD / YCB environments; other environments need other scripts under the directory). The script calls ManiSkill2-Learn/tools/convert_state.py and ManiSkill2-Learn will downsample and post process the point clouds.

Note:

https://github.com/haosulab/ManiSkill2-Learn/tree/main/scripts contains both scripts that convert demonstrations into rgbd/pointcloud and scripts for agent training.

Zed-Wu commented 1 year ago

Thank you very much, now it worked