rstrudel / rlbc

[ICRA2020] Learning policies for robotic manipulation
MIT License
51 stars 11 forks source link

the problem about the "Collect a dataset with expert trajectories" #3

Closed lk-greenbird closed 3 years ago

lk-greenbird commented 3 years ago

Hello, I have run this project. But, there are some questions that I don't understabd. I know the command "python3 -m bc.collect_demos with $RLBC_ROOT/configs/rlbc/section5/1.pick_collect_demos.json" is used to collect the data with 1.pick_collect_demos.json. But where are the expert trajectories? Are they produced by the program in gym?

rstrudel commented 3 years ago

Hi,

The experts trajectories are located in RLBC_DATA=$RLBC_ROOT/data. The Collector object creates gym environments and then collect expert trajectories in the form of (observation, action) pairs that are stored in a dataset.

Hope this answers your question.

lk-greenbird commented 3 years ago

Hi, Thank you for answering my last question. I have understand how the data is collceted. But I have encountered another problem. I have excuted the pick task and bowl task successfully by the provided commands.

As far as I'm concerned, the pick is treated as one skill, while the bowl task is Composed of four basic skills, including 0: 'down_grasp_up', 1: 'goto_bowl', 2: 'goto_cube', 3: 'goto_ball'. And these basic skills are defined in the mime/envs/table_envs/bowl_scene.py. When you evaluate the skills policy, the order of skills is [3, 0, 1, 2] in 3.bowl_evaluate_skills.json.

Then I find there are also _pourenv.py, _pourscene.py, _towerenv.py and _towerscene.py in mime/envs/table_envs. So I guess that I can slao collect pour demos and train a pour policy using a json script. According to 1.bowl_collect_demos.json, I have wrote a pour_collect_demos.json, in which I changed the folder name to "pour_demos" and the env name to "UR5-Pour5RandCamEnv-v0".

I don't know weather the env name has some limitations in json scripts, In pick task, the env name is "UR5-Pick5RandCamEnv-v0" and the env name is "UR5-Bowl5RandCamEnv-v0" in bowl task. So I defined the env name as "UR5-Pour5RandCamEnv-v0" in pour_collect_demos.json.

Then I excuted the command _"python3 -m bc.collect_demos with $RLBC_ROOT/configs/rlbc/pour/1.pour_collectdemos.json". When it run about 50 epochs, a FileNotFoundError occured, which said_:"No such file or directory:"/labels.json'"_. In the mime/settings.py, I find it should have the path to the directory where shapenet is stored. What is the shapenet referred to? Where can I find it?

I want to excute the pour task and tower task as the pick task excuted. How can I do this?

rstrudel commented 3 years ago

Ok I see, it seems that the UR5-PourEnv-v0 from mime-release still relies on the ShapeNet dataset that we have internally, it does not point towards the published assets. You can change the bottle and bowl loader so that they point respectively to the files mime/assets/dinnerware/cup/cup.urdf and mime/assets/dinnerware/bowl.urdf which are available in the repository. To do so you can check how it is done in the Bowl environment.

lk-greenbird commented 3 years ago

OK,Thank you