Skip to content

Commit

Permalink
add Clean aside
Browse files Browse the repository at this point in the history
  • Loading branch information
geyang committed Sep 29, 2020
1 parent 261868c commit dd314a0
Show file tree
Hide file tree
Showing 20 changed files with 49 additions and 6 deletions.
27 changes: 27 additions & 0 deletions fetch/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ def vec_clean_env(**kwargs):
return env


# the box-fixed envs.
register(id='Clean-i-v0', entry_point=vec_clean_env, kwargs=dict(
initial_qpos={'object1:joint': [1.1, 0.95, .4, 0, 0., 0., 0.]},
obj_reset={'object0': dict(avoid=['gripper', 'box']),
Expand All @@ -60,6 +61,32 @@ def vec_clean_env(**kwargs):
'object1': dict(target="box", range=0), },
), **kw)

# the box-aside env.s
register(id='Clean-aside-i-v0', entry_point=vec_clean_env, kwargs=dict(
initial_qpos={'object1:joint': [1.1, 0.95, .4, 0, 0., 0., 0.],
'box:joint': [1.25, 0.53, 0.6, 0, 0., 0., 0.], },
obj_reset={'object0': dict(avoid=['gripper', 'box']),
'object1': dict(avoid=['gripper', 'box']), },
goal_sampling={'object0': dict(target="box", range=0),
'object1': dict(target="object1", range=0, offset=[0, 0, 0]), },
), **kw)
register(id='Clean-aside-ii-v0', entry_point=vec_clean_env, kwargs=dict(
initial_qpos={'box:joint': [1.25, 0.53, 0.6, 0, 0., 0., 0.], },
obj_reset={'object0': dict(track='box', avoid=['gripper'], range=0),
'object1': dict(avoid=['gripper', 'box']), },
goal_sampling={'object0': dict(target="box", range=0),
'object1': dict(target="box", range=0), },
), **kw)
register(id='Clean-aside-train-v0', entry_point=SampleEnv,
kwargs={'fetch:Clean-i-v0': 0.5, 'fetch:Clean-ii-v0': 0.5, }, **kw)
register(id='Clean-aside-v0', entry_point=vec_clean_env, kwargs=dict(
initial_qpos={'box:joint': [1.25, 0.53, 0.6, 0, 0., 0., 0.], },
obj_reset={'object0': dict(avoid=['gripper', 'box']),
'object1': dict(avoid=['gripper', 'box']), },
goal_sampling={'object0': dict(target="box", range=0),
'object1': dict(target="box", range=0), },
), **kw)

