MyoHub / myosuite

MyoSuite is a collection of environments/tasks to be solved by musculoskeletal models simulated with the MuJoCo physics engine and wrapped in the OpenAI gym API.
https://sites.google.com/view/myosuite
Apache License 2.0
833 stars 104 forks source link

Loading policy looks for mujoco-py instead of mujoco #200

Open irfanmohamed12 opened 1 month ago

irfanmohamed12 commented 1 month ago

I cant seem to run the tutorial 2_Load_Policy.ipnyb.

The issue throws an error at this line: pi = pickle.load(open(policy, 'rb')).

The error 'DependencyNotInstalled: No module named 'mujoco_py'.

The policy : "myoElbowPose1D6MExoRandom-v0/2022-02-26_21-16-27/36_env=myoElbowPose1D6MExoRandom-v0,seed=1/iterations/best_policy.pickle"

So I did a pip install mujoco_py.

If I run the notebook again, I see error at same line: ' You appear to be missing MuJoCo. We expected to find the file here: C:\Users\USERNAME.mujoco\mujoco210'

Does this mean I need to download Mujoco from https://www.roboti.us/download.html and save to this folder?

However, https://github.com/openai/mujoco-py#install-mujoco states that this pipeline is for Linux or OSX.

Is this a known issue? How do i solve it for Windows?

Related info: Windows 11 Enterprise python 3.9.13 Myosuite 2.50. mujoco 3.1.2 mrjl 1.0.0 mujoco-py 2.1.2.14

Vittorio-Caggiano commented 1 month ago

how did you install mjrl? can you try creating a new conda environment without mujoco_py and installing mjrl with git+https://github.com/aravindr93/mjrl.git@pvr_beta_1vk (in this branch the dependency on mujoco_py was removed)

Vittorio-Caggiano commented 1 month ago

@irfanmohamed12 see issue #88

Vittorio-Caggiano commented 1 month ago

@irfanmohamed12 did that solution fix your problem?

irfanmohamed12 commented 1 month ago

@irfanmohamed12 did that solution fix your problem? I tried to setup a virtual environment with Python3.9.13 and installed this branch. However, it did not help. I get an error: Cannot re-register id: mjrl_point_mass-v0