diff --git a/README.md b/README.md index ecd22c72..7ce14c2d 100644 --- a/README.md +++ b/README.md @@ -50,16 +50,17 @@ your machine. If you are a Python user, you might want to start with our tutorial notebooks running on Google Colab: - - The **introductory tutorial** teaches MuJoCo basics: + - The **introductory** tutorial teaches MuJoCo basics: [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/google-deepmind/mujoco/blob/main/python/tutorial.ipynb) - The **LQR** tutorial synthesizes a linear-quadratic controller, balancing a humanoid on one leg: [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/google-deepmind/mujoco/blob/main/python/LQR.ipynb) - The **least-squares** tutorial explains how to use the Python-based nonlinear least-squares solver: [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/google-deepmind/mujoco/blob/main/python/least_squares.ipynb) - The **MJX** tutorial provides usage examples of - [MuJoCo XLA](https://mujoco.readthedocs.io/en/stable/mjx.html), a branch of MuJoCo written in - JAX: + [MuJoCo XLA](https://mujoco.readthedocs.io/en/stable/mjx.html), a branch of MuJoCo written in JAX: [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/google-deepmind/mujoco/blob/main/mjx/tutorial.ipynb) + - The **differentiable physics** tutorial trains locomotion policies with analytical gradients automatically derived from MuJoCo's physics step: + [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/google-deepmind/mujoco/blob/main/mjx/training_apg.ipynb) ## Installation diff --git a/doc/changelog.rst b/doc/changelog.rst index a3b025ce..07e2cc9d 100644 --- a/doc/changelog.rst +++ b/doc/changelog.rst @@ -52,14 +52,16 @@ MJX 17. Add support functions for ``id2name`` and ``name2id``, MJX versions of :ref:`mj_id2name` and :ref:`mj_name2id`. 18. Added support for :ref:`gravcomp` and :ref:`actuatorgravcomp`. 19. Fixed a bug in ``mjx.ray`` for sometimes allowed negative distances for ray-mesh tests. +20. Added a new `differentiable physics tutorial `__ that demonstrates training locomotion policies with analytical gradients + automatically derived from the MJX physics step. Contribution by :github:user:`Andrew-Luo1`. Bug fixes ^^^^^^^^^ -20. Defaults of lights were not being saved, now fixed. -21. Prevent overwriting of frame names by body names when saving an XML. Bug introduced in 3.1.4. -22. Fixed bug in Python binding of :ref:`mj_saveModel`: ``buffer`` argument was documented as optional but was actually +21. Defaults of lights were not being saved, now fixed. +22. Prevent overwriting of frame names by body names when saving an XML. Bug introduced in 3.1.4. +23. Fixed bug in Python binding of :ref:`mj_saveModel`: ``buffer`` argument was documented as optional but was actually not optional. -23. Fixed bug that prevented memory allocations larger than 2.15 GB. +24. Fixed bug that prevented memory allocations larger than 2.15 GB. Version 3.1.4 (April 10th, 2024) diff --git a/mjx/training_apg.ipynb b/mjx/training_apg.ipynb index d7cfac89..26879392 100644 --- a/mjx/training_apg.ipynb +++ b/mjx/training_apg.ipynb @@ -1,6 +1,39 @@ { "cells": [ { + "cell_type": "markdown", + "metadata": { + "id": "MpkYHwCqk7W-" + }, + "source": [ + "![MuJoCo banner](https://raw.githubusercontent.com/google-deepmind/mujoco/main/banner.png)\n", + "\n", + "#

Tutorial

\n", + "\n", + "This notebook provides a tutorial for differentiable physics for policy learning in [**MuJoCo XLA (MJX)**](https://github.com/google-deepmind/mujoco/blob/main/mjx), a JAX-based implementation of MuJoCo.\n", + "\n", + "**A Colab runtime with GPU acceleration is required.** If you're using a CPU-only runtime, you can switch using the menu \"Runtime > Change runtime type\".\n", + "\n", + "\n", + "This notebook was written by [Jing Yuan Luo](https://github.com/Andrew-Luo1).\n", + "\n", + "\u003c!-- Copyright 2021 DeepMind Technologies Limited\n", + "\n", + " Licensed under the Apache License, Version 2.0 (the \"License\");\n", + " you may not use this file except in compliance with the License.\n", + " You may obtain a copy of the License at\n", + "\n", + " http://www.apache.org/licenses/LICENSE-2.0\n", + "\n", + " Unless required by applicable law or agreed to in writing, software\n", + " distributed under the License is distributed on an \"AS IS\" BASIS,\n", + " WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n", + " See the License for the specific language governing permissions and\n", + " limitations under the License.\n", + "--\u003e" + ] + }, + { "cell_type": "markdown", "metadata": {}, "source": [