# ------------------ TwinBox Multi-task Environments -------------------
# register(id='TwinBox-v0', entry_point=TwinBoxEnv, kwargs=dict(), **kw)
# register(id='TwinBox-place-red-v0', entry_point=TwinBoxEnv, kwargs=dict(action="place-red", ), **kw)
Expand Down
22 changes: 17 additions & 5 deletions specs/tasksets/clean.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,27 @@ twin_box_envs = [
'fetch:Clean-i-v0',
'fetch:Clean-ii-v0',
'fetch:Clean-train-v0',
'fetch:Clean-v0'
'fetch:Clean-v0',
'fetch:Clean-aside-i-v0',
'fetch:Clean-aside-ii-v0',
'fetch:Clean-aside-train-v0',
'fetch:Clean-aside-v0',
]
```
| **Clean-i-v0** | **distribution** | |
|:--------------:|:----------------:|:-:|
| ![figures/Clean-i-v0_init.png?ts=294528](figures/Clean-i-v0_init.png?ts=294528) | ![figures/Clean-i-v0_reset.png?ts=417121](figures/Clean-i-v0_reset.png?ts=417121) | ![figures/Clean-i-v0.gif?ts=179419](figures/Clean-i-v0.gif?ts=179419) |
| ![figures/Clean-i-v0_init.png?ts=893891](figures/Clean-i-v0_init.png?ts=893891) | ![figures/Clean-i-v0_reset.png?ts=020709](figures/Clean-i-v0_reset.png?ts=020709) | ![figures/Clean-i-v0.gif?ts=933636](figures/Clean-i-v0.gif?ts=933636) |
| **Clean-ii-v0** | **distribution** | |
| ![figures/Clean-ii-v0_init.png?ts=864703](figures/Clean-ii-v0_init.png?ts=864703) | ![figures/Clean-ii-v0_reset.png?ts=917603](figures/Clean-ii-v0_reset.png?ts=917603) | ![figures/Clean-ii-v0.gif?ts=726306](figures/Clean-ii-v0.gif?ts=726306) |
| ![figures/Clean-ii-v0_init.png?ts=583763](figures/Clean-ii-v0_init.png?ts=583763) | ![figures/Clean-ii-v0_reset.png?ts=661571](figures/Clean-ii-v0_reset.png?ts=661571) | ![figures/Clean-ii-v0.gif?ts=472119](figures/Clean-ii-v0.gif?ts=472119) |
| **Clean-train-v0** | **distribution** | |
| ![figures/Clean-train-v0_init.png?ts=629332](figures/Clean-train-v0_init.png?ts=629332) | ![figures/Clean-train-v0_reset.png?ts=794904](figures/Clean-train-v0_reset.png?ts=794904) | ![figures/Clean-train-v0.gif?ts=845322](figures/Clean-train-v0.gif?ts=845322) |
| ![figures/Clean-train-v0_init.png?ts=215769](figures/Clean-train-v0_init.png?ts=215769) | ![figures/Clean-train-v0_reset.png?ts=394996](figures/Clean-train-v0_reset.png?ts=394996) | ![figures/Clean-train-v0.gif?ts=426037](figures/Clean-train-v0.gif?ts=426037) |
| **Clean-v0** | **distribution** | |
| ![figures/Clean-v0_init.png?ts=499010](figures/Clean-v0_init.png?ts=499010) | ![figures/Clean-v0_reset.png?ts=603128](figures/Clean-v0_reset.png?ts=603128) | ![figures/Clean-v0.gif?ts=464708](figures/Clean-v0.gif?ts=464708) |
| ![figures/Clean-v0_init.png?ts=114485](figures/Clean-v0_init.png?ts=114485) | ![figures/Clean-v0_reset.png?ts=169328](figures/Clean-v0_reset.png?ts=169328) | ![figures/Clean-v0.gif?ts=051694](figures/Clean-v0.gif?ts=051694) |
| **Clean-aside-i-v0** | **distribution** | |
| ![figures/Clean-aside-i-v0_init.png?ts=782709](figures/Clean-aside-i-v0_init.png?ts=782709) | ![figures/Clean-aside-i-v0_reset.png?ts=881644](figures/Clean-aside-i-v0_reset.png?ts=881644) | ![figures/Clean-aside-i-v0.gif?ts=674909](figures/Clean-aside-i-v0.gif?ts=674909) |
| **Clean-aside-ii-v0** | **distribution** | |
| ![figures/Clean-aside-ii-v0_init.png?ts=421882](figures/Clean-aside-ii-v0_init.png?ts=421882) | ![figures/Clean-aside-ii-v0_reset.png?ts=523422](figures/Clean-aside-ii-v0_reset.png?ts=523422) | ![figures/Clean-aside-ii-v0.gif?ts=303254](figures/Clean-aside-ii-v0.gif?ts=303254) |
| **Clean-aside-train-v0** | **distribution** | |
| ![figures/Clean-aside-train-v0_init.png?ts=385627](figures/Clean-aside-train-v0_init.png?ts=385627) | ![figures/Clean-aside-train-v0_reset.png?ts=563027](figures/Clean-aside-train-v0_reset.png?ts=563027) | ![figures/Clean-aside-train-v0.gif?ts=678045](figures/Clean-aside-train-v0.gif?ts=678045) |
| **Clean-aside-v0** | **distribution** | |
| ![figures/Clean-aside-v0_init.png?ts=449968](figures/Clean-aside-v0_init.png?ts=449968) | ![figures/Clean-aside-v0_reset.png?ts=541597](figures/Clean-aside-v0_reset.png?ts=541597) | ![figures/Clean-aside-v0.gif?ts=397963](figures/Clean-aside-v0.gif?ts=397963) |
6 changes: 5 additions & 1 deletion specs/tasksets/clean.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@
'fetch:Clean-i-v0',
'fetch:Clean-ii-v0',
'fetch:Clean-train-v0',
'fetch:Clean-v0'
'fetch:Clean-v0',
'fetch:Clean-aside-i-v0',
'fetch:Clean-aside-ii-v0',
'fetch:Clean-aside-train-v0',
'fetch:Clean-aside-v0',
]

table = doc.table()
Expand Down
Binary file added specs/tasksets/figures/Clean-aside-i-v0.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added specs/tasksets/figures/Clean-aside-i-v0_init.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added specs/tasksets/figures/Clean-aside-i-v0_reset.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added specs/tasksets/figures/Clean-aside-ii-v0.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added specs/tasksets/figures/Clean-aside-ii-v0_init.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added specs/tasksets/figures/Clean-aside-train-v0.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added specs/tasksets/figures/Clean-aside-v0.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added specs/tasksets/figures/Clean-aside-v0_init.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added specs/tasksets/figures/Clean-aside-v0_reset.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified specs/tasksets/figures/Clean-i-v0.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified specs/tasksets/figures/Clean-ii-v0.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified specs/tasksets/figures/Clean-train-v0.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified specs/tasksets/figures/Clean-train-v0_reset.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified specs/tasksets/figures/Clean-v0.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit dd314a0

Please sign in to comment.