d7844aa5be
1. Links to the programming chapter were broken after 69c74f850e. They're now fixed with a redirect in readthedocs.io, but this commit updates them to the latest URL.
2. Most docs links should point to "stable" instead of "latest", since most users will want the docs for the released version, not the upcoming version. The exceptions are the programming chapter, and instructions for building the Python bindings from source.
PiperOrigin-RevId: 502821526
Change-Id: If0a55ab2be4751ba0165bf644030464234083133
74 lines
2.9 KiB
Markdown
74 lines
2.9 KiB
Markdown
# MuJoCo Python Bindings
|
|
|
|
[![PyPI Python Version][pypi-versions-badge]][pypi]
|
|
[![PyPI version][pypi-badge]][pypi]
|
|
|
|
[pypi-versions-badge]: https://img.shields.io/pypi/pyversions/mujoco
|
|
[pypi-badge]: https://badge.fury.io/py/mujoco.svg
|
|
[pypi]: https://pypi.org/project/mujoco/
|
|
|
|
This package is the canonical Python bindings for the
|
|
[MuJoCo physics engine](https://github.com/deepmind/mujoco).
|
|
These bindings are developed and maintained by DeepMind, and is kept up-to-date
|
|
with the latest developments in MuJoCo itself.
|
|
|
|
The `mujoco` package provides direct access to raw MuJoCo C API functions,
|
|
structs, constants, and enumerations. Structs are provided as Python classes,
|
|
with Pythonic initialization and deletion semantics.
|
|
|
|
It is not the aim of this package to provide fully fledged
|
|
scene/environment/game authoring API, as there are already a number of existing
|
|
packages that do this well. However, this package does provide a number of
|
|
lower-level components outside of MuJoCo itself that are likely to be useful to
|
|
most users who access MuJoCo through Python. For example, the `egl`, `glfw`, and
|
|
`osmesa` subpackages contain utilities for setting up OpenGL rendering contexts.
|
|
|
|
## Installation
|
|
|
|
The recommended way to install this package is via [PyPI](https://pypi.org/project/mujoco/):
|
|
|
|
```sh
|
|
pip install mujoco
|
|
```
|
|
|
|
A copy of the MuJoCo library is provided as part of the package and does **not**
|
|
need to be downloaded or installed separately.
|
|
|
|
### Source
|
|
|
|
**IMPORTANT:** Building from source is only necessary if you are modifying the
|
|
Python bindings (or are trying to run on exceptionally old Linux systems).
|
|
If that's not the case, then we recommend installing the prebuilt binaries from
|
|
PyPI.
|
|
|
|
If you need to build the Python bindings from source, please consult
|
|
[the documentation](https://mujoco.readthedocs.io/en/latest/python.html#building-from-source).
|
|
|
|
## Usage
|
|
|
|
Once installed, the package can be imported via `import mujoco`. Please consult
|
|
our [documentation](https://mujoco.readthedocs.io/en/stable/python.html) for
|
|
further detail on the package's API.
|
|
|
|
We recommend going through the tutorial notebook which covers the basics of
|
|
MuJoCo using Python:
|
|
[](https://colab.research.google.com/github/deepmind/mujoco/blob/main/python/tutorial.ipynb)
|
|
|
|
## Versioning
|
|
|
|
The `major.minor.micro` portion of the version number matches the version of
|
|
MuJoCo that the bindings provide. Optionally, if we release updates to the
|
|
Python bindings themselves that target the same version of MuJoCo, a `.postN`
|
|
suffix is added, for example `2.1.2.post2` represents the second update to the
|
|
bindings for MuJoCo 2.1.2.
|
|
|
|
## License and Disclaimer
|
|
|
|
Copyright 2022 DeepMind Technologies Limited
|
|
|
|
MuJoCo and its Python bindings are licensed under the Apache License,
|
|
Version 2.0. You may obtain a copy of the License at
|
|
https://www.apache.org/licenses/LICENSE-2.0.
|
|
|
|
This is not an officially supported Google product.
|