Skip to content

Commit

Permalink
fixed tests, updated docs, and minor fix in MyoSuiteHumanoid.
Browse files Browse the repository at this point in the history
  • Loading branch information
robfiras committed Sep 9, 2024
1 parent 3f2ba10 commit bd3201e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
5 changes: 5 additions & 0 deletions docs/source/loco_mujoco.installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ or you do an editable installation by cloning this repository and then running:

.. code-block:: bash
git clone --recurse-submodules [email protected]:robfiras/loco-mujoco.git
cd loco-mujoco
pip install -e .
Expand All @@ -22,6 +23,10 @@ or you do an editable installation by cloning this repository and then running:
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
---------------------

Expand Down
3 changes: 1 addition & 2 deletions loco_mujoco/environments/humanoids/myosuite_humanoid.py
Original file line number Diff line number Diff line change
Expand Up @@ -1294,8 +1294,7 @@ def _apply_xml_changes(xml_path, xml_path_tmp):
"""

# Create tmp dir if it doesn't exist yet
if xml_path_tmp and not os.path.exists(xml_path_tmp):
os.makedirs(os.path.dirname(xml_path_tmp))
os.makedirs(os.path.dirname(xml_path_tmp), exist_ok=True)

# we load and save the model to have a single file xml
model = mujoco.MjModel.from_xml_path(xml_path)
Expand Down
4 changes: 2 additions & 2 deletions tests/test_environments.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ def test_replays():

for task_name in task_names:

# todo: include perfect datasets into test
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 or "MyoSuiteHumanoid" not in task_name:
np.random.seed(0)

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

0 comments on commit bd3201e

Please sign in to comment.