-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
92 additions
and
47 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ __pycache__/ | |
*.egg-info/ | ||
logs/ | ||
None/ | ||
dist/ | ||
.pytest_cache/ | ||
.DS_Store | ||
loco_mujoco/datasets/ | ||
|
Binary file not shown.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,16 +1,11 @@ | ||
__version__ = '0.1' | ||
|
||
|
||
from .environments import LocoEnv | ||
|
||
try: | ||
|
||
from .environments import LocoEnv | ||
|
||
def get_all_task_names(): | ||
return LocoEnv.get_all_task_names() | ||
|
||
|
||
def download_all_datasets(): | ||
return LocoEnv.download_all_datasets() | ||
|
||
except ImportError: | ||
pass | ||
except ImportError as e: | ||
print(e) |
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,82 @@ | ||
import os | ||
import wget | ||
import zipfile | ||
from pathlib import Path | ||
import loco_mujoco | ||
|
||
|
||
def download_all_datasets(): | ||
""" | ||
Download and installs all datasets. | ||
""" | ||
download_real_datasets() | ||
download_perfect_dataset() | ||
|
||
|
||
def download_real_datasets(): | ||
""" | ||
Download and installs real datasets. | ||
""" | ||
|
||
dataset_path = Path(loco_mujoco.__file__).resolve().parent / "datasets" | ||
print(dataset_path) | ||
|
||
print("Downloading Humanoid Datasets ...\n") | ||
dataset_path_humanoid = dataset_path / "humanoids/real" | ||
dataset_path_humanoid_str = str(dataset_path_humanoid) | ||
os.makedirs(dataset_path_humanoid_str, exist_ok=True) | ||
humanoid_url = "https://zenodo.org/records/10102870/files/humanoid_datasets_v0.1.zip?download=1" | ||
wget.download(humanoid_url, out=dataset_path_humanoid_str) | ||
file_name = "humanoid_datasets_v0.1.zip" | ||
file_path = str(dataset_path_humanoid / file_name) | ||
with zipfile.ZipFile(file_path, "r") as zip_ref: | ||
zip_ref.extractall(dataset_path_humanoid_str) | ||
os.remove(file_path) | ||
|
||
print("Downloading Quadruped Datasets ...\n") | ||
dataset_path_quadrupeds = dataset_path / "quadrupeds/real" | ||
dataset_path_quadrupeds_str = str(dataset_path_quadrupeds) | ||
os.makedirs(dataset_path_quadrupeds_str, exist_ok=True) | ||
quadruped_url = "https://zenodo.org/records/10102870/files/quadruped_datasets_v0.1.zip?download=1" | ||
wget.download(quadruped_url, out=dataset_path_quadrupeds_str) | ||
file_name = "quadruped_datasets_v0.1.zip" | ||
file_path = str(dataset_path_quadrupeds / file_name) | ||
with zipfile.ZipFile(file_path, "r") as zip_ref: | ||
zip_ref.extractall(dataset_path_quadrupeds_str) | ||
os.remove(file_path) | ||
|
||
|
||
def download_perfect_dataset(): | ||
""" | ||
Download and installs perfect datasets. | ||
""" | ||
dataset_path = Path(loco_mujoco.__file__).resolve().parent / "datasets" | ||
|
||
print("Downloading Perfect Humanoid Datasets ...\n") | ||
dataset_path_humanoid = dataset_path / "humanoids/perfect" | ||
dataset_path_humanoid_str = str(dataset_path_humanoid) | ||
os.makedirs(dataset_path_humanoid_str, exist_ok=True) | ||
humanoid_url = "https://zenodo.org/records/10102870/files/humanoid_datasets_v0.1.zip?download=1" | ||
wget.download(humanoid_url, out=dataset_path_humanoid_str) | ||
file_name = "humanoid_datasets_v0.1.zip" | ||
file_path = str(dataset_path_humanoid / file_name) | ||
with zipfile.ZipFile(file_path, "r") as zip_ref: | ||
zip_ref.extractall(dataset_path_humanoid_str) | ||
os.remove(file_path) | ||
|
||
|
||
print("Downloading Perfect Quadruped Datasets ...\n") | ||
dataset_path_quadrupeds = dataset_path / "quadrupeds/perfect" | ||
dataset_path_quadrupeds_str = str(dataset_path_quadrupeds) | ||
os.makedirs(dataset_path_quadrupeds_str, exist_ok=True) | ||
quadruped_url = "https://zenodo.org/records/10102870/files/quadruped_datasets_v0.1.zip?download=1" | ||
wget.download(quadruped_url, out=dataset_path_quadrupeds_str) | ||
file_name = "quadruped_datasets_v0.1.zip" | ||
file_path = str(dataset_path_quadrupeds / file_name) | ||
with zipfile.ZipFile(file_path, "r") as zip_ref: | ||
zip_ref.extractall(dataset_path_quadrupeds_str) | ||
os.remove(file_path) | ||
|
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 |
---|---|---|
@@ -1,5 +1,4 @@ | ||
from setuptools import setup, find_packages | ||
from os import path | ||
import glob | ||
from loco_mujoco import __version__ | ||
|
||
|