Skip to content
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

Update mujoco-py to MuJoCo 2.1 #640

Merged
merged 2 commits into from
Nov 2, 2021

Conversation

nimrod-gileadi
Copy link
Contributor

MuJoCo has been updated to version 2.1 (see announcement).

Activation keys are no longer required, and there are some minor API changes. This PR updates code generation to support the API changes, and removes code related to the activation key.

I also updated README.md, assuming there will be a new version of mujoco-py on PyPI, 2.1.

- Remove license-related parts of the build process.
- Correctly parse the comments for array sizes based on nmocap.
- Explicitly exclude a few structs from generated wrappers, where
  the structs don't have a corresponding typedef.

Still TODO: Update README.md once a new package is pushed to PyPi.
As of version 2.1.0, MuJoCo doesn't require an activation key.
@vwxyzjn
Copy link

vwxyzjn commented Oct 24, 2021

@nimrod-gileadi this is amazing work! if this repo is no longer maintained, does it make sense put a free-mujoco-py on PyPi so that people can directly install it? It should also be possible to directly include the free mujoco binary as part of the pypi wheel file.

@nimrod-gileadi
Copy link
Contributor Author

@vwxyzjn, are you interested in mujoco-py in the context of Gym, or would you be a direct user of mujoco-py?

The MuJoCo team and I are trying to figure out what to do about this: from talking to @jkterry1 (see his post openai/gym#2456), there are some issues with mujoco-py that make it hard for gym to upgrade.

We are thinking of making official MuJoCo python bindings that we can maintain long term. As you say, automatically getting a mujoco binary would make installation much simpler for users.

@vwxyzjn
Copy link

vwxyzjn commented Oct 25, 2021

Hey, @nimrod-gileadi thanks for the quick response. I am interested in the context of Gym. Actually, I have just made a quick demo release. Try executing

python -m venv venv
source venv/bin/activate
pip install gym
pip install free-mujoco-py
python -c "import mujoco_py;import gym;env=gym.make('HalfCheetah-v2')"

asciicast

The source code is at nimrod-gileadi#1. For convenience, the release automatically includes the MuJoCo binaries so there's no need to download it.

@araffin
Copy link

araffin commented Oct 25, 2021

@vwxyzjn I made a @googlecolab notebook if you want to try it online (it requires one env reload): https://colab.research.google.com/drive/1KGMZdRq6AemfcNscKjgpRzXqfhUtCf-V?usp=sharing

Copy link
Contributor

@matthiasplappert matthiasplappert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for contributing this. Will merge.

@paantya
Copy link

paantya commented Nov 8, 2021

#648

@Krishnendu1984
Copy link

Kindly tell how to render in colab with this half cheetah beaacuse when i am writing env.render() it is showing GLFW error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants