Skip to content

Commit

Permalink
Fixed minor issues for new release.
Browse files Browse the repository at this point in the history
- fixed wrong paths for dataset download.
- fixed dm_control version to 1.0.14 to work with mujoco==2.3.7.
- updated readme.
- removed MyoSuiteHumanoid from test since it requires mujoco>=3.2.2.
- fixed #42 with new datasets.
  • Loading branch information
robfiras committed Sep 9, 2024
1 parent d64a98d commit 3f2ba10
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 9 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ pip install -e .
> differences in the simulation, which made testing very difficult. However, in practice, you can
> use any newer version of MuJoCo! Just install it after installing LocoMuJoCo.
> [!NOTE]
> If you want to run the **MyoSuiteHumanoid** environment, you need to upgrade Mujoco to 3.2.2 and dm_control to 1.0.22
> *after* installing this packing and downloading the datasets!

### Download the Datasets
After installing LocoMuJoCo, new commands for downloading the datasets will be setup for you.
You have the choice of downloading all datasets available or only the ones you need.
Expand Down
9 changes: 4 additions & 5 deletions loco_mujoco/utils/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def download_real_datasets():
humanoid_url = "https://zenodo.org/records/13737593/files/humanoid_datasets_v0.4.1.zip?download=1"
wget.download(humanoid_url, out=dataset_path_humanoid_str)
print("\n")
file_name = "humanoid_datasets_v0.3.0.zip"
file_name = "humanoid_datasets_v0.4.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)
Expand All @@ -47,7 +47,7 @@ def download_real_datasets():
quadruped_url = "https://zenodo.org/records/13737593/files/quadruped_datasets_v0.4.1.zip?download=1"
wget.download(quadruped_url, out=dataset_path_quadrupeds_str)
print("\n")
file_name = "quadruped_datasets_v0.3.0.zip"
file_name = "quadruped_datasets_v0.4.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)
Expand All @@ -68,21 +68,20 @@ def download_perfect_datasets():
humanoid_url = "https://zenodo.org/records/13737593/files/humanoid_datasets_perfect_v0.4.1.zip?download=1"
wget.download(humanoid_url, out=dataset_path_humanoid_str)
print("\n")
file_name = "humanoid_datasets_perfect_v0.3.0.zip"
file_name = "humanoid_datasets_perfect_v0.4.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("\nDownloading Perfect Quadruped Datasets ...")
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/13737593/files/quadruped_datasets_perfect_v0.4.1.zip?download=1"
wget.download(quadruped_url, out=dataset_path_quadrupeds_str)
print("\n")
file_name = "quadruped_datasets_perfect_v0.3.0.zip"
file_name = "quadruped_datasets_perfect_v0.4.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)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ dependencies = [
"scipy",
"mujoco==2.3.7",
"gymnasium",
"dm_control",
"dm_control==1.0.14",
"pyyaml",
"wget"]

Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ numpy
scipy
mujoco==2.3.7
gymnasium
dm_control
dm_control==1.0.14
pyyaml
wget
4 changes: 2 additions & 2 deletions tests/test_environments.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ def test_all_environments():

for task_name in task_names:

# todo: include perfect datasets into tests
if "perfect" not in task_name:
# todo: include perfect datasets and MyoSuiteHumanoid into tests (the latter requires updating Mujoco >= 3.0)
if "perfect" not in task_name and "MyoSuiteHumanoid" not in task_name:
np.random.seed(0)

print(f"Testing {task_name}...")
Expand Down

0 comments on commit 3f2ba10

Please sign in to comment.