-
Notifications
You must be signed in to change notification settings - Fork 8.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Contact forces are still zero in Ant-v2 #2593
Comments
@JamesKCS could you check whether they are still zero in this fork? |
@ikostrikov Thank you; I'm away from my primary computer and won't be able to check until Tuesday or Wednesday next week, but will check and report back then. Thank you again. |
@ikostrikov Thank you again for your help. I tried duplicating my conda environment, and downloading the fork, and overwriting the gym version with the manually downloaded fork:
I also tried making a new conda environment from scratch, installing gym with the command
In both cases, on the line
I get an error about
Please let me know how I can correctly install your fork to check your fix. Thank you! |
The fork depends on dm_control instead of mujoco_py. Could you try to install it with pip install git+git://github.com/rodrigodelazcano/gym#egg=gym[mujoco] ? |
Thank you. I tried that, and got the error
My MuJoCo directory does not have this structure (no lib directory near the top level):
Are there alternative instructions for installing MuJoCo I should follow to make this work? Thank you again very much for your help. |
You need to install mujoco 2.1.1: |
Thank you, the install seems to work now, but this fork does not seem to fix the original problem. I ran 100k random actions this time; the code and results are below (just in case I'm making a trivial error). I also tried Ant-v3 (for 10k actions) as suggested by the warning below, and got a similar result. Thank you again for your help and time.
Edit: accidentally pasted the output from Ant-v3, fixed it by replacing it with the output from v2. |
I can reproduce it on my machine. I will have time to take a closer look tomorrow. |
@JamesKCS it seems that contact forces are not displayed properly in the main branch while the latest pypi release is correct: pip install git+git://github.com/openai/gym#egg=gym[mujoco] has all zeros even though it uses an old version of mujoco_py pip install gym[mujoco] works correctly. Could you verify it? @rodrigodelazcano could you take a look? We need to resolve this issue before mujoco_py is replaced with dm_control. |
@ikostrikov Thank you for looking into this.
fails because it wants an old version of MuJoCo:
I need a license to use pre-2.0 MuJoCo, correct? So I don't think I can verify; please correct me if I'm wrong or am making an error. Thank you again for your help. |
@JamesKCS they provide a free license now for the older versions of mujoco: |
@ikostrikov That seems to work! The outputs of the program above are below (1 mil timesteps). Would you recommend using MuJoCo 1.5 for the time being, until this is fixed? Thank you.
|
Closed by #2595 |
This is the same as #1636 and #1541.
For Ant-v2, contact forces (all observation dimensions after the first 27) seem to be 0. To check this, I ran 10 million time steps with random action selection, and never got a non-zero value for those 84 observation dimensions in that run.
The (closed) issues above seem to suggest downgrading to MuJoCo<2.0 as a solution. However, as I understand it, MuJoCo<2.0 was before the open-sourcing of MuJoCo, and so requires purchasing a license, and, even then, doesn't play well with cluster computing (please correct me if I am wrong).
Even if MuJoCo<2.0 does not require a license, leaving the issues above as closed because downgrading to <2.0 fixes them does not seem correct, since https://github.com/openai/mujoco-py instructs users to use mujoco-py 2.1 and mujoco 2.1.0. I think that perhaps those issues should be reopened.
My versions:
gym: v0.17.1
MuJoCo: v2.1.0
Python: 3.7.2
mujoco-py: 2.1.2.14
Apologies if I am making a trivial error; I am new to MuJoCo. I also apologize if this issue should be posted on mujoco-py instead; I decided to post it here since the above issues were posted here. Thank you in advance for the assistance!
The text was updated successfully, but these errors were encountered: