Closed kliu14146 closed 11 months ago
This is caused by the fact that demo file is not found, since there is a typo in your command (traj, json, output should be under ManiSkill2
, not in ManiSkill2-Learn
).
The command should be python3 tools/convert_state.py --env-name PickCube-v0 --traj-name ../ManiSkill2/demos/v0/rigid_body/PickCube-v0/trajectory.none.pd_ee_delta_pose.h5 --json-name ../ManiSkill2/demos/v0/rigid_body/PickCube-v0/trajectory.none.pd_ee_delta_pose.json --output-name ../ManiSkill2/demos/v0/rigid_body/PickCube-v0/trajectory.none.pd_ee_delta_pose_rgbd.h5 --control-mode pd_ee_delta_pose --max-num-traj -1 --obs-mode rgbd --reward-mode dense
I moved the demos folder into ManiSkill2 (same directory level as ManiSkill2-Learn). I then ran your updated command, but I get the same error. It looks like the file is loaded, but the "obs" key is an empty list (hence the index out of range error). Does the entire chain of commands (convert control, then convert observation) need to be run in ManiSkill2?
I've fixed it in the latest ManiSkill2-Learn commit.
Hi all,
I'm trying to convert demonstrations for PickCube-v0 rgbd, with pd_ee_delta_pose controller. I followed the commands in
scripts/example_demo_conversion/pick_place_single_object_envs.sh
. The first command used to convert the controller space runs fine. The second command:python3 tools/convert_state.py --env-name PickCube-v0 --traj-name ../ManiSkill2-Learn/demos/v0/rigid_body/PickCube-v0/trajectory.none.pd_ee_delta_pose.h5 --json-name ../ManiSkill2-Learn/demos/v0/rigid_body/PickCube-v0/trajectory.none.pd_ee_delta_pose.json --output-name ../ManiSkill2-Learn/demos/v0/rigid_body/PickCube-v0/trajectory.none.pd_ee_delta_pose_rgbd.h5 --control-mode pd_ee_delta_pose --max-num-traj -1 --obs-mode rgbd --reward-mode dense
returns the following error:If I print out the file and the file keys in _load_hdf5, it looks like the following files are being opened and the obs key object is an empty list (hence the error):
The first command does seem to run to completion, and it would make sense that the obs key has no members given that the saved state is "none"? I am saving the demos inside
ManiSkill2-Learn/demos
, and I am running this on a g4dn.xlarge ec2 instance. The h5py module is version 3.9.0, and I am using python 3.9. Please let me know if I am missing something simple - thank you!