-
Notifications
You must be signed in to change notification settings - Fork 141
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
merge code for new assets, floors etc.
- Loading branch information
1 parent
8f4f6b1
commit 771c27f
Showing
30 changed files
with
535 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# Temporary Docs on environments with pre-built scenes | ||
|
||
The code at the moment supports scenes created by [AI2-THOR](https://ai2thor.allenai.org/) stored in this Hugging Face Dataset: https://huggingface.co/datasets/hssd/ai2thor-hab/tree/main | ||
|
||
Other scenes from other groups/projects are supportable provided you write an `SceneAdapter` class to load that type of configuration. See `mani_skill2/envs/scenes/adapters/hssd` for one such example. | ||
|
||
To download ai2thor-hab scene dataset, in the root level run | ||
|
||
```bash | ||
# note that this is a very big dataset (~20GB) with 50,000+ files so it can take some time to download. | ||
python mani_skill2/envs/scenes/adapters/hssd/download.py <your_hugging_face_access_token> | ||
``` | ||
|
||
which downloads all the AI2-THOR scenes to `data/scene_datasets/ai2thor` | ||
|
||
A dummy environment that uses just the ArchitecTHOR set of scenes (high quality human built scenes from AI2) can be created via standard gym as so | ||
|
||
```python | ||
import mani_skill2.envs | ||
import gymnasium as gym | ||
# PickObjectScene-v0 selects a scene randomly from the selected scene datasets and | ||
# instantiates a robot randomly and selects a random object for the robot to find and pick up. | ||
# render_mode="human" opens up a viewer, convex_decomposition="none" makes scene loading fast (but not well simulated) | ||
# set convex_decomposition="coacd" to use CoACD to get better collision meshes | ||
import sapien.render | ||
env = gym.make("PickObjectScene-v0", scene_datasets=["ArchitecTHOR"], render_mode="human", convex_decomposition="none", fixed_scene=True) | ||
|
||
# optionally set these to make it more realistic | ||
sapien.render.set_camera_shader_dir("rt") | ||
sapien.render.set_viewer_shader_dir("rt") | ||
sapien.render.set_ray_tracing_samples_per_pixel(4) | ||
sapien.render.set_ray_tracing_path_depth(2) | ||
sapien.render.set_ray_tracing_denoiser("optix") | ||
|
||
env.reset(seed=2, options=dict(reconfigure=True)) | ||
|
||
while True: | ||
env.render() | ||
``` | ||
|
||
Note that we set `fixed_scene=True` which is the default option. This means all calls to env.reset(seed=seed) or just env.reset() will always use the same scene. To change scene simply call `env.reset(seed=seed, options=dict(reconfigure=True))` which will always create the same scene depending on the seed here. When `fixed_scene=False` then every call to env.reset will create a new scene and the seed will dictate which scene is created. | ||
|
||
|
||
## TODOs | ||
|
||
- Find a better location to save metadata for scene datasets | ||
- Pick reasonable initial states for robots in scenes that don't collide with the scene. | ||
- More intuitive API for scene setting? | ||
- Add in mobile robots |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file renamed
BIN
+6.4 KB
...ne_builder/table/assets/floor_texture.png → ...utils/building/assets/floor_texture_2.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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...cene_builder/ai2thor/metadata/download.py → ...2/utils/scene_builder/ai2thor/download.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from .kitchen_scene_builder import KitchenSceneBuilder |
Binary file added
BIN
+1010 KB
mani_skill2/utils/scene_builder/kitchen/assets/brick_wall_02_diff_1k.jpg
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
BIN
+705 KB
mani_skill2/utils/scene_builder/kitchen/assets/laminate_floor_02_diff_1k.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.