add envs implements.
Browse files- .gitattributes +1 -0
- .gitignore +65 -0
- envs/bi_so101_fold_cloth.py +34 -0
- envs/so101_clean_toytable.py +33 -0
- envs/so101_lift_cube.py +33 -0
- envs/so101_pick_orange.py +33 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
assets/** filter=lfs diff=lfs merge=lfs -text
|
.gitignore
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# C++
|
| 2 |
+
**/cmake-build*/
|
| 3 |
+
**/build*/
|
| 4 |
+
**/*.so
|
| 5 |
+
**/*.log*
|
| 6 |
+
|
| 7 |
+
# Omniverse
|
| 8 |
+
**/*.dmp
|
| 9 |
+
**/.thumbs
|
| 10 |
+
|
| 11 |
+
# Python
|
| 12 |
+
.DS_Store
|
| 13 |
+
**/*.egg-info/
|
| 14 |
+
**/__pycache__/
|
| 15 |
+
**/.pytest_cache/
|
| 16 |
+
**/*.pyc
|
| 17 |
+
**/*.pb
|
| 18 |
+
|
| 19 |
+
# Docker/Singularity
|
| 20 |
+
**/*.sif
|
| 21 |
+
docker/cluster/exports/
|
| 22 |
+
docker/.container.cfg
|
| 23 |
+
|
| 24 |
+
# IDE
|
| 25 |
+
**/.idea/
|
| 26 |
+
**/.vscode/
|
| 27 |
+
# Don't ignore the top-level .vscode directory as it is
|
| 28 |
+
# used to configure VS Code settings
|
| 29 |
+
!.vscode
|
| 30 |
+
|
| 31 |
+
# Outputs
|
| 32 |
+
**/output/*
|
| 33 |
+
**/outputs/*
|
| 34 |
+
**/videos/*
|
| 35 |
+
**/wandb/*
|
| 36 |
+
**/.neptune/*
|
| 37 |
+
docker/artifacts/
|
| 38 |
+
*.tmp
|
| 39 |
+
|
| 40 |
+
# Doc Outputs
|
| 41 |
+
**/docs/_build/*
|
| 42 |
+
**/generated/*
|
| 43 |
+
|
| 44 |
+
# Isaac-Sim packman
|
| 45 |
+
_isaac_sim*
|
| 46 |
+
_repo
|
| 47 |
+
_build
|
| 48 |
+
.lastformat
|
| 49 |
+
|
| 50 |
+
# RL-Games
|
| 51 |
+
**/runs/*
|
| 52 |
+
**/logs/*
|
| 53 |
+
**/recordings/*
|
| 54 |
+
|
| 55 |
+
# Pre-Trained Checkpoints
|
| 56 |
+
/.pretrained_checkpoints/
|
| 57 |
+
|
| 58 |
+
# Teleop Recorded Dataset
|
| 59 |
+
/datasets/
|
| 60 |
+
|
| 61 |
+
# Tests
|
| 62 |
+
tests/
|
| 63 |
+
|
| 64 |
+
# Docker history
|
| 65 |
+
.isaac-lab-docker-history
|
envs/bi_so101_fold_cloth.py
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import os
|
| 2 |
+
import os
|
| 3 |
+
from pathlib import Path
|
| 4 |
+
from huggingface_hub import snapshot_download
|
| 5 |
+
|
| 6 |
+
|
| 7 |
+
def make_env(n_envs: int = 1, use_async_envs: bool = False):
|
| 8 |
+
"""
|
| 9 |
+
Create vectorized environments for leisaac task.
|
| 10 |
+
|
| 11 |
+
Args:
|
| 12 |
+
n_envs: Number of parallel environments
|
| 13 |
+
use_async_envs: Whether to use AsyncVectorEnv or SyncVectorEnv
|
| 14 |
+
(not use now)
|
| 15 |
+
|
| 16 |
+
Returns:
|
| 17 |
+
ManagerBasedRLEnv or DirectRLEnv inherit from gym.Env implemented in IsaacLab
|
| 18 |
+
"""
|
| 19 |
+
|
| 20 |
+
# download assets from huggingface first
|
| 21 |
+
snapshot_download(repo_id='LightwheelAI/leisaac_env', revision=None, cache_dir=None)
|
| 22 |
+
|
| 23 |
+
# set environment variable for leisaac asset
|
| 24 |
+
assets_root = Path(__file__).parent.parent / 'assets'
|
| 25 |
+
os.environ['LEISAAC_ASSETS_ROOT'] = str(assets_root)
|
| 26 |
+
|
| 27 |
+
from isaaclab.app import AppLauncher
|
| 28 |
+
_ = AppLauncher({"enable_cameras": True})
|
| 29 |
+
|
| 30 |
+
from leisaac.utils.envhub_utils import export_env
|
| 31 |
+
|
| 32 |
+
return export_env(
|
| 33 |
+
'LeIsaac-SO101-FoldCloth-BiArm-Direct-v0', device="cuda:0", num_envs=n_envs
|
| 34 |
+
)
|
envs/so101_clean_toytable.py
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import os
|
| 2 |
+
from pathlib import Path
|
| 3 |
+
from huggingface_hub import snapshot_download
|
| 4 |
+
|
| 5 |
+
|
| 6 |
+
def make_env(n_envs: int = 1, use_async_envs: bool = False):
|
| 7 |
+
"""
|
| 8 |
+
Create vectorized environments for leisaac task.
|
| 9 |
+
|
| 10 |
+
Args:
|
| 11 |
+
n_envs: Number of parallel environments
|
| 12 |
+
use_async_envs: Whether to use AsyncVectorEnv or SyncVectorEnv
|
| 13 |
+
(not use now)
|
| 14 |
+
|
| 15 |
+
Returns:
|
| 16 |
+
ManagerBasedRLEnv or DirectRLEnv inherit from gym.Env implemented in IsaacLab
|
| 17 |
+
"""
|
| 18 |
+
|
| 19 |
+
# download assets from huggingface first
|
| 20 |
+
snapshot_download(repo_id='LightwheelAI/leisaac_env', revision=None, cache_dir=None)
|
| 21 |
+
|
| 22 |
+
# set environment variable for leisaac asset
|
| 23 |
+
assets_root = Path(__file__).parent.parent / 'assets'
|
| 24 |
+
os.environ['LEISAAC_ASSETS_ROOT'] = str(assets_root)
|
| 25 |
+
|
| 26 |
+
from isaaclab.app import AppLauncher
|
| 27 |
+
_ = AppLauncher({"enable_cameras": True})
|
| 28 |
+
|
| 29 |
+
from leisaac.utils.envhub_utils import export_env
|
| 30 |
+
|
| 31 |
+
return export_env(
|
| 32 |
+
'LeIsaac-SO101-CleanToyTable-v0', device="cpu", num_envs=n_envs
|
| 33 |
+
)
|
envs/so101_lift_cube.py
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import os
|
| 2 |
+
from pathlib import Path
|
| 3 |
+
from huggingface_hub import snapshot_download
|
| 4 |
+
|
| 5 |
+
|
| 6 |
+
def make_env(n_envs: int = 1, use_async_envs: bool = False):
|
| 7 |
+
"""
|
| 8 |
+
Create vectorized environments for leisaac task.
|
| 9 |
+
|
| 10 |
+
Args:
|
| 11 |
+
n_envs: Number of parallel environments
|
| 12 |
+
use_async_envs: Whether to use AsyncVectorEnv or SyncVectorEnv
|
| 13 |
+
(not use now)
|
| 14 |
+
|
| 15 |
+
Returns:
|
| 16 |
+
ManagerBasedRLEnv or DirectRLEnv inherit from gym.Env implemented in IsaacLab
|
| 17 |
+
"""
|
| 18 |
+
|
| 19 |
+
# download assets from huggingface first
|
| 20 |
+
snapshot_download(repo_id='LightwheelAI/leisaac_env', revision=None, cache_dir=None)
|
| 21 |
+
|
| 22 |
+
# set environment variable for leisaac asset
|
| 23 |
+
assets_root = Path(__file__).parent.parent / 'assets'
|
| 24 |
+
os.environ['LEISAAC_ASSETS_ROOT'] = str(assets_root)
|
| 25 |
+
|
| 26 |
+
from isaaclab.app import AppLauncher
|
| 27 |
+
_ = AppLauncher({"enable_cameras": True})
|
| 28 |
+
|
| 29 |
+
from leisaac.utils.envhub_utils import export_env
|
| 30 |
+
|
| 31 |
+
return export_env(
|
| 32 |
+
'LeIsaac-SO101-LiftCube-v0', device="cuda:0", num_envs=n_envs
|
| 33 |
+
)
|
envs/so101_pick_orange.py
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import os
|
| 2 |
+
from pathlib import Path
|
| 3 |
+
from huggingface_hub import snapshot_download
|
| 4 |
+
|
| 5 |
+
|
| 6 |
+
def make_env(n_envs: int = 1, use_async_envs: bool = False):
|
| 7 |
+
"""
|
| 8 |
+
Create vectorized environments for leisaac task.
|
| 9 |
+
|
| 10 |
+
Args:
|
| 11 |
+
n_envs: Number of parallel environments
|
| 12 |
+
use_async_envs: Whether to use AsyncVectorEnv or SyncVectorEnv
|
| 13 |
+
(not use now)
|
| 14 |
+
|
| 15 |
+
Returns:
|
| 16 |
+
ManagerBasedRLEnv or DirectRLEnv inherit from gym.Env implemented in IsaacLab
|
| 17 |
+
"""
|
| 18 |
+
|
| 19 |
+
# download assets from huggingface first
|
| 20 |
+
snapshot_download(repo_id='LightwheelAI/leisaac_env', revision=None, cache_dir=None)
|
| 21 |
+
|
| 22 |
+
# set environment variable for leisaac asset
|
| 23 |
+
assets_root = Path(__file__).parent.parent / 'assets'
|
| 24 |
+
os.environ['LEISAAC_ASSETS_ROOT'] = str(assets_root)
|
| 25 |
+
|
| 26 |
+
from isaaclab.app import AppLauncher
|
| 27 |
+
_ = AppLauncher({"enable_cameras": True})
|
| 28 |
+
|
| 29 |
+
from leisaac.utils.envhub_utils import export_env
|
| 30 |
+
|
| 31 |
+
return export_env(
|
| 32 |
+
'LeIsaac-SO101-PickOrange-v0', device="cuda:0", num_envs=n_envs
|
| 33 |
+
)
|