Merge branch 'main' into usd-integration
This commit is contained in:
@@ -10,7 +10,7 @@ assignees: ''
|
|||||||
**How to ask for help**
|
**How to ask for help**
|
||||||
|
|
||||||
First, read our quick guide to
|
First, read our quick guide to
|
||||||
[asking good questions](https://github.com/deepmind/mujoco#asking-questions).
|
[asking good questions](https://github.com/google-deepmind/mujoco#asking-questions).
|
||||||
Below is a template for you to use:
|
Below is a template for you to use:
|
||||||
|
|
||||||
Hi,
|
Hi,
|
||||||
|
|||||||
+9
-9
@@ -7,10 +7,10 @@ accepting your contributions!
|
|||||||
|
|
||||||
### Documentation, forums
|
### Documentation, forums
|
||||||
|
|
||||||
Please read MuJoCo's [documentation](https://mujoco.readthedocs.io) and look
|
Please read MuJoCo's [documentation](https://mujoco.readthedocs.io/) and look
|
||||||
through current topics on our GitHub
|
through current topics on our GitHub
|
||||||
[issues](https://github.com/deepmind/mujoco/issues) and
|
[issues](https://github.com/google-deepmind/mujoco/issues) and
|
||||||
[discussions](https://github.com/deepmind/mujoco/discussions) pages.
|
[discussions](https://github.com/google-deepmind/mujoco/discussions) pages.
|
||||||
|
|
||||||
### Contributor License Agreement
|
### Contributor License Agreement
|
||||||
|
|
||||||
@@ -35,7 +35,7 @@ How to submit a good bug report:
|
|||||||
|
|
||||||
- Make it easy to reproduce the problem. If this requires a model, attach it as
|
- Make it easy to reproduce the problem. If this requires a model, attach it as
|
||||||
a zip file to the bug report. The model and steps required to reproduce the
|
a zip file to the bug report. The model and steps required to reproduce the
|
||||||
proplem should be *minimal*, in the sense that irrelevant parts are
|
problem should be *minimal*, in the sense that irrelevant parts are
|
||||||
removed.
|
removed.
|
||||||
|
|
||||||
- Clearly state what is the expected behavior.
|
- Clearly state what is the expected behavior.
|
||||||
@@ -54,13 +54,13 @@ What's the most recent version in which the problem doesn't happen?
|
|||||||
Before submitting an enhancement suggestion:
|
Before submitting an enhancement suggestion:
|
||||||
|
|
||||||
- Check if you're using the [latest
|
- Check if you're using the [latest
|
||||||
version](https://github.com/deepmind/mujoco/releases/latest) of MuJoCo.
|
version](https://github.com/google-deepmind/mujoco/releases/latest) of MuJoCo.
|
||||||
|
|
||||||
- Perform a quick [search](https://github.com/deepmind/mujoco/issues) to see if
|
- Perform a quick [search](https://github.com/google-deepmind/mujoco/issues) to
|
||||||
the enhancement has already been suggested. If it has, add a comment to the
|
see if the enhancement has already been suggested. If it has, add a comment to
|
||||||
existing issue instead of opening a new one.
|
the existing issue instead of opening a new one.
|
||||||
|
|
||||||
How to submit a good enhacement suggestion:
|
How to submit a good enhancement suggestion:
|
||||||
|
|
||||||
- Use a clear and descriptive title.
|
- Use a clear and descriptive title.
|
||||||
|
|
||||||
|
|||||||
@@ -3,14 +3,14 @@
|
|||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<a href="https://github.com/deepmind/mujoco/actions/workflows/build.yml?query=branch%3Amain" alt="GitHub Actions">
|
<a href="https://github.com/google-deepmind/mujoco/actions/workflows/build.yml?query=branch%3Amain" alt="GitHub Actions">
|
||||||
<img src="https://img.shields.io/github/actions/workflow/status/deepmind/mujoco/build.yml?branch=main">
|
<img src="https://img.shields.io/github/actions/workflow/status/google-deepmind/mujoco/build.yml?branch=main">
|
||||||
</a>
|
</a>
|
||||||
<a href="https://mujoco.readthedocs.io/" alt="Documentation">
|
<a href="https://mujoco.readthedocs.io/" alt="Documentation">
|
||||||
<img src="https://readthedocs.org/projects/mujoco/badge/?version=latest">
|
<img src="https://readthedocs.org/projects/mujoco/badge/?version=latest">
|
||||||
</a>
|
</a>
|
||||||
<a href="https://github.com/deepmind/mujoco/blob/main/LICENSE" alt="License">
|
<a href="https://github.com/google-deepmind/mujoco/blob/main/LICENSE" alt="License">
|
||||||
<img src="https://img.shields.io/github/license/deepmind/mujoco">
|
<img src="https://img.shields.io/github/license/google-deepmind/mujoco">
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@@ -50,10 +50,11 @@ your machine.
|
|||||||
If you are a Python user, you might want to start with our tutorial notebooks
|
If you are a Python user, you might want to start with our tutorial notebooks
|
||||||
running on Google Colab:
|
running on Google Colab:
|
||||||
|
|
||||||
- The first tutorial focuses on the basics of MuJoCo: [](https://colab.research.google.com/github/deepmind/mujoco/blob/main/python/tutorial.ipynb)
|
- The first tutorial focuses on the basics of MuJoCo:
|
||||||
|
[](https://colab.research.google.com/github/google-deepmind/mujoco/blob/main/python/tutorial.ipynb)
|
||||||
- For a more advanced example, see the LQR tutorial which creates an LQR
|
- For a more advanced example, see the LQR tutorial which creates an LQR
|
||||||
controller to balance a humanoid on one leg using MuJoCo's dynamics
|
controller to balance a humanoid on one leg using MuJoCo's dynamics
|
||||||
derivatives: [](https://colab.research.google.com/github/deepmind/mujoco/blob/main/python/LQR.ipynb)
|
derivatives: [](https://colab.research.google.com/github/google-deepmind/mujoco/blob/main/python/LQR.ipynb)
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
@@ -93,10 +94,10 @@ and [style guide](STYLEGUIDE.md).
|
|||||||
## Asking Questions
|
## Asking Questions
|
||||||
|
|
||||||
Questions and requests for help are welcome on the GitHub
|
Questions and requests for help are welcome on the GitHub
|
||||||
[Issues](https://github.com/deepmind/mujoco/issues) page and should focus on a specific problem
|
[Issues](https://github.com/google-deepmind/mujoco/issues) page and should focus
|
||||||
or question.
|
on a specific problem or question.
|
||||||
|
|
||||||
[Discussions](https://github.com/deepmind/mujoco/discussions) should
|
[Discussions](https://github.com/google-deepmind/mujoco/discussions) should
|
||||||
address wider concerns that might require input from multiple participants.
|
address wider concerns that might require input from multiple participants.
|
||||||
|
|
||||||
Here are some guidelines for asking good questions:
|
Here are some guidelines for asking good questions:
|
||||||
@@ -142,10 +143,10 @@ These packages give users of various languages access to MuJoCo functionality:
|
|||||||
#### First-party bindings:
|
#### First-party bindings:
|
||||||
|
|
||||||
- [Python bindings](https://mujoco.readthedocs.io/en/stable/python.html)
|
- [Python bindings](https://mujoco.readthedocs.io/en/stable/python.html)
|
||||||
- [dm_control](https://github.com/deepmind/dm_control), Google DeepMind's
|
- [dm_control](https://github.com/google-deepmind/dm_control), Google
|
||||||
related environment stack, includes
|
DeepMind's related environment stack, includes
|
||||||
[PyMJCF](https://github.com/deepmind/dm_control/blob/main/dm_control/mjcf/README.md),
|
[PyMJCF](https://github.com/google-deepmind/dm_control/blob/main/dm_control/mjcf/README.md),
|
||||||
a module for procedural manipulation of MuJoCo models.
|
a module for procedural manipulation of MuJoCo models.
|
||||||
- [C# bindings and Unity plug-in](https://mujoco.readthedocs.io/en/stable/unity.html)
|
- [C# bindings and Unity plug-in](https://mujoco.readthedocs.io/en/stable/unity.html)
|
||||||
|
|
||||||
#### Third-party bindings:
|
#### Third-party bindings:
|
||||||
@@ -191,7 +192,7 @@ If you use MuJoCo for published research, please cite:
|
|||||||
|
|
||||||
Copyright 2021 DeepMind Technologies Limited.
|
Copyright 2021 DeepMind Technologies Limited.
|
||||||
|
|
||||||
Box collision code ([`engine_collision_box.c`](https://github.com/deepmind/mujoco/blob/main/src/engine/engine_collision_box.c))
|
Box collision code ([`engine_collision_box.c`](https://github.com/google-deepmind/mujoco/blob/main/src/engine/engine_collision_box.c))
|
||||||
is Copyright 2016 Svetoslav Kolev.
|
is Copyright 2016 Svetoslav Kolev.
|
||||||
|
|
||||||
ReStructuredText documents, images, and videos in the `doc` directory are made
|
ReStructuredText documents, images, and videos in the `doc` directory are made
|
||||||
@@ -207,8 +208,8 @@ This is not an officially supported Google product.
|
|||||||
[build from source]: https://mujoco.readthedocs.io/en/latest/programming#building-mujoco-from-source
|
[build from source]: https://mujoco.readthedocs.io/en/latest/programming#building-mujoco-from-source
|
||||||
[Getting Started]: https://mujoco.readthedocs.io/en/latest/programming#getting-started
|
[Getting Started]: https://mujoco.readthedocs.io/en/latest/programming#getting-started
|
||||||
[Unity]: https://unity.com/
|
[Unity]: https://unity.com/
|
||||||
[releases page]: https://github.com/deepmind/mujoco/releases
|
[releases page]: https://github.com/google-deepmind/mujoco/releases
|
||||||
[GitHub Issues]: https://github.com/deepmind/mujoco/issues
|
[GitHub Issues]: https://github.com/google-deepmind/mujoco/issues
|
||||||
[mujoco.readthedocs.io]: https://mujoco.readthedocs.io
|
[mujoco.readthedocs.io]: https://mujoco.readthedocs.io
|
||||||
[changelog]: https://mujoco.readthedocs.io/en/latest/changelog.html
|
[changelog]: https://mujoco.readthedocs.io/en/latest/changelog.html
|
||||||
[Python bindings]: https://mujoco.readthedocs.io/en/stable/python.html#python-bindings
|
[Python bindings]: https://mujoco.readthedocs.io/en/stable/python.html#python-bindings
|
||||||
|
|||||||
+2
-2
@@ -58,7 +58,7 @@ spot such a pattern, feel free to send a PR to update the guide.
|
|||||||
|
|
||||||
Line length is 100 characters. In rare situations, like the collision table at
|
Line length is 100 characters. In rare situations, like the collision table at
|
||||||
the top of
|
the top of
|
||||||
[engine_collision_driver.c](https://github.com/deepmind/mujoco/blob/c8ff7b3d341560e8cc33fbdcaffbcdbc4c32327c/src/engine/engine_collision_driver.c#L36),
|
[engine_collision_driver.c](https://github.com/google-deepmind/mujoco/blob/c8ff7b3d341560e8cc33fbdcaffbcdbc4c32327c/src/engine/engine_collision_driver.c#L36),
|
||||||
longer lines are allowed for readability.
|
longer lines are allowed for readability.
|
||||||
|
|
||||||
#### Comments
|
#### Comments
|
||||||
@@ -99,7 +99,7 @@ including for one-line blocks:
|
|||||||
- Brace-less single line statements are allowed outside of `engine/` code, for
|
- Brace-less single line statements are allowed outside of `engine/` code, for
|
||||||
similar, repeated blocks, that do not contain flow control statements (`return`,
|
similar, repeated blocks, that do not contain flow control statements (`return`,
|
||||||
`continue`, etc.). For an example of this exception, inspect the [`mjCModel`
|
`continue`, etc.). For an example of this exception, inspect the [`mjCModel`
|
||||||
destructor](https://github.com/deepmind/mujoco/search?q=repo%3Adeepmind%2Fmujoco+filename%3Auser_model.cc).
|
destructor](https://github.com/google-deepmind/mujoco/search?q=repo%3Adeepmind%2Fmujoco+filename%3Auser_model.cc).
|
||||||
|
|
||||||
- Unattached braces are allowed in `if/else` blocks, when inserting a comment
|
- Unattached braces are allowed in `if/else` blocks, when inserting a comment
|
||||||
before the `else`:
|
before the `else`:
|
||||||
|
|||||||
@@ -4,8 +4,8 @@
|
|||||||
Functions
|
Functions
|
||||||
=========
|
=========
|
||||||
|
|
||||||
The main header `mujoco.h <https://github.com/deepmind/mujoco/blob/main/include/mujoco/mujoco.h>`_ exposes a large
|
The main header `mujoco.h <https://github.com/google-deepmind/mujoco/blob/main/include/mujoco/mujoco.h>`_ exposes a
|
||||||
number of functions. However the functions that most users are likely to need are a small fraction.
|
large number of functions. However the functions that most users are likely to need are a small fraction.
|
||||||
|
|
||||||
API function can be classified as:
|
API function can be classified as:
|
||||||
|
|
||||||
|
|||||||
@@ -368,9 +368,9 @@ Numeric constants
|
|||||||
|
|
||||||
Many integer constants were already documented in the primitive types above. In addition, the header files define
|
Many integer constants were already documented in the primitive types above. In addition, the header files define
|
||||||
several other constants documented here. Unless indicated otherwise, each entry in the table below is defined in
|
several other constants documented here. Unless indicated otherwise, each entry in the table below is defined in
|
||||||
`mjmodel.h <https://github.com/deepmind/mujoco/blob/main/include/mujoco/mjmodel.h>`_. Note that some extended key codes
|
`mjmodel.h <https://github.com/google-deepmind/mujoco/blob/main/include/mujoco/mjmodel.h>`_. Note that some extended key
|
||||||
are defined in `mjui.h <https://github.com/deepmind/mujoco/blob/main/include/mujoco/mjui.h>`_ which are not shown in the
|
codes are defined in `mjui.h <https://github.com/google-deepmind/mujoco/blob/main/include/mujoco/mjui.h>`_ which are not
|
||||||
table below. Their names are in the format ``mjKEY_XXX``. They correspond to GLFW key codes.
|
shown in the table below. Their names are in the format ``mjKEY_XXX``. They correspond to GLFW key codes.
|
||||||
|
|
||||||
.. list-table::
|
.. list-table::
|
||||||
:widths: 2 1 8
|
:widths: 2 1 8
|
||||||
@@ -457,60 +457,60 @@ table below. Their names are in the format ``mjKEY_XXX``. They correspond to GLF
|
|||||||
- 6
|
- 6
|
||||||
- The number of geom, site, joint, tendon and actuator groups whose rendering can be enabled and disabled via
|
- The number of geom, site, joint, tendon and actuator groups whose rendering can be enabled and disabled via
|
||||||
:ref:`mjvOption`.
|
:ref:`mjvOption`.
|
||||||
Defined in `mjvisualize.h <https://github.com/deepmind/mujoco/blob/main/include/mujoco/mjvisualize.h>`_.
|
Defined in `mjvisualize.h <https://github.com/google-deepmind/mujoco/blob/main/include/mujoco/mjvisualize.h>`_.
|
||||||
* - ``mjMAXOVERLAY``
|
* - ``mjMAXOVERLAY``
|
||||||
- 500
|
- 500
|
||||||
- The maximal number of characters in overlay text for rendering.
|
- The maximal number of characters in overlay text for rendering.
|
||||||
Defined in `mjvisualize.h <https://github.com/deepmind/mujoco/blob/main/include/mujoco/mjvisualize.h>`_.
|
Defined in `mjvisualize.h <https://github.com/google-deepmind/mujoco/blob/main/include/mujoco/mjvisualize.h>`_.
|
||||||
* - ``mjMAXLINE``
|
* - ``mjMAXLINE``
|
||||||
- 100
|
- 100
|
||||||
- The maximal number of lines per 2D figure (:ref:`mjvFigure`).
|
- The maximal number of lines per 2D figure (:ref:`mjvFigure`).
|
||||||
Defined in `mjvisualize.h <https://github.com/deepmind/mujoco/blob/main/include/mujoco/mjvisualize.h>`_.
|
Defined in `mjvisualize.h <https://github.com/google-deepmind/mujoco/blob/main/include/mujoco/mjvisualize.h>`_.
|
||||||
* - ``mjMAXLINEPNT``
|
* - ``mjMAXLINEPNT``
|
||||||
- 1000
|
- 1000
|
||||||
- The maximal number of points in each line in a 2D figure. Note that the buffer ``mjvFigure.linepnt`` has length
|
- The maximal number of points in each line in a 2D figure. Note that the buffer ``mjvFigure.linepnt`` has length
|
||||||
``2*mjMAXLINEPNT`` because each point has X and Y coordinates.
|
``2*mjMAXLINEPNT`` because each point has X and Y coordinates.
|
||||||
Defined in `mjvisualize.h <https://github.com/deepmind/mujoco/blob/main/include/mujoco/mjvisualize.h>`_.
|
Defined in `mjvisualize.h <https://github.com/google-deepmind/mujoco/blob/main/include/mujoco/mjvisualize.h>`_.
|
||||||
* - ``mjMAXPLANEGRID``
|
* - ``mjMAXPLANEGRID``
|
||||||
- 200
|
- 200
|
||||||
- The maximal number of grid lines in each dimension for rendering planes.
|
- The maximal number of grid lines in each dimension for rendering planes.
|
||||||
Defined in `mjvisualize.h <https://github.com/deepmind/mujoco/blob/main/include/mujoco/mjvisualize.h>`_.
|
Defined in `mjvisualize.h <https://github.com/google-deepmind/mujoco/blob/main/include/mujoco/mjvisualize.h>`_.
|
||||||
* - ``mjNAUX``
|
* - ``mjNAUX``
|
||||||
- 10
|
- 10
|
||||||
- Number of auxiliary buffers that can be allocated in mjrContext.
|
- Number of auxiliary buffers that can be allocated in mjrContext.
|
||||||
Defined in `mjrender.h <https://github.com/deepmind/mujoco/blob/main/include/mujoco/mjrender.h>`_.
|
Defined in `mjrender.h <https://github.com/google-deepmind/mujoco/blob/main/include/mujoco/mjrender.h>`_.
|
||||||
* - ``mjMAXTEXTURE``
|
* - ``mjMAXTEXTURE``
|
||||||
- 1000
|
- 1000
|
||||||
- Maximum number of textures allowed.
|
- Maximum number of textures allowed.
|
||||||
Defined in `mjrender.h <https://github.com/deepmind/mujoco/blob/main/include/mujoco/mjrender.h>`_.
|
Defined in `mjrender.h <https://github.com/google-deepmind/mujoco/blob/main/include/mujoco/mjrender.h>`_.
|
||||||
* - ``mjMAXUISECT``
|
* - ``mjMAXUISECT``
|
||||||
- 10
|
- 10
|
||||||
- Maximum number of UI sections.
|
- Maximum number of UI sections.
|
||||||
Defined in `mjui.h <https://github.com/deepmind/mujoco/blob/main/include/mujoco/mjui.h>`_.
|
Defined in `mjui.h <https://github.com/google-deepmind/mujoco/blob/main/include/mujoco/mjui.h>`_.
|
||||||
* - ``mjMAXUIITEM``
|
* - ``mjMAXUIITEM``
|
||||||
- 80
|
- 80
|
||||||
- Maximum number of items per UI section.
|
- Maximum number of items per UI section.
|
||||||
Defined in `mjui.h <https://github.com/deepmind/mujoco/blob/main/include/mujoco/mjui.h>`_.
|
Defined in `mjui.h <https://github.com/google-deepmind/mujoco/blob/main/include/mujoco/mjui.h>`_.
|
||||||
* - ``mjMAXUITEXT``
|
* - ``mjMAXUITEXT``
|
||||||
- 500
|
- 500
|
||||||
- Maximum number of characters in UI fields 'edittext' and 'other'.
|
- Maximum number of characters in UI fields 'edittext' and 'other'.
|
||||||
Defined in `mjui.h <https://github.com/deepmind/mujoco/blob/main/include/mujoco/mjui.h>`_.
|
Defined in `mjui.h <https://github.com/google-deepmind/mujoco/blob/main/include/mujoco/mjui.h>`_.
|
||||||
* - ``mjMAXUINAME``
|
* - ``mjMAXUINAME``
|
||||||
- 40
|
- 40
|
||||||
- Maximum number of characters in any UI name.
|
- Maximum number of characters in any UI name.
|
||||||
Defined in `mjui.h <https://github.com/deepmind/mujoco/blob/main/include/mujoco/mjui.h>`_.
|
Defined in `mjui.h <https://github.com/google-deepmind/mujoco/blob/main/include/mujoco/mjui.h>`_.
|
||||||
* - ``mjMAXUIMULTI``
|
* - ``mjMAXUIMULTI``
|
||||||
- 20
|
- 20
|
||||||
- Maximum number of radio and select items in UI group.
|
- Maximum number of radio and select items in UI group.
|
||||||
Defined in `mjui.h <https://github.com/deepmind/mujoco/blob/main/include/mujoco/mjui.h>`_.
|
Defined in `mjui.h <https://github.com/google-deepmind/mujoco/blob/main/include/mujoco/mjui.h>`_.
|
||||||
* - ``mjMAXUIEDIT``
|
* - ``mjMAXUIEDIT``
|
||||||
- 5
|
- 5
|
||||||
- Maximum number of elements in UI edit list.
|
- Maximum number of elements in UI edit list.
|
||||||
Defined in `mjui.h <https://github.com/deepmind/mujoco/blob/main/include/mujoco/mjui.h>`_.
|
Defined in `mjui.h <https://github.com/google-deepmind/mujoco/blob/main/include/mujoco/mjui.h>`_.
|
||||||
* - ``mjMAXUIRECT``
|
* - ``mjMAXUIRECT``
|
||||||
- 15
|
- 15
|
||||||
- Maximum number of UI rectangles.
|
- Maximum number of UI rectangles.
|
||||||
Defined in `mjui.h <https://github.com/deepmind/mujoco/blob/main/include/mujoco/mjui.h>`_.
|
Defined in `mjui.h <https://github.com/google-deepmind/mujoco/blob/main/include/mujoco/mjui.h>`_.
|
||||||
* - ``mjVERSION_HEADER``
|
* - ``mjVERSION_HEADER``
|
||||||
- 238
|
- 238
|
||||||
- The version of the MuJoCo headers; changes with every release. This is an integer equal to 100x the software
|
- The version of the MuJoCo headers; changes with every release. This is an integer equal to 100x the software
|
||||||
@@ -525,6 +525,6 @@ X Macros
|
|||||||
|
|
||||||
The X Macros are not needed in most user projects. They are used internally to allocate the model, and are also
|
The X Macros are not needed in most user projects. They are used internally to allocate the model, and are also
|
||||||
available for users who know how to use this programming technique. See the header file `mjxmacro.h
|
available for users who know how to use this programming technique. See the header file `mjxmacro.h
|
||||||
<https://github.com/deepmind/mujoco/blob/main/include/mujoco/mjxmacro.h>`_ for the actual definitions. They are
|
<https://github.com/google-deepmind/mujoco/blob/main/include/mujoco/mjxmacro.h>`_ for the actual definitions. They are
|
||||||
particularly useful in writing MuJoCo wrappers for scripting languages, where dynamic structures matching the MuJoCo
|
particularly useful in writing MuJoCo wrappers for scripting languages, where dynamic structures matching the MuJoCo
|
||||||
data structures need to be constructed programmatically.
|
data structures need to be constructed programmatically.
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ MuJoCo defines a large number of types:
|
|||||||
Primitive types
|
Primitive types
|
||||||
---------------
|
---------------
|
||||||
|
|
||||||
The two types below are defined in `mjtnum.h <https://github.com/deepmind/mujoco/blob/main/include/mujoco/mjtnum.h>`_.
|
The two types below are defined in `mjtnum.h <https://github.com/google-deepmind/mujoco/blob/main/include/mujoco/mjtnum.h>`_.
|
||||||
|
|
||||||
|
|
||||||
.. _mjtNum:
|
.. _mjtNum:
|
||||||
@@ -93,7 +93,7 @@ Enum types
|
|||||||
Model
|
Model
|
||||||
^^^^^
|
^^^^^
|
||||||
|
|
||||||
The enums below are defined in `mjmodel.h <https://github.com/deepmind/mujoco/blob/main/include/mujoco/mjmodel.h>`_.
|
The enums below are defined in `mjmodel.h <https://github.com/google-deepmind/mujoco/blob/main/include/mujoco/mjmodel.h>`_.
|
||||||
|
|
||||||
|
|
||||||
.. _mjtDisableBit:
|
.. _mjtDisableBit:
|
||||||
@@ -343,7 +343,7 @@ These are the possible sensor data types, used in ``mjData.sensor_datatype``.
|
|||||||
Data
|
Data
|
||||||
^^^^
|
^^^^
|
||||||
|
|
||||||
The enums below are defined in `mjdata.h <https://github.com/deepmind/mujoco/blob/main/include/mujoco/mjdata.h>`_.
|
The enums below are defined in `mjdata.h <https://github.com/google-deepmind/mujoco/blob/main/include/mujoco/mjdata.h>`_.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -386,7 +386,7 @@ Timer types. The number of timer types is given by ``mjNTIMER`` which is also th
|
|||||||
Visualization
|
Visualization
|
||||||
^^^^^^^^^^^^^
|
^^^^^^^^^^^^^
|
||||||
|
|
||||||
The enums below are defined in `mjvisualize.h <https://github.com/deepmind/mujoco/blob/main/include/mujoco/mjvisualize.h>`_.
|
The enums below are defined in `mjvisualize.h <https://github.com/google-deepmind/mujoco/blob/main/include/mujoco/mjvisualize.h>`_.
|
||||||
|
|
||||||
|
|
||||||
.. _mjtCatBit:
|
.. _mjtCatBit:
|
||||||
@@ -490,7 +490,7 @@ These are the possible stereo rendering types. They are used in ``mjvScene.stere
|
|||||||
Rendering
|
Rendering
|
||||||
^^^^^^^^^
|
^^^^^^^^^
|
||||||
|
|
||||||
The enums below are defined in `mjrender.h <https://github.com/deepmind/mujoco/blob/main/include/mujoco/mjrender.h>`_.
|
The enums below are defined in `mjrender.h <https://github.com/google-deepmind/mujoco/blob/main/include/mujoco/mjrender.h>`_.
|
||||||
|
|
||||||
|
|
||||||
.. _mjtGridPos:
|
.. _mjtGridPos:
|
||||||
@@ -540,7 +540,7 @@ These are the possible font types.
|
|||||||
User Interface
|
User Interface
|
||||||
^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^
|
||||||
|
|
||||||
The enums below are defined in `mjui.h <https://github.com/deepmind/mujoco/blob/main/include/mujoco/mjui.h>`_.
|
The enums below are defined in `mjui.h <https://github.com/google-deepmind/mujoco/blob/main/include/mujoco/mjui.h>`_.
|
||||||
|
|
||||||
|
|
||||||
.. _mjtButton:
|
.. _mjtButton:
|
||||||
@@ -578,7 +578,7 @@ Item types used in the UI framework.
|
|||||||
Plugins
|
Plugins
|
||||||
^^^^^^^
|
^^^^^^^
|
||||||
|
|
||||||
The enums below are defined in `mjplugin.h <https://github.com/deepmind/mujoco/blob/main/include/mujoco/mjplugin.h>`_.
|
The enums below are defined in `mjplugin.h <https://github.com/google-deepmind/mujoco/blob/main/include/mujoco/mjplugin.h>`_.
|
||||||
See :ref:`exPlugin` for details.
|
See :ref:`exPlugin` for details.
|
||||||
|
|
||||||
|
|
||||||
@@ -1016,8 +1016,8 @@ Function types
|
|||||||
--------------
|
--------------
|
||||||
|
|
||||||
MuJoCo callbacks have corresponding function types. They are defined in `mjdata.h
|
MuJoCo callbacks have corresponding function types. They are defined in `mjdata.h
|
||||||
<https://github.com/deepmind/mujoco/blob/main/include/mujoco/mjdata.h>`_ and in `mjui.h
|
<https://github.com/google-deepmind/mujoco/blob/main/include/mujoco/mjdata.h>`_ and in `mjui.h
|
||||||
<https://github.com/deepmind/mujoco/blob/main/include/mujoco/mjui.h>`_. The actual callback functions are documented
|
<https://github.com/google-deepmind/mujoco/blob/main/include/mujoco/mjui.h>`_. The actual callback functions are documented
|
||||||
in the :doc:`globals<APIglobals>` page.
|
in the :doc:`globals<APIglobals>` page.
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -2635,7 +2635,7 @@ helps clarify the role of bodies and geoms in MuJoCo.
|
|||||||
|
|
||||||
The **sdf** type defines a signed distance field (SDF, also referred to as signed distance function). In order to
|
The **sdf** type defines a signed distance field (SDF, also referred to as signed distance function). In order to
|
||||||
visualize the SDF, a custom mesh must be specified using the :ref:`mesh/plugin <mesh-plugin>` attribute. See the
|
visualize the SDF, a custom mesh must be specified using the :ref:`mesh/plugin <mesh-plugin>` attribute. See the
|
||||||
`model/plugin/sdf/ <https://github.com/deepmind/mujoco/tree/main/model/plugin/sdf>`__ directory for example models
|
`model/plugin/sdf/ <https://github.com/google-deepmind/mujoco/tree/main/model/plugin/sdf>`__ directory for example models
|
||||||
with SDF geometries. For more details regarding SDF plugins, see the :ref:`Extensions chapter<exWriting>`.
|
with SDF geometries. For more details regarding SDF plugins, see the :ref:`Extensions chapter<exWriting>`.
|
||||||
|
|
||||||
.. _body-geom-contype:
|
.. _body-geom-contype:
|
||||||
@@ -4405,7 +4405,7 @@ specify them independently.
|
|||||||
When using a :at:`site` transmission, measure the translation and rotation w.r.t the frame of the :at:`refsite`. In
|
When using a :at:`site` transmission, measure the translation and rotation w.r.t the frame of the :at:`refsite`. In
|
||||||
this case the actuator *does* have length and :el:`position` actuators can be used to directly control an end
|
this case the actuator *does* have length and :el:`position` actuators can be used to directly control an end
|
||||||
effector, see `refsite.xml
|
effector, see `refsite.xml
|
||||||
<https://github.com/deepmind/mujoco/tree/main/test/engine/testdata/actuation/refsite.xml>`__ example
|
<https://github.com/google-deepmind/mujoco/tree/main/test/engine/testdata/actuation/refsite.xml>`__ example
|
||||||
model. As above, the length is the dot product of the :at:`gear` vector and the frame difference. So ``gear="0 1 0 0
|
model. As above, the length is the dot product of the :at:`gear` vector and the frame difference. So ``gear="0 1 0 0
|
||||||
0 0"`` means "Y-offset of :at:`site` in the :at:`refsite` frame", while ``gear="0 0 0 0 0 1"`` means rotation "Z-
|
0 0"`` means "Y-offset of :at:`site` in the :at:`refsite` frame", while ``gear="0 0 0 0 0 1"`` means rotation "Z-
|
||||||
rotation of :at:`site` in the :at:`refsite` frame". It is recommended to use a normalized :at:`gear` vector with
|
rotation of :at:`site` in the :at:`refsite` frame". It is recommended to use a normalized :at:`gear` vector with
|
||||||
@@ -5093,7 +5093,7 @@ This element has nine custom attributes in addition to the common attributes:
|
|||||||
|
|
||||||
This element defines an active adhesion actuator which injects forces at contacts in the normal direction, see
|
This element defines an active adhesion actuator which injects forces at contacts in the normal direction, see
|
||||||
illustration video. The model shown in the video can be found `here
|
illustration video. The model shown in the video can be found `here
|
||||||
<https://github.com/deepmind/mujoco/tree/main/model/adhesion>`_ and includes inline annotations. The transmission target
|
<https://github.com/google-deepmind/mujoco/tree/main/model/adhesion>`_ and includes inline annotations. The transmission target
|
||||||
is a :el:`body`, and adhesive forces are injected into all contacts involving geoms which belong to this body. The force
|
is a :el:`body`, and adhesive forces are injected into all contacts involving geoms which belong to this body. The force
|
||||||
is divided equally between multiple contacts. When the :at:`gap` attribute is not used, this actuator requires active
|
is divided equally between multiple contacts. When the :at:`gap` attribute is not used, this actuator requires active
|
||||||
contacts and cannot apply a force at a distance, more like the active adhesion on the feet of geckos and insects rather
|
contacts and cannot apply a force at a distance, more like the active adhesion on the feet of geckos and insects rather
|
||||||
|
|||||||
+59
-58
@@ -14,7 +14,7 @@ New features
|
|||||||
|
|
||||||
1. Added constraint island discovery in :ref:`mj_island`. Constraint islands are disjoint sets of constraints
|
1. Added constraint island discovery in :ref:`mj_island`. Constraint islands are disjoint sets of constraints
|
||||||
and degrees-of-freedom that do not interact. In a future release the constraint solver will be refactored to
|
and degrees-of-freedom that do not interact. In a future release the constraint solver will be refactored to
|
||||||
exploit the disjoint structure. Island discovery can be activated using a new :ref:`enable flag<option-flag-island>`
|
exploit this disjoint structure. Island discovery can be activated using a new :ref:`enable flag<option-flag-island>`
|
||||||
which will be removed after the refactor. If island discovery is enabled, geoms, contacts and
|
which will be removed after the refactor. If island discovery is enabled, geoms, contacts and
|
||||||
tendons will be colored according to the corresponding island, see video.
|
tendons will be colored according to the corresponding island, see video.
|
||||||
|
|
||||||
@@ -26,7 +26,7 @@ New features
|
|||||||
convex. Collision points are found by minimizing the maximum of the two colliding SDFs via gradient descent.
|
convex. Collision points are found by minimizing the maximum of the two colliding SDFs via gradient descent.
|
||||||
|
|
||||||
- Added new SDF plugin for defining implicit geometries. The plugin must define methods computing an SDF and its
|
- Added new SDF plugin for defining implicit geometries. The plugin must define methods computing an SDF and its
|
||||||
gradient at query points See the :ref:`documentation<exWriting>` for more details.
|
gradient at query points. See the :ref:`documentation<exWriting>` for more details.
|
||||||
|
|
||||||
3. Added :ref:`mjThreadPool` and :ref:`mjTask` which allow for multi-threaded operations within the MuJoCo engine
|
3. Added :ref:`mjThreadPool` and :ref:`mjTask` which allow for multi-threaded operations within the MuJoCo engine
|
||||||
pipeline.
|
pipeline.
|
||||||
@@ -62,13 +62,13 @@ General
|
|||||||
Euler integrator. See the :ref:`Numerical Integration<geIntegration>` section for more details.
|
Euler integrator. See the :ref:`Numerical Integration<geIntegration>` section for more details.
|
||||||
11. Added the flag :ref:`invdiscrete<option-flag-invdiscrete>`, which enables discrete-time inverse dynamics for all
|
11. Added the flag :ref:`invdiscrete<option-flag-invdiscrete>`, which enables discrete-time inverse dynamics for all
|
||||||
:ref:`integrators<option-integrator>` other than ``RK4``. See the flag documentation for more details.
|
:ref:`integrators<option-integrator>` other than ``RK4``. See the flag documentation for more details.
|
||||||
12. Added :ref:`ls_iterations<option-ls_iterations>` and :ref:`ls_iterations<option-ls_tolerance>` options for adjusting
|
12. Added :ref:`ls_iterations<option-ls_iterations>` and :ref:`ls_tolerance<option-ls_tolerance>` options for adjusting
|
||||||
linesearch stopping criteria in CG and Newton solvers. This can be useful for performance tuning.
|
linesearch stopping criteria in CG and Newton solvers. This can be useful for performance tuning.
|
||||||
|
|
||||||
Python bindings
|
Python bindings
|
||||||
^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
13. Fixed `#870 <https://github.com/deepmind/mujoco/issues/870>`__ where calling ``update_scene`` with an invalid
|
13. Fixed `#870 <https://github.com/google-deepmind/mujoco/issues/870>`__ where calling ``update_scene`` with an invalid
|
||||||
camera name used the default camera.
|
camera name used the default camera.
|
||||||
|
|
||||||
Bug fixes
|
Bug fixes
|
||||||
@@ -103,17 +103,18 @@ Python bindings
|
|||||||
|
|
||||||
7. The :ref:`passive viewer<PyViewerPassive>` handle now exposes ``update_hfield``, ``update_mesh``, and
|
7. The :ref:`passive viewer<PyViewerPassive>` handle now exposes ``update_hfield``, ``update_mesh``, and
|
||||||
``update_texture`` methods to allow users to update renderable assets.
|
``update_texture`` methods to allow users to update renderable assets.
|
||||||
(`#812 <https://github.com/deepmind/mujoco/issues/812>`_, `#958 <https://github.com/deepmind/mujoco/issues/958>`_,
|
(`#812 <https://github.com/google-deepmind/mujoco/issues/812>`_,
|
||||||
`#965 <https://github.com/deepmind/mujoco/issues/965>`_)
|
`#958 <https://github.com/google-deepmind/mujoco/issues/958>`_,
|
||||||
|
`#965 <https://github.com/google-deepmind/mujoco/issues/965>`_)
|
||||||
#. Allow a custom keyboard event callback to be specified in the :ref:`passive viewer<PyViewerPassive>`.
|
#. Allow a custom keyboard event callback to be specified in the :ref:`passive viewer<PyViewerPassive>`.
|
||||||
(`#766 <https://github.com/deepmind/mujoco/issues/766>`_)
|
(`#766 <https://github.com/google-deepmind/mujoco/issues/766>`_)
|
||||||
#. Fix GLFW crash when Python exits while the passive viewer is running.
|
#. Fix GLFW crash when Python exits while the passive viewer is running.
|
||||||
(`#790 <https://github.com/deepmind/mujoco/issues/790>`_)
|
(`#790 <https://github.com/google-deepmind/mujoco/issues/790>`_)
|
||||||
|
|
||||||
Models
|
Models
|
||||||
^^^^^^
|
^^^^^^
|
||||||
|
|
||||||
10. Added simple `car <https://github.com/deepmind/mujoco/blob/main/model/car/car.xml>`__ example model.
|
10. Added simple `car <https://github.com/google-deepmind/mujoco/blob/main/model/car/car.xml>`__ example model.
|
||||||
|
|
||||||
|
|
||||||
Version 2.3.6 (June 20, 2023)
|
Version 2.3.6 (June 20, 2023)
|
||||||
@@ -129,8 +130,8 @@ Version 2.3.6 (June 20, 2023)
|
|||||||
Models
|
Models
|
||||||
^^^^^^
|
^^^^^^
|
||||||
|
|
||||||
1. Added `3x3x3 cube <https://github.com/deepmind/mujoco/blob/main/model/cube/cube_3x3x3.xml>`__ example model. See
|
1. Added `3x3x3 cube <https://github.com/google-deepmind/mujoco/blob/main/model/cube/cube_3x3x3.xml>`__ example model.
|
||||||
`README <https://github.com/deepmind/mujoco/blob/main/model/cube/README.md>`__ for details.
|
See `README <https://github.com/google-deepmind/mujoco/blob/main/model/cube/README.md>`__ for details.
|
||||||
|
|
||||||
Bug fixes
|
Bug fixes
|
||||||
^^^^^^^^^
|
^^^^^^^^^
|
||||||
@@ -138,8 +139,8 @@ Bug fixes
|
|||||||
2. Fixed a bug that was causing an incorrect computation of the mesh bounding box and coordinate frame if the volume was
|
2. Fixed a bug that was causing an incorrect computation of the mesh bounding box and coordinate frame if the volume was
|
||||||
invalid. In such case, now MuJoCo only accepts a non-watertight geometry if
|
invalid. In such case, now MuJoCo only accepts a non-watertight geometry if
|
||||||
:ref:`shellinertia<body-geom-shellinertia>` is equal to ``true``.
|
:ref:`shellinertia<body-geom-shellinertia>` is equal to ``true``.
|
||||||
#. Fixed the sparse Jacobian multiplication logic that is used to compute derivatives for tendon damping and fluid force,
|
#. Fixed the sparse Jacobian multiplication logic that is used to compute derivatives for tendon damping and fluid
|
||||||
which affects the behaviour of the :ref:`implicit and implicitfast integrators<geIntegration>`.
|
force, which affects the behaviour of the :ref:`implicit and implicitfast integrators<geIntegration>`.
|
||||||
#. Fixes to :ref:`mj_ray`, in line with geom visualisation conventions:
|
#. Fixes to :ref:`mj_ray`, in line with geom visualisation conventions:
|
||||||
|
|
||||||
- Planes and height-fields respect the ``geom_group`` and ``flg_static`` arguments. Before this change, rays would
|
- Planes and height-fields respect the ``geom_group`` and ``flg_static`` arguments. Before this change, rays would
|
||||||
@@ -153,8 +154,8 @@ Bug fixes
|
|||||||
Plugins
|
Plugins
|
||||||
^^^^^^^
|
^^^^^^^
|
||||||
|
|
||||||
5. Added touch-grid sensor plugin. See `documentation <https://github.com/deepmind/mujoco/blob/main/plugin/sensor/README.md>`_
|
5. Added touch-grid sensor plugin. See `documentation <https://github.com/google-deepmind/mujoco/blob/main/plugin/sensor/README.md>`_
|
||||||
for details, and associated `touch_grid.xml <https://github.com/deepmind/mujoco/blob/main/model/plugin/sensor/touch_grid.xml>`_
|
for details, and associated `touch_grid.xml <https://github.com/google-deepmind/mujoco/blob/main/model/plugin/sensor/touch_grid.xml>`_
|
||||||
example model. The plugin includes `in-scene visualisation <https://youtu.be/0LOJ3WMnqeA>`_.
|
example model. The plugin includes `in-scene visualisation <https://youtu.be/0LOJ3WMnqeA>`_.
|
||||||
|
|
||||||
Simulate
|
Simulate
|
||||||
@@ -185,8 +186,8 @@ General
|
|||||||
#. Added :ref:`mjContact.solreffriction<mjContact>`, allowing different :ref:`solref<CSolver>` parameters for the normal
|
#. Added :ref:`mjContact.solreffriction<mjContact>`, allowing different :ref:`solref<CSolver>` parameters for the normal
|
||||||
and frictional axes of contacts when using :ref:`elliptic friction cones<option-cone>`. This attribute is required
|
and frictional axes of contacts when using :ref:`elliptic friction cones<option-cone>`. This attribute is required
|
||||||
for elastic frictional collisions, see associated
|
for elastic frictional collisions, see associated
|
||||||
`example model <https://github.com/deepmind/mujoco/blob/main/test/engine/testdata/spin_recoil.xml>`__ mimicking the
|
`example model <https://github.com/google-deepmind/mujoco/blob/main/test/engine/testdata/spin_recoil.xml>`__
|
||||||
spin-bounce recoil behaviour of `elastic rubber balls <https://www.youtube.com/watch?v=uFLJcRegIVQ&t=3s>`__.
|
mimicking the spin-bounce recoil behaviour of `elastic rubber balls <https://www.youtube.com/watch?v=uFLJcRegIVQ&t=3s>`__.
|
||||||
This is an advanced option currently only supported by explicit :ref:`contact pairs<contact-pair>`, using the
|
This is an advanced option currently only supported by explicit :ref:`contact pairs<contact-pair>`, using the
|
||||||
:ref:`solreffriction<contact-pair-solreffriction>` attribute.
|
:ref:`solreffriction<contact-pair-solreffriction>` attribute.
|
||||||
#. Added :ref:`mjd_inverseFD` for finite-differenced inverse-dynamics derivatives.
|
#. Added :ref:`mjd_inverseFD` for finite-differenced inverse-dynamics derivatives.
|
||||||
@@ -215,7 +216,7 @@ General
|
|||||||
model, within a range of width tausmooth. See :ref:`Muscle actuators<CMuscle>` for more details.
|
model, within a range of width tausmooth. See :ref:`Muscle actuators<CMuscle>` for more details.
|
||||||
Relatedly, :ref:`mju_muscleDynamics` now takes 3 parameters instead of 2, adding the new smoothing-width parameter.
|
Relatedly, :ref:`mju_muscleDynamics` now takes 3 parameters instead of 2, adding the new smoothing-width parameter.
|
||||||
#. Moved public C macro definitions out of mujoco.h into a new public header file called
|
#. Moved public C macro definitions out of mujoco.h into a new public header file called
|
||||||
`mjmacro.h <https://github.com/deepmind/mujoco/blob/main/include/mujoco/mjmacro.h>`__. The new file
|
`mjmacro.h <https://github.com/google-deepmind/mujoco/blob/main/include/mujoco/mjmacro.h>`__. The new file
|
||||||
is included by mujoco.h so this change does not break existing user code.
|
is included by mujoco.h so this change does not break existing user code.
|
||||||
#. Added instrumentation for the `Address Sanitizer (ASAN) <https://clang.llvm.org/docs/AddressSanitizer.html>`__ and
|
#. Added instrumentation for the `Address Sanitizer (ASAN) <https://clang.llvm.org/docs/AddressSanitizer.html>`__ and
|
||||||
`Memory Sanitizer (MSAN) <https://clang.llvm.org/docs/MemorySanitizer.html>`__ to detect memory bugs when allocating
|
`Memory Sanitizer (MSAN) <https://clang.llvm.org/docs/MemorySanitizer.html>`__ to detect memory bugs when allocating
|
||||||
@@ -278,8 +279,8 @@ Python bindings
|
|||||||
#. Fixed a race condition in ``viewer.launch_passive`` and ``viewer.launch_repl``. These functions could previously
|
#. Fixed a race condition in ``viewer.launch_passive`` and ``viewer.launch_repl``. These functions could previously
|
||||||
return before an internal call to ``mj_forward``. This allows user code to continue and potentially modify physics
|
return before an internal call to ``mj_forward``. This allows user code to continue and potentially modify physics
|
||||||
state concurrently with the internal ``mj_forward``, resulting in e.g.
|
state concurrently with the internal ``mj_forward``, resulting in e.g.
|
||||||
`MuJoCo stack overflow error <https://github.com/deepmind/mujoco/issues/783>`_
|
`MuJoCo stack overflow error <https://github.com/google-deepmind/mujoco/issues/783>`_
|
||||||
or `segmentation fault <https://github.com/deepmind/mujoco/issues/790>`_.
|
or `segmentation fault <https://github.com/google-deepmind/mujoco/issues/790>`_.
|
||||||
#. The ``viewer.launch_passive`` function now returns a handle which can be used to interact with the viewer. The
|
#. The ``viewer.launch_passive`` function now returns a handle which can be used to interact with the viewer. The
|
||||||
passive viewer now also requires an explicit call to ``sync`` on its handle to pick up any update to the physics
|
passive viewer now also requires an explicit call to ``sync`` on its handle to pick up any update to the physics
|
||||||
state. This is to avoid race conditions that can result in visual artifacts. See
|
state. This is to avoid race conditions that can result in visual artifacts. See
|
||||||
@@ -292,9 +293,9 @@ Bug fixes
|
|||||||
|
|
||||||
12. Fixed bug in the handling of ellipsoid-based fluid model forces in the new implicitfast integrator.
|
12. Fixed bug in the handling of ellipsoid-based fluid model forces in the new implicitfast integrator.
|
||||||
#. Removed spurious whole-arena copying in `mj_copyData`, which can considerably
|
#. Removed spurious whole-arena copying in `mj_copyData`, which can considerably
|
||||||
`slow down <https://github.com/deepmind/mujoco/issues/568>`_ the copying operation.
|
`slow down <https://github.com/google-deepmind/mujoco/issues/568>`_ the copying operation.
|
||||||
#. Make :ref:`shellinertia<body-geom-shellinertia>` ignore :ref:`exactmeshinertia<compiler-exactmeshinertia>`, which is
|
#. Make :ref:`shellinertia<body-geom-shellinertia>` ignore :ref:`exactmeshinertia<compiler-exactmeshinertia>`, which is
|
||||||
only used for legacy volume computations (`#759 <https://github.com/deepmind/mujoco/issues/759>`_).
|
only used for legacy volume computations (`#759 <https://github.com/google-deepmind/mujoco/issues/759>`_).
|
||||||
|
|
||||||
|
|
||||||
Version 2.3.3 (March 20, 2023)
|
Version 2.3.3 (March 20, 2023)
|
||||||
@@ -313,9 +314,9 @@ General
|
|||||||
become the default integrator in a future version.
|
become the default integrator in a future version.
|
||||||
|
|
||||||
The table below shows the compute cost of the 627-DoF `humanoid100
|
The table below shows the compute cost of the 627-DoF `humanoid100
|
||||||
<https://github.com/deepmind/mujoco/blob/main/model/humanoid100/humanoid100.xml>`_ model using different integrators.
|
<https://github.com/google-deepmind/mujoco/blob/main/model/humanoid100/humanoid100.xml>`_ model using different
|
||||||
"implicit (old)" uses dense RNE derivatives, "implicit (new)" is after the sparsification mentioned above.
|
integrators. "implicit (old)" uses dense RNE derivatives, "implicit (new)" is after the sparsification mentioned
|
||||||
Timings were measured on a single core of an AMD 3995WX CPU.
|
above. Timings were measured on a single core of an AMD 3995WX CPU.
|
||||||
|
|
||||||
.. csv-table::
|
.. csv-table::
|
||||||
:header: "timing", "Euler", "implicitfast", "implicit (new)", "implicit (old)"
|
:header: "timing", "Euler", "implicitfast", "implicit (new)", "implicit (old)"
|
||||||
@@ -338,8 +339,8 @@ General
|
|||||||
duplicated in order to circumvent this limitation as they previously were.
|
duplicated in order to circumvent this limitation as they previously were.
|
||||||
#. The non-zeros for the sparse constraint Jacobian matrix are now precounted and used for matrix memory allocation.
|
#. The non-zeros for the sparse constraint Jacobian matrix are now precounted and used for matrix memory allocation.
|
||||||
For instance, the constraint Jacobian matrix from the `humanoid100
|
For instance, the constraint Jacobian matrix from the `humanoid100
|
||||||
<https://github.com/deepmind/mujoco/blob/main/model/humanoid100/humanoid100.xml>`_ model, which previously required
|
<https://github.com/google-deepmind/mujoco/blob/main/model/humanoid100/humanoid100.xml>`_ model, which previously
|
||||||
~500,000 ``mjtNum``'s, now only requires ~6000. Very large models can now load and run with the CG solver.
|
required ~500,000 ``mjtNum``'s, now only requires ~6000. Very large models can now load and run with the CG solver.
|
||||||
#. Modified :ref:`mju_error` and :ref:`mju_warning` to be variadic functions (support for printf-like arguments). The
|
#. Modified :ref:`mju_error` and :ref:`mju_warning` to be variadic functions (support for printf-like arguments). The
|
||||||
functions :ref:`mju_error_i`, :ref:`mju_error_s`, :ref:`mju_warning_i`, and :ref:`mju_warning_s` are now deprecated.
|
functions :ref:`mju_error_i`, :ref:`mju_error_s`, :ref:`mju_warning_i`, and :ref:`mju_warning_s` are now deprecated.
|
||||||
#. Implemented a performant ``mju_sqrMatTDSparse`` function that doesn't require dense memory allocation.
|
#. Implemented a performant ``mju_sqrMatTDSparse`` function that doesn't require dense memory allocation.
|
||||||
@@ -386,7 +387,7 @@ General
|
|||||||
|
|
||||||
1. A more performant mju_transposeSparse has been implemented that doesn't require dense memory allocation.
|
1. A more performant mju_transposeSparse has been implemented that doesn't require dense memory allocation.
|
||||||
For a constraint Jacobian matrix from the
|
For a constraint Jacobian matrix from the
|
||||||
`humanoid100.xml <https://github.com/deepmind/mujoco/blob/main/model/humanoid100/humanoid100.xml>`_ model,
|
`humanoid100.xml <https://github.com/google-deepmind/mujoco/blob/main/model/humanoid100/humanoid100.xml>`_ model,
|
||||||
this function is 35% faster.
|
this function is 35% faster.
|
||||||
#. The function :ref:`mj_name2id` is now implemented using a hash function instead of a linear search for better
|
#. The function :ref:`mj_name2id` is now implemented using a hash function instead of a linear search for better
|
||||||
performance.
|
performance.
|
||||||
@@ -416,7 +417,7 @@ Simulate
|
|||||||
^^^^^^^^
|
^^^^^^^^
|
||||||
|
|
||||||
12. Increased precision of simulate sensor plot y-axis by 1 digit
|
12. Increased precision of simulate sensor plot y-axis by 1 digit
|
||||||
(`#719 <https://github.com/deepmind/mujoco/issues/719>`_).
|
(`#719 <https://github.com/google-deepmind/mujoco/issues/719>`_).
|
||||||
#. Body labels are now drawn at the body frame rather than inertial frame, unless inertia is being visualised.
|
#. Body labels are now drawn at the body frame rather than inertial frame, unless inertia is being visualised.
|
||||||
|
|
||||||
Plugins
|
Plugins
|
||||||
@@ -447,7 +448,7 @@ General
|
|||||||
between the two values, the force is 0. If length is outside this range, the force behaves like a regular spring, with
|
between the two values, the force is 0. If length is outside this range, the force behaves like a regular spring, with
|
||||||
the spring resting length corresponding to the nearest :at:`springlength` value. This can be used to create tendons
|
the spring resting length corresponding to the nearest :at:`springlength` value. This can be used to create tendons
|
||||||
whose limits are enforced by springs rather than constraints, which are cheaper and easier to analyse. See
|
whose limits are enforced by springs rather than constraints, which are cheaper and easier to analyse. See
|
||||||
`tendon_springlength.xml <https://github.com/deepmind/mujoco/blob/main/test/engine/testdata/tendon_springlength.xml>`_
|
`tendon_springlength.xml <https://github.com/google-deepmind/mujoco/blob/main/test/engine/testdata/tendon_springlength.xml>`_
|
||||||
example model.
|
example model.
|
||||||
|
|
||||||
.. attention::
|
.. attention::
|
||||||
@@ -461,22 +462,22 @@ General
|
|||||||
#. Removed the requirement that stateless actuators come before stateful actuators.
|
#. Removed the requirement that stateless actuators come before stateful actuators.
|
||||||
#. Added :ref:`mju_fill`, :ref:`mju_symmetrize` and :ref:`mju_eye` utility functions.
|
#. Added :ref:`mju_fill`, :ref:`mju_symmetrize` and :ref:`mju_eye` utility functions.
|
||||||
#. Added :at:`gravcomp` attribute to :ref:`body<body>`, implementing gravity compensation and buoyancy.
|
#. Added :at:`gravcomp` attribute to :ref:`body<body>`, implementing gravity compensation and buoyancy.
|
||||||
See `balloons.xml <https://github.com/deepmind/mujoco/blob/main/model/balloons/balloons.xml>`_ example model.
|
See `balloons.xml <https://github.com/google-deepmind/mujoco/blob/main/model/balloons/balloons.xml>`_ example model.
|
||||||
#. Renamed the ``cable`` plugin library to ``elasticity``.
|
#. Renamed the ``cable`` plugin library to ``elasticity``.
|
||||||
#. Added :at:`actdim` attribute to :ref:`general actuators<actuator-general>`. Values greater than 1 are only allowed
|
#. Added :at:`actdim` attribute to :ref:`general actuators<actuator-general>`. Values greater than 1 are only allowed
|
||||||
for dyntype :at-val:`user`, as native activation dynamics are all scalar. Added example test implementing 2nd-order
|
for dyntype :at-val:`user`, as native activation dynamics are all scalar. Added example test implementing 2nd-order
|
||||||
activation dynamics to
|
activation dynamics to
|
||||||
`engine_forward_test.cc <https://github.com/deepmind/mujoco/blob/main/test/engine/engine_forward_test.cc>`_.
|
`engine_forward_test.cc <https://github.com/google-deepmind/mujoco/blob/main/test/engine/engine_forward_test.cc>`_.
|
||||||
#. Improved particle :ref:`composite<body-composite>` type, which now permits a user-specified geometry and multiple
|
#. Improved particle :ref:`composite<body-composite>` type, which now permits a user-specified geometry and multiple
|
||||||
joints. See the two new examples:
|
joints. See the two new examples:
|
||||||
`particle_free.xml <https://github.com/deepmind/mujoco/blob/main/model/composite/particle_free.xml>`_ and
|
`particle_free.xml <https://github.com/google-deepmind/mujoco/blob/main/model/composite/particle_free.xml>`_ and
|
||||||
`particle_free2d.xml <https://github.com/deepmind/mujoco/blob/main/model/composite/particle_free2d.xml>`_.
|
`particle_free2d.xml <https://github.com/google-deepmind/mujoco/blob/main/model/composite/particle_free2d.xml>`_.
|
||||||
#. Performance improvements for non-AVX configurations:
|
#. Performance improvements for non-AVX configurations:
|
||||||
|
|
||||||
- 14% faster ``mj_solveLD`` using `restrict <https://en.wikipedia.org/wiki/Restrict>`_. See `engine_core_smooth_benchmark_test
|
- 14% faster ``mj_solveLD`` using `restrict <https://en.wikipedia.org/wiki/Restrict>`_. See `engine_core_smooth_benchmark_test
|
||||||
<https://github.com/deepmind/mujoco/blob/main/test/benchmark/engine_core_smooth_benchmark_test.cc>`_.
|
<https://github.com/google-deepmind/mujoco/blob/main/test/benchmark/engine_core_smooth_benchmark_test.cc>`_.
|
||||||
- 50% faster ``mju_dotSparse`` using manual loop unroll. See `engine_util_sparse_benchmark_test
|
- 50% faster ``mju_dotSparse`` using manual loop unroll. See `engine_util_sparse_benchmark_test
|
||||||
<https://github.com/deepmind/mujoco/blob/main/test/benchmark/engine_util_sparse_benchmark_test.cc>`_.
|
<https://github.com/google-deepmind/mujoco/blob/main/test/benchmark/engine_util_sparse_benchmark_test.cc>`_.
|
||||||
#. Added new :at:`solid` passive force plugin:
|
#. Added new :at:`solid` passive force plugin:
|
||||||
|
|
||||||
.. youtube:: AGcTGHbbze4
|
.. youtube:: AGcTGHbbze4
|
||||||
@@ -585,12 +586,12 @@ General
|
|||||||
|
|
||||||
- Twist and bending stiffness can be set separately with the parameters :at:`twist` and :at:`bend`.
|
- Twist and bending stiffness can be set separately with the parameters :at:`twist` and :at:`bend`.
|
||||||
- The stress-free configuration can be set to be the initial one or flat with the flag :at:`flat`.
|
- The stress-free configuration can be set to be the initial one or flat with the flag :at:`flat`.
|
||||||
- New `cable.xml <https://github.com/deepmind/mujoco/blob/main/model/plugin/elasticity/cable.xml>`_ example showing
|
- New `cable.xml <https://github.com/google-deepmind/mujoco/blob/main/model/plugin/elasticity/cable.xml>`_ example
|
||||||
the formation of plectoneme.
|
showing the formation of plectoneme.
|
||||||
- New `coil.xml <https://github.com/deepmind/mujoco/blob/main/model/plugin/elasticity/coil.xml>`_ example showing a
|
- New `coil.xml <https://github.com/google-deepmind/mujoco/blob/main/model/plugin/elasticity/coil.xml>`_ example
|
||||||
curved equilibrium configuration.
|
showing a curved equilibrium configuration.
|
||||||
- New `belt.xml <https://github.com/deepmind/mujoco/blob/main/model/plugin/elasticity/belt.xml>`_ example showing
|
- New `belt.xml <https://github.com/google-deepmind/mujoco/blob/main/model/plugin/elasticity/belt.xml>`_ example
|
||||||
interaction between twist and anisotropy.
|
showing interaction between twist and anisotropy.
|
||||||
- Added test using cantilever exact solution.
|
- Added test using cantilever exact solution.
|
||||||
|
|
||||||
+--------------------------+--------------------------+--------------------------+
|
+--------------------------+--------------------------+--------------------------+
|
||||||
@@ -609,7 +610,7 @@ Python bindings
|
|||||||
an iterator without needing to check ``ncon``.
|
an iterator without needing to check ``ncon``.
|
||||||
|
|
||||||
#. Fix a memory leak when a Python callable is installed as callback
|
#. Fix a memory leak when a Python callable is installed as callback
|
||||||
(`#527 <https://github.com/deepmind/mujoco/issues/527>`_).
|
(`#527 <https://github.com/google-deepmind/mujoco/issues/527>`_).
|
||||||
|
|
||||||
|
|
||||||
Version 2.2.2 (September 7, 2022)
|
Version 2.2.2 (September 7, 2022)
|
||||||
@@ -623,7 +624,7 @@ General
|
|||||||
:height: 150px
|
:height: 150px
|
||||||
|
|
||||||
1. Added :ref:`adhesion actuators<actuator-adhesion>` mimicking vacuum grippers and adhesive biomechanical appendages.
|
1. Added :ref:`adhesion actuators<actuator-adhesion>` mimicking vacuum grippers and adhesive biomechanical appendages.
|
||||||
#. Added related `example model <https://github.com/deepmind/mujoco/tree/main/model/adhesion>`_ and video:
|
#. Added related `example model <https://github.com/google-deepmind/mujoco/tree/main/model/adhesion>`_ and video:
|
||||||
#. Added :ref:`mj_jacSubtreeCom` for computing the translational Jacobian of the center-of-mass of a subtree.
|
#. Added :ref:`mj_jacSubtreeCom` for computing the translational Jacobian of the center-of-mass of a subtree.
|
||||||
#. Added :at:`torquescale` and :at:`anchor` attributes to :el:`weld` constraints. :at:`torquescale` sets the
|
#. Added :at:`torquescale` and :at:`anchor` attributes to :el:`weld` constraints. :at:`torquescale` sets the
|
||||||
torque-to-force ratio exerted by the constraint, :at:`anchor` sets the point at which the weld wrench is
|
torque-to-force ratio exerted by the constraint, :at:`anchor` sets the point at which the weld wrench is
|
||||||
@@ -631,8 +632,8 @@ General
|
|||||||
#. Increased ``mjNEQDATA``, the row length of equality constraint parameters in ``mjModel.eq_data``, from 7 to 11.
|
#. Increased ``mjNEQDATA``, the row length of equality constraint parameters in ``mjModel.eq_data``, from 7 to 11.
|
||||||
#. Added visualisation of anchor points for both :el:`connect` and :el:`weld` constraints (activated by the 'N' key in
|
#. Added visualisation of anchor points for both :el:`connect` and :el:`weld` constraints (activated by the 'N' key in
|
||||||
``simulate``).
|
``simulate``).
|
||||||
#. Added `weld.xml <https://github.com/deepmind/mujoco/blob/main/test/engine/testdata/weld.xml>`_ showing different
|
#. Added `weld.xml <https://github.com/google-deepmind/mujoco/blob/main/test/engine/testdata/weld.xml>`_ showing
|
||||||
uses of new weld attributes.
|
different uses of new weld attributes.
|
||||||
|
|
||||||
.. youtube:: s-0JHanqV1A
|
.. youtube:: s-0JHanqV1A
|
||||||
:align: right
|
:align: right
|
||||||
@@ -640,8 +641,8 @@ General
|
|||||||
|
|
||||||
#. Cartesian 6D end-effector control is now possible by adding a reference site to actuators with :at:`site`
|
#. Cartesian 6D end-effector control is now possible by adding a reference site to actuators with :at:`site`
|
||||||
transmission. See description of new :at:`refsite` attribute in the :ref:`actuator<actuator-general>` documentation
|
transmission. See description of new :at:`refsite` attribute in the :ref:`actuator<actuator-general>` documentation
|
||||||
and `refsite.xml <https://github.com/deepmind/mujoco/blob/main/test/engine/testdata/actuation/refsite.xml>`_ example
|
and `refsite.xml <https://github.com/google-deepmind/mujoco/blob/main/test/engine/testdata/actuation/refsite.xml>`_
|
||||||
model.
|
example model.
|
||||||
|
|
||||||
#. Added :at:`autolimits` compiler option. If ``true``, joint and tendon :at:`limited` attributes and actuator
|
#. Added :at:`autolimits` compiler option. If ``true``, joint and tendon :at:`limited` attributes and actuator
|
||||||
:at:`ctrllimited`, :at:`forcelimited` and :at:`actlimited` attributes will automatically be set to ``true`` if the
|
:at:`ctrllimited`, :at:`forcelimited` and :at:`actlimited` attributes will automatically be set to ``true`` if the
|
||||||
@@ -667,7 +668,7 @@ General
|
|||||||
:height: 150px
|
:height: 150px
|
||||||
|
|
||||||
#. Added catenary visualisation for hanging tendons. The model seen in the video can be found
|
#. Added catenary visualisation for hanging tendons. The model seen in the video can be found
|
||||||
`here <https://github.com/deepmind/mujoco/blob/main/test/engine/testdata/catenary.xml>`_.
|
`here <https://github.com/google-deepmind/mujoco/blob/main/test/engine/testdata/catenary.xml>`_.
|
||||||
#. Added ``azimuth`` and ``elevation`` attributes to :ref:`visual/global<visual-global>`, defining the initial
|
#. Added ``azimuth`` and ``elevation`` attributes to :ref:`visual/global<visual-global>`, defining the initial
|
||||||
orientation of the free camera at model load time.
|
orientation of the free camera at model load time.
|
||||||
#. Added ``mjv_defaultFreeCamera`` which sets the default free camera, respecting the above attributes.
|
#. Added ``mjv_defaultFreeCamera`` which sets the default free camera, respecting the above attributes.
|
||||||
@@ -715,7 +716,7 @@ General
|
|||||||
and `Memory Sanitizer (MSAN) <https://clang.llvm.org/docs/MemorySanitizer.html>`__. This allows ASAN to
|
and `Memory Sanitizer (MSAN) <https://clang.llvm.org/docs/MemorySanitizer.html>`__. This allows ASAN to
|
||||||
detect reads and writes to regions in ``mjModel.buffer`` and ``mjData.buffer`` that do not lie within an array, and
|
detect reads and writes to regions in ``mjModel.buffer`` and ``mjData.buffer`` that do not lie within an array, and
|
||||||
for MSAN to detect reads from uninitialised fields in ``mjData`` following ``mj_resetData``.
|
for MSAN to detect reads from uninitialised fields in ``mjData`` following ``mj_resetData``.
|
||||||
#. Added a `slider-crank example model <https://github.com/deepmind/mujoco/tree/main/model/slider_crank>`_.
|
#. Added a `slider-crank example model <https://github.com/google-deepmind/mujoco/tree/main/model/slider_crank>`_.
|
||||||
|
|
||||||
Bug fixes
|
Bug fixes
|
||||||
^^^^^^^^^
|
^^^^^^^^^
|
||||||
@@ -761,8 +762,8 @@ Open Sourcing
|
|||||||
|
|
||||||
c. ``dist/``: Files related to packaging and binary distribution.
|
c. ``dist/``: Files related to packaging and binary distribution.
|
||||||
|
|
||||||
#. Added `contributor's guide <https://github.com/deepmind/mujoco/blob/main/CONTRIBUTING.md>`_ and
|
#. Added `contributor's guide <https://github.com/google-deepmind/mujoco/blob/main/CONTRIBUTING.md>`_ and
|
||||||
`style guide <https://github.com/deepmind/mujoco/blob/main/STYLEGUIDE.md>`_.
|
`style guide <https://github.com/google-deepmind/mujoco/blob/main/STYLEGUIDE.md>`_.
|
||||||
|
|
||||||
General
|
General
|
||||||
^^^^^^^
|
^^^^^^^
|
||||||
@@ -893,7 +894,7 @@ Bug fixes
|
|||||||
^^^^^^^^^
|
^^^^^^^^^
|
||||||
|
|
||||||
5. Fixed rendering bug for planes, introduced in 2.1.2. This broke maze environments in
|
5. Fixed rendering bug for planes, introduced in 2.1.2. This broke maze environments in
|
||||||
`dm_control <https://github.com/deepmind/dm_control>`_.
|
`dm_control <https://github.com/google-deepmind/dm_control>`_.
|
||||||
|
|
||||||
|
|
||||||
Version 2.1.2 (Mar. 15, 2022)
|
Version 2.1.2 (Mar. 15, 2022)
|
||||||
@@ -914,7 +915,7 @@ API changes
|
|||||||
^^^^^^^^^^^
|
^^^^^^^^^^^
|
||||||
|
|
||||||
4. Moved definition of ``mjtNum`` floating point type into a new header
|
4. Moved definition of ``mjtNum`` floating point type into a new header
|
||||||
`mjtnum.h <https://github.com/deepmind/mujoco/blob/3577e2cf8bf841475b489aefff52276a39f24d51/include/mjtnum.h>`_.
|
`mjtnum.h <https://github.com/google-deepmind/mujoco/blob/3577e2cf8bf841475b489aefff52276a39f24d51/include/mjtnum.h>`_.
|
||||||
#. Renamed header `mujoco_export.h` to :ref:`mjexport.h<inHeader>`.
|
#. Renamed header `mujoco_export.h` to :ref:`mjexport.h<inHeader>`.
|
||||||
#. Added ``mj_printFormattedData``, which accepts a format string for floating point numbers, for example to increase
|
#. Added ``mj_printFormattedData``, which accepts a format string for floating point numbers, for example to increase
|
||||||
precision.
|
precision.
|
||||||
@@ -927,7 +928,7 @@ General
|
|||||||
a. Meshes containing polygons with more than 4 vertices are not supported.
|
a. Meshes containing polygons with more than 4 vertices are not supported.
|
||||||
#. In OBJ files containing multiple object groups, any groups after the first one will be ignored.
|
#. In OBJ files containing multiple object groups, any groups after the first one will be ignored.
|
||||||
#. Added (post-release, not included in the 2.1.2 archive) textured
|
#. Added (post-release, not included in the 2.1.2 archive) textured
|
||||||
`mug <https://github.com/deepmind/mujoco/blob/main/model/mug/mug.xml>`_ example model:
|
`mug <https://github.com/google-deepmind/mujoco/blob/main/model/mug/mug.xml>`_ example model:
|
||||||
|
|
||||||
.. image:: images/changelog/mug.png
|
.. image:: images/changelog/mug.png
|
||||||
:width: 300px
|
:width: 300px
|
||||||
@@ -1108,8 +1109,8 @@ General
|
|||||||
#. Fixed: The array of sensors in ``mjCModel`` was not cleared.
|
#. Fixed: The array of sensors in ``mjCModel`` was not cleared.
|
||||||
#. Cleaned up cross-platform code (internal changes, not visible via the API).
|
#. Cleaned up cross-platform code (internal changes, not visible via the API).
|
||||||
#. Fixed a bug in parsing of XML ``texcoord`` data (related to number of vertices).
|
#. Fixed a bug in parsing of XML ``texcoord`` data (related to number of vertices).
|
||||||
#. Fixed a bug in `simulate.cc <https://github.com/deepmind/mujoco/blob/main/simulate/simulate.cc>`_ related to ``nkey``
|
#. Fixed a bug in `simulate.cc <https://github.com/google-deepmind/mujoco/blob/main/simulate/simulate.cc>`_ related to
|
||||||
(the number of keyframes).
|
``nkey`` (the number of keyframes).
|
||||||
#. Accelerated collision detection in the presence of large numbers of non-colliding geoms (with ``contype==0 and
|
#. Accelerated collision detection in the presence of large numbers of non-colliding geoms (with ``contype==0 and
|
||||||
conaffinity==0``).
|
conaffinity==0``).
|
||||||
|
|
||||||
|
|||||||
+4
-4
@@ -278,9 +278,9 @@ is attached; the possible attachment object types are :at:`joint`, :at:`tendon`,
|
|||||||
:at:`slider-crank`
|
:at:`slider-crank`
|
||||||
:at:`slider-crank` `transmissions <https://en.wikipedia.org/wiki/Slider-crank_linkage>`_ transform a linear force to
|
:at:`slider-crank` `transmissions <https://en.wikipedia.org/wiki/Slider-crank_linkage>`_ transform a linear force to
|
||||||
a torque, as in a piston-driven combustion engine. `This model
|
a torque, as in a piston-driven combustion engine. `This model
|
||||||
<https://github.com/deepmind/mujoco/tree/main/model/slider_crank>`_ contains pedagogical examples. Slider-cranks can
|
<https://github.com/google-deepmind/mujoco/tree/main/model/slider_crank>`_ contains pedagogical examples.
|
||||||
also be modeled explicitly by creating MuJoCo bodies and coupling them with equality constraints to the rest of the
|
Slider-cranks can also be modeled explicitly by creating MuJoCo bodies and coupling them with equality constraints to
|
||||||
system, but that would be less efficient.
|
the rest of the system, but that would be less efficient.
|
||||||
|
|
||||||
:at:`site`
|
:at:`site`
|
||||||
:at:`site` transmission (without a :at:`refsite`, see below) and :at:`body` transmission targets have a fixed zero
|
:at:`site` transmission (without a :at:`refsite`, see below) and :at:`body` transmission targets have a fixed zero
|
||||||
@@ -573,7 +573,7 @@ Fast implicit-in-velocity (``implicitfast``)
|
|||||||
<https://en.wikipedia.org/wiki/Runge–Kutta_methods#Derivation_of_the_Runge–Kutta_fourth-order_method>`_, though users
|
<https://en.wikipedia.org/wiki/Runge–Kutta_methods#Derivation_of_the_Runge–Kutta_fourth-order_method>`_, though users
|
||||||
can easily implement other integrators by calling :ref:`mj_forward` and integrating accelerations themselves. We have
|
can easily implement other integrators by calling :ref:`mj_forward` and integrating accelerations themselves. We have
|
||||||
observed that for energy-conserving systems (`example
|
observed that for energy-conserving systems (`example
|
||||||
<https://github.com/deepmind/mujoco/blob/main/test/engine/testdata/derivative/energy_conserving_pendulum.xml>`_) RK4
|
<https://github.com/google-deepmind/mujoco/blob/main/test/engine/testdata/derivative/energy_conserving_pendulum.xml>`_) RK4
|
||||||
is qualitatively better than the single-step methods, both in terms of stability and accuracy, even when the timestep
|
is qualitatively better than the single-step methods, both in terms of stability and accuracy, even when the timestep
|
||||||
is decreased by a factor of 4 (so the computational effort is identical). In the presence of large velocity-
|
is decreased by a factor of 4 (so the computational effort is identical). In the presence of large velocity-
|
||||||
dependent forces, if the chosen single-step method integrates those forces implicitly, single-step methods can be
|
dependent forces, if the chosen single-step method integrates those forces implicitly, single-step methods can be
|
||||||
|
|||||||
+3
-3
@@ -617,12 +617,12 @@ Force clamping at joint input with :ref:`joint/actuatorfrcrange<body-joint-actua
|
|||||||
actuator:
|
actuator:
|
||||||
|
|
||||||
- In `this example model
|
- In `this example model
|
||||||
<https://github.com/deepmind/mujoco/blob/main/test/engine/testdata/actuation/joint_force_clamp.xml>`__ ,
|
<https://github.com/google-deepmind/mujoco/blob/main/test/engine/testdata/actuation/joint_force_clamp.xml>`__ ,
|
||||||
two actuators, a :ref:`motor<actuator-motor>` and a :ref:`damper<actuator-damper>`, act on a single joint.
|
two actuators, a :ref:`motor<actuator-motor>` and a :ref:`damper<actuator-damper>`, act on a single joint.
|
||||||
- In `this example model <https://github.com/deepmind/mujoco/blob/main/model/car/car.xml>`__ (similar to a "Dubin's
|
- In `this example model <https://github.com/google-deepmind/mujoco/blob/main/model/car/car.xml>`__ (similar to a "Dubin's
|
||||||
Car"), two actuators act on two wheels via a :ref:`fixed tendon<tendon-fixed>` transmission in order to apply
|
Car"), two actuators act on two wheels via a :ref:`fixed tendon<tendon-fixed>` transmission in order to apply
|
||||||
symmetric (roll forward/back) and antisymmetric (turn right/left) torques.
|
symmetric (roll forward/back) and antisymmetric (turn right/left) torques.
|
||||||
- In `this example model <https://github.com/deepmind/mujoco/tree/main/test/engine/testdata/actuation/refsite.xml>`__,
|
- In `this example model <https://github.com/google-deepmind/mujoco/tree/main/test/engine/testdata/actuation/refsite.xml>`__,
|
||||||
a :ref:`site transmission<actuator-general-refsite>` implements a Cartesian controller of an arm end-effector.
|
a :ref:`site transmission<actuator-general-refsite>` implements a Cartesian controller of an arm end-effector.
|
||||||
In order for the computed torques to be realisable by individual, torque-limited joint motors, they need to be
|
In order for the computed torques to be realisable by individual, torque-limited joint motors, they need to be
|
||||||
clamped at the joints.
|
clamped at the joints.
|
||||||
|
|||||||
+9
-9
@@ -10,7 +10,7 @@ MuJoCo Menagerie
|
|||||||
Menagerie is a collection of high-quality simulation models for MuJoCo, curated
|
Menagerie is a collection of high-quality simulation models for MuJoCo, curated
|
||||||
by Google DeepMind.
|
by Google DeepMind.
|
||||||
|
|
||||||
For more information, visit the `Menagerie repository <https://github.com/deepmind/mujoco_menagerie>`__.
|
For more information, visit the `Menagerie repository <https://github.com/google-deepmind/mujoco_menagerie>`__.
|
||||||
|
|
||||||
Bipeds & Quadrupeds
|
Bipeds & Quadrupeds
|
||||||
^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^
|
||||||
@@ -20,13 +20,13 @@ Bipeds & Quadrupeds
|
|||||||
|
|
||||||
* - Model
|
* - Model
|
||||||
- Preview
|
- Preview
|
||||||
* - `Agility Cassie <https://github.com/deepmind/mujoco_menagerie/tree/main/agility_cassie>`_
|
* - `Agility Cassie <https://github.com/google-deepmind/mujoco_menagerie/tree/main/agility_cassie>`_
|
||||||
- .. youtube:: rcdsAdwNhtc
|
- .. youtube:: rcdsAdwNhtc
|
||||||
* - `Unitree A1 <https://github.com/deepmind/mujoco_menagerie/tree/main/unitree_a1>`_
|
* - `Unitree A1 <https://github.com/google-deepmind/mujoco_menagerie/tree/main/unitree_a1>`_
|
||||||
- .. youtube:: paQMrMtnTtc
|
- .. youtube:: paQMrMtnTtc
|
||||||
* - `Anybotics ANYmal B <https://github.com/deepmind/mujoco_menagerie/tree/main/anybotics_anymal_b>`_
|
* - `Anybotics ANYmal B <https://github.com/google-deepmind/mujoco_menagerie/tree/main/anybotics_anymal_b>`_
|
||||||
- .. youtube:: fRHau-PMGgM
|
- .. youtube:: fRHau-PMGgM
|
||||||
* - `Anybotics ANYmal C <https://github.com/deepmind/mujoco_menagerie/tree/main/anybotics_anymal_c>`_
|
* - `Anybotics ANYmal C <https://github.com/google-deepmind/mujoco_menagerie/tree/main/anybotics_anymal_c>`_
|
||||||
- .. youtube:: v04uJWBLwFQ
|
- .. youtube:: v04uJWBLwFQ
|
||||||
|
|
||||||
Grippers & Hands
|
Grippers & Hands
|
||||||
@@ -37,9 +37,9 @@ Grippers & Hands
|
|||||||
|
|
||||||
* - Model
|
* - Model
|
||||||
- Preview
|
- Preview
|
||||||
* - `Shadow E3M5 <https://github.com/deepmind/mujoco_menagerie/tree/main/shadow_hand>`_
|
* - `Shadow E3M5 <https://github.com/google-deepmind/mujoco_menagerie/tree/main/shadow_hand>`_
|
||||||
- .. youtube:: wi_zJzRm8Ic
|
- .. youtube:: wi_zJzRm8Ic
|
||||||
* - `Robotiq 2F-85 <https://github.com/deepmind/mujoco_menagerie/tree/main/robotiq_2f85>`_
|
* - `Robotiq 2F-85 <https://github.com/google-deepmind/mujoco_menagerie/tree/main/robotiq_2f85>`_
|
||||||
- .. youtube:: yYm9fLj32Xw
|
- .. youtube:: yYm9fLj32Xw
|
||||||
|
|
||||||
Arms
|
Arms
|
||||||
@@ -50,8 +50,8 @@ Arms
|
|||||||
|
|
||||||
* - Model
|
* - Model
|
||||||
- Preview
|
- Preview
|
||||||
* - `Franka Emika Panda <https://github.com/deepmind/mujoco_menagerie/tree/main/franka_emika_panda>`_
|
* - `Franka Emika Panda <https://github.com/google-deepmind/mujoco_menagerie/tree/main/franka_emika_panda>`_
|
||||||
- .. youtube:: H5zSrWcJlGs
|
- .. youtube:: H5zSrWcJlGs
|
||||||
* - `Universal Robots UR5e <https://github.com/deepmind/mujoco_menagerie/tree/main/universal_robots_ur5e>`_
|
* - `Universal Robots UR5e <https://github.com/google-deepmind/mujoco_menagerie/tree/main/universal_robots_ur5e>`_
|
||||||
- .. youtube:: gAqwNeY0juo
|
- .. youtube:: gAqwNeY0juo
|
||||||
|
|
||||||
|
|||||||
+6
-5
@@ -8,8 +8,9 @@ Introduction
|
|||||||
aims to facilitate research and development in robotics, biomechanics, graphics and animation, machine learning, and
|
aims to facilitate research and development in robotics, biomechanics, graphics and animation, machine learning, and
|
||||||
other areas that demand fast and accurate simulation of articulated structures interacting with their environment.
|
other areas that demand fast and accurate simulation of articulated structures interacting with their environment.
|
||||||
Initially developed by Roboti LLC, it was acquired and made `freely available
|
Initially developed by Roboti LLC, it was acquired and made `freely available
|
||||||
<https://github.com/deepmind/mujoco/blob/main/LICENSE>`__ by DeepMind in October 2021, and open sourced in May 2022.
|
<https://github.com/google-deepmind/mujoco/blob/main/LICENSE>`__ by DeepMind in October 2021, and open sourced in May
|
||||||
The MuJoCo codebase is available at the `deepmind/mujoco <https://github.com/deepmind/mujoco>`__ repository on GitHub.
|
2022. The MuJoCo codebase is available at the `deepmind/mujoco <https://github.com/google-deepmind/mujoco>`__ repository
|
||||||
|
on GitHub.
|
||||||
|
|
||||||
MuJoCo is a C/C++ library with a C API, intended for researchers and developers. The runtime simulation module is tuned
|
MuJoCo is a C/C++ library with a C API, intended for researchers and developers. The runtime simulation module is tuned
|
||||||
to maximize performance and operates on low-level data structures which are preallocated by the built-in XML parser and
|
to maximize performance and operates on low-level data structures which are preallocated by the built-in XML parser and
|
||||||
@@ -788,9 +789,9 @@ first, followed by the limits of the second joint etc. This ordering reflects th
|
|||||||
row-major format.
|
row-major format.
|
||||||
|
|
||||||
The available element types are defined in `mjmodel.h
|
The available element types are defined in `mjmodel.h
|
||||||
<https://github.com/deepmind/mujoco/blob/main/include/mujoco/mjmodel.h#L243>`_, in the enum type :ref:`mjtObj`. These
|
<https://github.com/google-deepmind/mujoco/blob/main/include/mujoco/mjmodel.h#L243>`_, in the enum type :ref:`mjtObj`.
|
||||||
enums are mostly used internally. One exception are the functions :ref:`mj_name2id` and :ref:`mj_id2name` in the MuJoCo
|
These enums are mostly used internally. One exception are the functions :ref:`mj_name2id` and :ref:`mj_id2name` in the
|
||||||
API, which map element names to integer ids and vice versa. These functions take an element type as input.
|
MuJoCo API, which map element names to integer ids and vice versa. These functions take an element type as input.
|
||||||
|
|
||||||
Naming model elements in the XML is optional. Two elements of the same type (e.g. two joints) cannot have the same name.
|
Naming model elements in the XML is optional. Two elements of the same type (e.g. two joints) cannot have the same name.
|
||||||
Naming is required only when a given element needs to be referenced elsewhere in the model; referencing in the XML can
|
Naming is required only when a given element needs to be referenced elsewhere in the model; referencing in the XML can
|
||||||
|
|||||||
@@ -237,8 +237,8 @@ Writing plugins
|
|||||||
|
|
||||||
This section, targeted at developers, is incomplete. We encourage people who wish to write their own plugins
|
This section, targeted at developers, is incomplete. We encourage people who wish to write their own plugins
|
||||||
to contact the MuJoCo development team for help. A good starting point for experienced developers is the
|
to contact the MuJoCo development team for help. A good starting point for experienced developers is the
|
||||||
`associated tests <https://github.com/deepmind/mujoco/blob/main/test/engine/engine_plugin_test.cc>`_ and the first-party
|
`associated tests <https://github.com/google-deepmind/mujoco/blob/main/test/engine/engine_plugin_test.cc>`_ and the
|
||||||
plugins in the `first-party plugin directory <https://github.com/deepmind/mujoco/tree/main/plugin>`_.
|
first-party plugins in the `first-party plugin directory <https://github.com/google-deepmind/mujoco/tree/main/plugin>`_.
|
||||||
|
|
||||||
A future version of this section will include:
|
A future version of this section will include:
|
||||||
|
|
||||||
@@ -250,19 +250,19 @@ A future version of this section will include:
|
|||||||
|
|
||||||
Currently, there are three directories of first-party plugins:
|
Currently, there are three directories of first-party plugins:
|
||||||
|
|
||||||
* **elasticity:** The plugins in the `elasticity/ <https://github.com/deepmind/mujoco/tree/main/plugin/elasticity>`__
|
* **elasticity:** The plugins in the `elasticity/ <https://github.com/google-deepmind/mujoco/tree/main/plugin/elasticity>`__
|
||||||
directory are passive forces based on continuum mechanics for 1-dimensional and 3-dimensional bodies. The
|
directory are passive forces based on continuum mechanics for 1-dimensional and 3-dimensional bodies. The
|
||||||
1D model is invariant under rotations and captures the large deformation of elastic cables, decoupling twisting and
|
1D model is invariant under rotations and captures the large deformation of elastic cables, decoupling twisting and
|
||||||
bending strains. The 3D solid is a
|
bending strains. The 3D solid is a
|
||||||
`Saint Venant-Kirchhoff <https://en.wikipedia.org/wiki/Hyperelastic_material#Saint_Venant%E2%80%93Kirchhoff_model>`__
|
`Saint Venant-Kirchhoff <https://en.wikipedia.org/wiki/Hyperelastic_material#Saint_Venant%E2%80%93Kirchhoff_model>`__
|
||||||
model discretized with piecewise linear finite elements, which is suitable for large deformations with small strains.
|
model discretized with piecewise linear finite elements, which is suitable for large deformations with small strains.
|
||||||
* **sensor:** The plugins in the `sensor/ <https://github.com/deepmind/mujoco/tree/main/plugin/sensor>`__
|
* **sensor:** The plugins in the `sensor/ <https://github.com/google-deepmind/mujoco/tree/main/plugin/sensor>`__
|
||||||
directory implement custom sensors. Currently the sole sensor plugin is the touch grid sensor, see the
|
directory implement custom sensors. Currently the sole sensor plugin is the touch grid sensor, see the
|
||||||
`README <https://github.com/deepmind/mujoco/blob/main/plugin/sensor/README.md>`__ for details.
|
`README <https://github.com/google-deepmind/mujoco/blob/main/plugin/sensor/README.md>`__ for details.
|
||||||
* **sdf:** The plugins in the `sdf/ <https://github.com/deepmind/mujoco/tree/main/plugin/sdf>`__
|
* **sdf:** The plugins in the `sdf/ <https://github.com/google-deepmind/mujoco/tree/main/plugin/sdf>`__
|
||||||
directory specify custom shapes in a mesh-free manner, by defining methods computing a signed distance field and its
|
directory specify custom shapes in a mesh-free manner, by defining methods computing a signed distance field and its
|
||||||
gradient at query points. This shape then acts as a new geom type in the collision table at the top of
|
gradient at query points. This shape then acts as a new geom type in the collision table at the top of
|
||||||
`engine_collision_driver.c <https://github.com/deepmind/mujoco/blob/main/src/engine/engine_collision_driver.c>`__.
|
`engine_collision_driver.c <https://github.com/google-deepmind/mujoco/blob/main/src/engine/engine_collision_driver.c>`__.
|
||||||
|
|
||||||
Collision points are found by minimizing the maximum of the two colliding SDFs via gradient descent.
|
Collision points are found by minimizing the maximum of the two colliding SDFs via gradient descent.
|
||||||
Because SDFs are non-convex, multiple starting points are required in order to converge to multiple local minima.
|
Because SDFs are non-convex, multiple starting points are required in order to converge to multiple local minima.
|
||||||
|
|||||||
+21
-20
@@ -46,8 +46,8 @@ Getting started
|
|||||||
|
|
||||||
MuJoCo is an open-source project. Pre-built dynamic libraries are available for x86_64 and arm64 machines running
|
MuJoCo is an open-source project. Pre-built dynamic libraries are available for x86_64 and arm64 machines running
|
||||||
Windows, Linux, and macOS. These can be downloaded from the `GitHub Releases page
|
Windows, Linux, and macOS. These can be downloaded from the `GitHub Releases page
|
||||||
<https://github.com/deepmind/mujoco/releases>`_. Users who do not intend to develop or modify core MuJoCo code are
|
<https://github.com/google-deepmind/mujoco/releases>`_. Users who do not intend to develop or modify core MuJoCo code
|
||||||
encouraged to use our pre-built libraries, as these come bundled with the same versions of dependencies that we
|
are encouraged to use our pre-built libraries, as these come bundled with the same versions of dependencies that we
|
||||||
regularly test against, and benefit from build flags that have been tuned for performance. Our pre-built libraries are
|
regularly test against, and benefit from build flags that have been tuned for performance. Our pre-built libraries are
|
||||||
almost entirely self-contained and do not require any other library to be present, outside the standard C runtime. We
|
almost entirely self-contained and do not require any other library to be present, outside the standard C runtime. We
|
||||||
also hide all symbols apart from those that form MuJoCo's public API, thus ensuring that it can coexist with any other
|
also hide all symbols apart from those that form MuJoCo's public API, thus ensuring that it can coexist with any other
|
||||||
@@ -76,10 +76,10 @@ directory; it contains error and warning messages, and can be deleted at any tim
|
|||||||
|
|
||||||
After verifying that the simulator works, you may also want to re-compile the code samples to ensure that you have a
|
After verifying that the simulator works, you may also want to re-compile the code samples to ensure that you have a
|
||||||
working development environment. We provide Makefiles for `Windows
|
working development environment. We provide Makefiles for `Windows
|
||||||
<https://github.com/deepmind/mujoco/blob/main/sample/Makefile.windows>`_, `macOS
|
<https://github.com/google-deepmind/mujoco/blob/main/sample/Makefile.windows>`_, `macOS
|
||||||
<https://github.com/deepmind/mujoco/blob/main/sample/Makefile.macos>`_, and `Linux
|
<https://github.com/google-deepmind/mujoco/blob/main/sample/Makefile.macos>`_, and `Linux
|
||||||
<https://github.com/deepmind/mujoco/blob/main/sample/Makefile>`_, and also a cross-platform `CMake
|
<https://github.com/google-deepmind/mujoco/blob/main/sample/Makefile>`_, and also a cross-platform `CMake
|
||||||
<https://github.com/deepmind/mujoco/blob/main/sample/CMakeLists.txt>`_ setup that can be used to build sample
|
<https://github.com/google-deepmind/mujoco/blob/main/sample/CMakeLists.txt>`_ setup that can be used to build sample
|
||||||
applications independently of the MuJoCo library itself. If you are using the vanilla Makefile, we assume that you are
|
applications independently of the MuJoCo library itself. If you are using the vanilla Makefile, we assume that you are
|
||||||
using Visual Studio on Windows and LLVM/Clang on Linux. On Windows, you also need to either open a Visual Studio command
|
using Visual Studio on Windows and LLVM/Clang on Linux. On Windows, you also need to either open a Visual Studio command
|
||||||
prompt with native x64 tools or call the ``vcvarsall.bat`` script that comes with your MSVC installation to set up the
|
prompt with native x64 tools or call the ``vcvarsall.bat`` script that comes with your MSVC installation to set up the
|
||||||
@@ -127,11 +127,12 @@ target directory.
|
|||||||
#. After building, install with ``cmake --install .``
|
#. After building, install with ``cmake --install .``
|
||||||
|
|
||||||
When building on Windows, use Visual Studio 2019 or later and make sure Windows SDK version 10.0.22000 or later is
|
When building on Windows, use Visual Studio 2019 or later and make sure Windows SDK version 10.0.22000 or later is
|
||||||
installed (see `here <https://github.com/deepmind/mujoco/issues/862>`__ for more details).
|
installed (see `here <https://github.com/google-deepmind/mujoco/issues/862>`__ for more details).
|
||||||
|
|
||||||
.. tip::
|
.. tip::
|
||||||
As a reference, a working build configuration can be found in MuJoCo's
|
As a reference, a working build configuration can be found in MuJoCo's
|
||||||
`continuous integration setup <https://github.com/deepmind/mujoco/blob/main/.github/workflows/build.yml>`_ on GitHub.
|
`continuous integration setup <https://github.com/google-deepmind/mujoco/blob/main/.github/workflows/build.yml>`_ on
|
||||||
|
GitHub.
|
||||||
|
|
||||||
.. _inHeader:
|
.. _inHeader:
|
||||||
|
|
||||||
@@ -141,36 +142,36 @@ Header files
|
|||||||
The distribution contains several header files which are identical on all platforms. They are also available from the
|
The distribution contains several header files which are identical on all platforms. They are also available from the
|
||||||
links below, to make this documentation self-contained.
|
links below, to make this documentation self-contained.
|
||||||
|
|
||||||
`mujoco.h <https://github.com/deepmind/mujoco/blob/main/include/mujoco/mujoco.h>`__
|
`mujoco.h <https://github.com/google-deepmind/mujoco/blob/main/include/mujoco/mujoco.h>`__
|
||||||
This is the main header file and must be included in all programs using MuJoCo. It defines all API functions and
|
This is the main header file and must be included in all programs using MuJoCo. It defines all API functions and
|
||||||
global variables, and includes the all other header files except mjxmacro.h.
|
global variables, and includes the all other header files except mjxmacro.h.
|
||||||
`mjmodel.h <https://github.com/deepmind/mujoco/blob/main/include/mujoco/mjmodel.h>`__
|
`mjmodel.h <https://github.com/google-deepmind/mujoco/blob/main/include/mujoco/mjmodel.h>`__
|
||||||
Defines the C structure :ref:`mjModel` which is the runtime representation of the
|
Defines the C structure :ref:`mjModel` which is the runtime representation of the
|
||||||
model being simulated. It also defines a number of primitive types and other structures needed to define mjModel.
|
model being simulated. It also defines a number of primitive types and other structures needed to define mjModel.
|
||||||
`mjdata.h <https://github.com/deepmind/mujoco/blob/main/include/mujoco/mjdata.h>`__
|
`mjdata.h <https://github.com/google-deepmind/mujoco/blob/main/include/mujoco/mjdata.h>`__
|
||||||
Defines the C structure :ref:`mjData` which is the workspace where all computations
|
Defines the C structure :ref:`mjData` which is the workspace where all computations
|
||||||
read their inputs and write their outputs. It also defines primitive types and other structures needed to define
|
read their inputs and write their outputs. It also defines primitive types and other structures needed to define
|
||||||
mjData.
|
mjData.
|
||||||
`mjvisualize.h <https://github.com/deepmind/mujoco/blob/main/include/mujoco/mjvisualize.h>`__
|
`mjvisualize.h <https://github.com/google-deepmind/mujoco/blob/main/include/mujoco/mjvisualize.h>`__
|
||||||
Defines the primitive types and structures needed by the abstract visualizer.
|
Defines the primitive types and structures needed by the abstract visualizer.
|
||||||
`mjrender.h <https://github.com/deepmind/mujoco/blob/main/include/mujoco/mjrender.h>`__
|
`mjrender.h <https://github.com/google-deepmind/mujoco/blob/main/include/mujoco/mjrender.h>`__
|
||||||
Defines the primitive types and structures needed by the OpenGL renderer.
|
Defines the primitive types and structures needed by the OpenGL renderer.
|
||||||
`mjui.h <https://github.com/deepmind/mujoco/blob/main/include/mujoco/mjui.h>`__
|
`mjui.h <https://github.com/google-deepmind/mujoco/blob/main/include/mujoco/mjui.h>`__
|
||||||
Defines the primitive types and structures needed by the UI framework.
|
Defines the primitive types and structures needed by the UI framework.
|
||||||
`mjtnum.h <https://github.com/deepmind/mujoco/blob/main/include/mujoco/mjtnum.h>`__
|
`mjtnum.h <https://github.com/google-deepmind/mujoco/blob/main/include/mujoco/mjtnum.h>`__
|
||||||
Defines MuJoCo's ``mjtNum`` floating-point type to be either ``double`` or ``float``. See :ref:`mjtNum`.
|
Defines MuJoCo's ``mjtNum`` floating-point type to be either ``double`` or ``float``. See :ref:`mjtNum`.
|
||||||
`mjmacro.h <https://github.com/deepmind/mujoco/blob/main/include/mujoco/mjmacro.h>`__
|
`mjmacro.h <https://github.com/google-deepmind/mujoco/blob/main/include/mujoco/mjmacro.h>`__
|
||||||
Defines C macros that are useful in user code.
|
Defines C macros that are useful in user code.
|
||||||
`mjxmacro.h <https://github.com/deepmind/mujoco/blob/main/include/mujoco/mjxmacro.h>`__
|
`mjxmacro.h <https://github.com/google-deepmind/mujoco/blob/main/include/mujoco/mjxmacro.h>`__
|
||||||
This file is optional and is not included by mujoco.h. It defines :ref:`X Macros <tyXMacro>` that can
|
This file is optional and is not included by mujoco.h. It defines :ref:`X Macros <tyXMacro>` that can
|
||||||
automate the mapping of mjModel and mjData into scripting languages, as well as other operations that require
|
automate the mapping of mjModel and mjData into scripting languages, as well as other operations that require
|
||||||
accessing all fields of mjModel and mjData. See code sample :ref:`testxml.cc <saTestXML>`.
|
accessing all fields of mjModel and mjData. See code sample :ref:`testxml.cc <saTestXML>`.
|
||||||
`mjexport.h <https://github.com/deepmind/mujoco/blob/main/include/mujoco/mjexport.h>`__
|
`mjexport.h <https://github.com/google-deepmind/mujoco/blob/main/include/mujoco/mjexport.h>`__
|
||||||
Macros used for exporting public symbols from the MuJoCo library. This header should not be used directly by client
|
Macros used for exporting public symbols from the MuJoCo library. This header should not be used directly by client
|
||||||
code.
|
code.
|
||||||
`mjplugin.h <https://github.com/deepmind/mujoco/blob/main/include/mujoco/mjplugin.h>`__
|
`mjplugin.h <https://github.com/google-deepmind/mujoco/blob/main/include/mujoco/mjplugin.h>`__
|
||||||
Defines data structures required by :ref:`engine plugins<exPlugin>`.
|
Defines data structures required by :ref:`engine plugins<exPlugin>`.
|
||||||
`mjthread.h <https://github.com/deepmind/mujoco/blob/main/include/mujoco/mjthread.h>`__
|
`mjthread.h <https://github.com/google-deepmind/mujoco/blob/main/include/mujoco/mjthread.h>`__
|
||||||
Defines data structures and functions required by :ref:`thread<Thread>`.
|
Defines data structures and functions required by :ref:`thread<Thread>`.
|
||||||
|
|
||||||
.. _inVersion:
|
.. _inVersion:
|
||||||
|
|||||||
+13
-13
@@ -9,8 +9,8 @@ with the library.
|
|||||||
|
|
||||||
.. _saTestspeed:
|
.. _saTestspeed:
|
||||||
|
|
||||||
`testspeed <https://github.com/deepmind/mujoco/blob/main/sample/testspeed.cc>`_
|
`testspeed <https://github.com/google-deepmind/mujoco/blob/main/sample/testspeed.cc>`_
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
This code sample tests the simulation speed for a given model. The command line arguments are the model file, the
|
This code sample tests the simulation speed for a given model. The command line arguments are the model file, the
|
||||||
number of time steps to simulate, the number of parallel threads to use, and a flag to enable internal profiling (the
|
number of time steps to simulate, the number of parallel threads to use, and a flag to enable internal profiling (the
|
||||||
@@ -28,8 +28,8 @@ explicitly as explained in the :ref:`simulation loop <siSimulation>` section bel
|
|||||||
|
|
||||||
.. _saTestXML:
|
.. _saTestXML:
|
||||||
|
|
||||||
`testxml <https://github.com/deepmind/mujoco/blob/main/sample/testxml.cc>`_
|
`testxml <https://github.com/google-deepmind/mujoco/blob/main/sample/testxml.cc>`_
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
This code sample tests the parser, compiler and XML writer. The testing code does the following:
|
This code sample tests the parser, compiler and XML writer. The testing code does the following:
|
||||||
|
|
||||||
@@ -50,8 +50,8 @@ field which is resolved at runtime.
|
|||||||
|
|
||||||
.. _saCompile:
|
.. _saCompile:
|
||||||
|
|
||||||
`compile <https://github.com/deepmind/mujoco/blob/main/sample/compile.cc>`_
|
`compile <https://github.com/google-deepmind/mujoco/blob/main/sample/compile.cc>`_
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
This code sample evokes the built-in parser and compiler. It implements all possible model conversions from (MJCF, URDF,
|
This code sample evokes the built-in parser and compiler. It implements all possible model conversions from (MJCF, URDF,
|
||||||
MJB) format to (MJCF, MJB, TXT) format. Models saved as MJCF use a canonical subset of our format as described in the
|
MJB) format to (MJCF, MJB, TXT) format. Models saved as MJCF use a canonical subset of our format as described in the
|
||||||
@@ -63,8 +63,8 @@ with mjData, although this is not done by the code sample.
|
|||||||
|
|
||||||
.. _saBasic:
|
.. _saBasic:
|
||||||
|
|
||||||
`basic <https://github.com/deepmind/mujoco/blob/main/sample/basic.cc>`_
|
`basic <https://github.com/google-deepmind/mujoco/blob/main/sample/basic.cc>`_
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
This code sample is a minimal interactive simulator. The model file must be provided as command-line argument. It
|
This code sample is a minimal interactive simulator. The model file must be provided as command-line argument. It
|
||||||
opens an OpenGL window using the platform-independent GLFW library, and renders the simulation state at 60 fps while
|
opens an OpenGL window using the platform-independent GLFW library, and renders the simulation state at 60 fps while
|
||||||
@@ -77,8 +77,8 @@ illustration of the concepts in that guide.
|
|||||||
|
|
||||||
.. _saSimulate:
|
.. _saSimulate:
|
||||||
|
|
||||||
`simulate <https://github.com/deepmind/mujoco/blob/main/simulate>`_
|
`simulate <https://github.com/google-deepmind/mujoco/blob/main/simulate>`_
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
This code sample is a fully-featured interactive simulator. It opens an OpenGL window using the platform-independent
|
This code sample is a fully-featured interactive simulator. It opens an OpenGL window using the platform-independent
|
||||||
GLFW library, and renders the simulation state in it. There is built-in help, simulation statistics, profiler, sensor
|
GLFW library, and renders the simulation state in it. There is built-in help, simulation statistics, profiler, sensor
|
||||||
@@ -117,7 +117,7 @@ Windows power plan so that the minimum processor state is 100%.
|
|||||||
|
|
||||||
.. _saRecord:
|
.. _saRecord:
|
||||||
|
|
||||||
`record <https://github.com/deepmind/mujoco/blob/main/sample/record.cc>`_
|
`record <https://github.com/google-deepmind/mujoco/blob/main/sample/record.cc>`_
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
This code sample simulates the passive dynamics of a given model, renders it offscreen, reads the color and depth pixel
|
This code sample simulates the passive dynamics of a given model, renders it offscreen, reads the color and depth pixel
|
||||||
@@ -155,8 +155,8 @@ But we cannot yet assume that all users have it installed.
|
|||||||
|
|
||||||
.. _saDerivative:
|
.. _saDerivative:
|
||||||
|
|
||||||
`derivative <https://github.com/deepmind/mujoco/blob/main/sample/derivative.cc>`_
|
`derivative <https://github.com/google-deepmind/mujoco/blob/main/sample/derivative.cc>`_
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
This code sample illustrates the numerical approximation of forward and inverse dynamics derivatives via finite
|
This code sample illustrates the numerical approximation of forward and inverse dynamics derivatives via finite
|
||||||
differences. The process involves a number of epochs. In each epoch the simulation is advanced for a specified number
|
differences. The process involves a number of epochs. In each epoch the simulation is advanced for a specified number
|
||||||
|
|||||||
+11
-10
@@ -12,11 +12,11 @@ low-level bindings that are meant to give as close to a direct access to the MuJ
|
|||||||
order to provide an API and semantics that developers would expect in a typical Python library, the bindings
|
order to provide an API and semantics that developers would expect in a typical Python library, the bindings
|
||||||
deliberately diverge from the raw MuJoCo API in a number of places, which are documented throughout this page.
|
deliberately diverge from the raw MuJoCo API in a number of places, which are documented throughout this page.
|
||||||
|
|
||||||
Google DeepMind’s `dm_control <https://github.com/deepmind/dm_control>`__ reinforcement learning library (which prior to
|
Google DeepMind’s `dm_control <https://github.com/google-deepmind/dm_control>`__ reinforcement learning library (which
|
||||||
version 1.0.0 implemented its own MuJoCo bindings based on ``ctypes``) has been updated to depend on the ``mujoco``
|
prior to version 1.0.0 implemented its own MuJoCo bindings based on ``ctypes``) has been updated to depend on the
|
||||||
package and continues to be supported by Google DeepMind. Changes in dm_control should be largely transparent to users
|
``mujoco`` package and continues to be supported by Google DeepMind. Changes in dm_control should be largely transparent
|
||||||
of previous versions, however code that depended directly on its low-level API may need to be updated. Consult the
|
to users of previous versions, however code that depended directly on its low-level API may need to be updated. Consult
|
||||||
`migration guide <https://github.com/deepmind/dm_control/blob/main/migration_guide_1.0.md>`__ for detail.
|
the `migration guide <https://github.com/google-deepmind/dm_control/blob/main/migration_guide_1.0.md>`__ for detail.
|
||||||
|
|
||||||
For mujoco-py users, we include :ref:`notes <PyMjpy_migration>` below to aid migration.
|
For mujoco-py users, we include :ref:`notes <PyMjpy_migration>` below to aid migration.
|
||||||
|
|
||||||
@@ -28,7 +28,7 @@ Tutorial notebook
|
|||||||
A MuJoCo tutorial using the Python bindings is available here: |colab|
|
A MuJoCo tutorial using the Python bindings is available here: |colab|
|
||||||
|
|
||||||
.. |colab| image:: https://colab.research.google.com/assets/colab-badge.svg
|
.. |colab| image:: https://colab.research.google.com/assets/colab-badge.svg
|
||||||
:target: https://colab.research.google.com/github/deepmind/mujoco/blob/main/python/tutorial.ipynb
|
:target: https://colab.research.google.com/github/google-deepmind/mujoco/blob/main/python/tutorial.ipynb
|
||||||
|
|
||||||
.. _PyInstallation:
|
.. _PyInstallation:
|
||||||
|
|
||||||
@@ -450,7 +450,7 @@ all inputs including ``time`` and ``qacc_warmstart`` are set to default values,
|
|||||||
|
|
||||||
Since the Global Interpreter Lock can be released, this function can be efficiently threaded using Python threads. See
|
Since the Global Interpreter Lock can be released, this function can be efficiently threaded using Python threads. See
|
||||||
the ``test_threading`` function in
|
the ``test_threading`` function in
|
||||||
`rollout_test.py <https://github.com/deepmind/mujoco/blob/main/python/mujoco/rollout_test.py>`_ for an example of
|
`rollout_test.py <https://github.com/google-deepmind/mujoco/blob/main/python/mujoco/rollout_test.py>`_ for an example of
|
||||||
threaded operation.
|
threaded operation.
|
||||||
|
|
||||||
.. _PyMjpy_migration:
|
.. _PyMjpy_migration:
|
||||||
@@ -517,7 +517,7 @@ Building from source
|
|||||||
|
|
||||||
1. Make sure you have CMake and a C++17 compiler installed.
|
1. Make sure you have CMake and a C++17 compiler installed.
|
||||||
|
|
||||||
2. Download the `latest binary release <https://github.com/deepmind/mujoco/releases>`__
|
2. Download the `latest binary release <https://github.com/google-deepmind/mujoco/releases>`__
|
||||||
from GitHub. On macOS, the download corresponds to a DMG file from which you
|
from GitHub. On macOS, the download corresponds to a DMG file from which you
|
||||||
can drag ``MuJoCo.app`` into your ``/Applications`` folder.
|
can drag ``MuJoCo.app`` into your ``/Applications`` folder.
|
||||||
|
|
||||||
@@ -526,7 +526,7 @@ Building from source
|
|||||||
|
|
||||||
.. code-block:: shell
|
.. code-block:: shell
|
||||||
|
|
||||||
git clone https://github.com/deepmind/mujoco.git
|
git clone https://github.com/google-deepmind/mujoco.git
|
||||||
cd mujoco/python
|
cd mujoco/python
|
||||||
|
|
||||||
4. Create a virtual environment:
|
4. Create a virtual environment:
|
||||||
@@ -571,4 +571,5 @@ successfully installed, ``cd`` outside of the ``mujoco`` directory and run
|
|||||||
|
|
||||||
.. tip::
|
.. tip::
|
||||||
As a reference, a working build configuration can be found in MuJoCo's
|
As a reference, a working build configuration can be found in MuJoCo's
|
||||||
`continuous integration setup <https://github.com/deepmind/mujoco/blob/main/.github/workflows/build.yml>`_ on GitHub.
|
`continuous integration setup <https://github.com/google-deepmind/mujoco/blob/main/.github/workflows/build.yml>`_ on
|
||||||
|
GitHub.
|
||||||
|
|||||||
+8
-8
@@ -5,20 +5,20 @@ Unity Plug-in
|
|||||||
Introduction
|
Introduction
|
||||||
------------
|
------------
|
||||||
|
|
||||||
The MuJoCo `Unity plug-in <https://github.com/deepmind/mujoco/tree/main/unity>`_ allows the Unity Editor and runtime to
|
The MuJoCo `Unity plug-in <https://github.com/google-deepmind/mujoco/tree/main/unity>`_ allows the Unity Editor and
|
||||||
use the MuJoCo physics engine. Users can import MJCF files and edit the models in the Editor. The plug-in relies on
|
runtime to use the MuJoCo physics engine. Users can import MJCF files and edit the models in the Editor. The plug-in
|
||||||
Unity for most aspects -- assets, game logic, simulation time -- but uses MuJoCo to determine how objects move, giving
|
relies on Unity for most aspects -- assets, game logic, simulation time -- but uses MuJoCo to determine how objects
|
||||||
the designer access to MuJoCo's full API.
|
move, giving the designer access to MuJoCo's full API.
|
||||||
|
|
||||||
.. _UInstallation:
|
.. _UInstallation:
|
||||||
|
|
||||||
Installation instructions
|
Installation instructions
|
||||||
-------------------------
|
-------------------------
|
||||||
|
|
||||||
The plug-in directory (available at https://github.com/deepmind/mujoco/tree/main/unity) includes a ``package.json``
|
The plug-in directory (available at https://github.com/google-deepmind/mujoco/tree/main/unity) includes a
|
||||||
file. Unity's package manager recognizes this file and will import the plug-in's C# codebase to your project. In
|
``package.json`` file. Unity's package manager recognizes this file and will import the plug-in's C# codebase to your
|
||||||
addition, Unity also needs the native MuJoCo library, which can be found in the specific platform archive at
|
project. In addition, Unity also needs the native MuJoCo library, which can be found in the specific platform archive at
|
||||||
https://github.com/deepmind/mujoco/releases.
|
https://github.com/google-deepmind/mujoco/releases.
|
||||||
|
|
||||||
On Unity version 2020.2 and later, the Package Manager will look for the native library file and copy it to the package
|
On Unity version 2020.2 and later, the Package Manager will look for the native library file and copy it to the package
|
||||||
directory when the package is imported. Alternatively, you can manually copy the native library to the package directory
|
directory when the package is imported. Alternatively, you can manually copy the native library to the package directory
|
||||||
|
|||||||
+4
-4
@@ -6,11 +6,11 @@
|
|||||||
"id": "bR2IJtzSilBv"
|
"id": "bR2IJtzSilBv"
|
||||||
},
|
},
|
||||||
"source": [
|
"source": [
|
||||||
"\n",
|
"\n",
|
||||||
"\n",
|
"\n",
|
||||||
"# \u003ch1\u003e\u003ccenter\u003eLQR tutorial \u003ca href=\"https://colab.research.google.com/github/deepmind/mujoco/blob/main/python/LQR.ipynb\"\u003e\u003cimg src=\"https://colab.research.google.com/assets/colab-badge.svg\" width=\"140\" align=\"center\"/\u003e\u003c/a\u003e\u003c/center\u003e\u003c/h1\u003e\n",
|
"# \u003ch1\u003e\u003ccenter\u003eLQR tutorial \u003ca href=\"https://colab.research.google.com/github/google-deepmind/mujoco/blob/main/python/LQR.ipynb\"\u003e\u003cimg src=\"https://colab.research.google.com/assets/colab-badge.svg\" width=\"140\" align=\"center\"/\u003e\u003c/a\u003e\u003c/center\u003e\u003c/h1\u003e\n",
|
||||||
"\n",
|
"\n",
|
||||||
"This notebook provides an example of an LQR controller using [**MuJoCo** physics](https://github.com/deepmind/mujoco#readme).\n",
|
"This notebook provides an example of an LQR controller using [**MuJoCo** physics](https://github.com/google-deepmind/mujoco#readme).\n",
|
||||||
"\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 \u003e Change runtime type\".\n"
|
"**A Colab runtime with GPU acceleration is required.** If you're using a CPU-only runtime, you can switch using the menu \"Runtime \u003e Change runtime type\".\n"
|
||||||
]
|
]
|
||||||
@@ -153,7 +153,7 @@
|
|||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"print('Getting MuJoCo humanoid XML description from GitHub:')\n",
|
"print('Getting MuJoCo humanoid XML description from GitHub:')\n",
|
||||||
"!git clone https://github.com/deepmind/mujoco\n",
|
"!git clone https://github.com/google-deepmind/mujoco\n",
|
||||||
"with open('mujoco/model/humanoid/humanoid.xml', 'r') as f:\n",
|
"with open('mujoco/model/humanoid/humanoid.xml', 'r') as f:\n",
|
||||||
" xml = f.read()"
|
" xml = f.read()"
|
||||||
]
|
]
|
||||||
|
|||||||
+2
-2
@@ -8,7 +8,7 @@
|
|||||||
[pypi]: https://pypi.org/project/mujoco/
|
[pypi]: https://pypi.org/project/mujoco/
|
||||||
|
|
||||||
This package is the canonical Python bindings for the
|
This package is the canonical Python bindings for the
|
||||||
[MuJoCo physics engine](https://github.com/deepmind/mujoco).
|
[MuJoCo physics engine](https://github.com/google-deepmind/mujoco).
|
||||||
These bindings are developed and maintained by Google DeepMind, and is kept
|
These bindings are developed and maintained by Google DeepMind, and is kept
|
||||||
up-to-date with the latest developments in MuJoCo itself.
|
up-to-date with the latest developments in MuJoCo itself.
|
||||||
|
|
||||||
@@ -52,7 +52,7 @@ further detail on the package's API.
|
|||||||
|
|
||||||
We recommend going through the tutorial notebook which covers the basics of
|
We recommend going through the tutorial notebook which covers the basics of
|
||||||
MuJoCo using Python:
|
MuJoCo using Python:
|
||||||
[](https://colab.research.google.com/github/deepmind/mujoco/blob/main/python/tutorial.ipynb)
|
[](https://colab.research.google.com/github/google-deepmind/mujoco/blob/main/python/tutorial.ipynb)
|
||||||
|
|
||||||
## Versioning
|
## Versioning
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -354,7 +354,7 @@ SETUP_KWARGS = dict(
|
|||||||
description='MuJoCo Physics Simulator',
|
description='MuJoCo Physics Simulator',
|
||||||
long_description=get_long_description(),
|
long_description=get_long_description(),
|
||||||
long_description_content_type='text/markdown',
|
long_description_content_type='text/markdown',
|
||||||
url='https://github.com/deepmind/mujoco',
|
url='https://github.com/google-deepmind/mujoco',
|
||||||
license='Apache License 2.0',
|
license='Apache License 2.0',
|
||||||
classifiers=[
|
classifiers=[
|
||||||
'Development Status :: 5 - Production/Stable',
|
'Development Status :: 5 - Production/Stable',
|
||||||
|
|||||||
@@ -6,11 +6,11 @@
|
|||||||
"id": "MpkYHwCqk7W-"
|
"id": "MpkYHwCqk7W-"
|
||||||
},
|
},
|
||||||
"source": [
|
"source": [
|
||||||
"\n",
|
"\n",
|
||||||
"\n",
|
"\n",
|
||||||
"# \u003ch1\u003e\u003ccenter\u003eTutorial \u003ca href=\"https://colab.research.google.com/github/deepmind/mujoco/blob/main/python/tutorial.ipynb\"\u003e\u003cimg src=\"https://colab.research.google.com/assets/colab-badge.svg\" width=\"140\" align=\"center\"/\u003e\u003c/a\u003e\u003c/center\u003e\u003c/h1\u003e\n",
|
"# \u003ch1\u003e\u003ccenter\u003eTutorial \u003ca href=\"https://colab.research.google.com/github/google-deepmind/mujoco/blob/main/python/tutorial.ipynb\"\u003e\u003cimg src=\"https://colab.research.google.com/assets/colab-badge.svg\" width=\"140\" align=\"center\"/\u003e\u003c/a\u003e\u003c/center\u003e\u003c/h1\u003e\n",
|
||||||
"\n",
|
"\n",
|
||||||
"This notebook provides an introductory tutorial for [**MuJoCo** physics](https://github.com/deepmind/mujoco#readme), using the native Python bindings.\n",
|
"This notebook provides an introductory tutorial for [**MuJoCo** physics](https://github.com/google-deepmind/mujoco#readme), using the native Python bindings.\n",
|
||||||
"\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 \u003e Change runtime type\".\n",
|
"**A Colab runtime with GPU acceleration is required.** If you're using a CPU-only runtime, you can switch using the menu \"Runtime \u003e Change runtime type\".\n",
|
||||||
"\n",
|
"\n",
|
||||||
@@ -198,7 +198,7 @@
|
|||||||
"source": [
|
"source": [
|
||||||
"## mjModel\n",
|
"## mjModel\n",
|
||||||
"\n",
|
"\n",
|
||||||
"MuJoCo's `mjModel`, contains the *model description*, i.e., all quantities which *do not change over time*. The complete description of `mjModel` can be found at the end of the header file [`mjmodel.h`](https://github.com/deepmind/mujoco/blob/main/include/mujoco/mjmodel.h). Note that the header files contain short, useful inline comments, describing each field.\n",
|
"MuJoCo's `mjModel`, contains the *model description*, i.e., all quantities which *do not change over time*. The complete description of `mjModel` can be found at the end of the header file [`mjmodel.h`](https://github.com/google-deepmind/mujoco/blob/main/include/mujoco/mjmodel.h). Note that the header files contain short, useful inline comments, describing each field.\n",
|
||||||
"\n",
|
"\n",
|
||||||
"Examples of quantities that can be found in `mjModel` are `ngeom`, the number of geoms in the scene and `geom_rgba`, their respective colors:"
|
"Examples of quantities that can be found in `mjModel` are `ngeom`, the number of geoms in the scene and `geom_rgba`, their respective colors:"
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ findorfetch(
|
|||||||
LIBRARY_NAME
|
LIBRARY_NAME
|
||||||
mujoco
|
mujoco
|
||||||
GIT_REPO
|
GIT_REPO
|
||||||
https://github.com/deepmind/mujoco.git
|
https://github.com/google-deepmind/mujoco.git
|
||||||
GIT_TAG
|
GIT_TAG
|
||||||
main
|
main
|
||||||
TARGETS
|
TARGETS
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ findorfetch(
|
|||||||
LIBRARY_NAME
|
LIBRARY_NAME
|
||||||
mujoco
|
mujoco
|
||||||
GIT_REPO
|
GIT_REPO
|
||||||
https://github.com/deepmind/mujoco.git
|
https://github.com/google-deepmind/mujoco.git
|
||||||
GIT_TAG
|
GIT_TAG
|
||||||
main
|
main
|
||||||
TARGETS
|
TARGETS
|
||||||
|
|||||||
+11
-4
@@ -1289,16 +1289,23 @@ static inline void* stackalloc(mjData* d, size_t size, size_t alignment) {
|
|||||||
#ifdef ADDRESS_SANITIZER
|
#ifdef ADDRESS_SANITIZER
|
||||||
// actual stack usage (without red zone bytes) is stored in the red zone
|
// actual stack usage (without red zone bytes) is stored in the red zone
|
||||||
if (d->pstack) {
|
if (d->pstack) {
|
||||||
size_t* prev_usage_ptr = (size_t*)(end_of_arena_ptr - d->pstack);
|
char* prev_pstack_ptr = (char*)(end_of_arena_ptr - d->pstack);
|
||||||
|
size_t prev_misalign = (uintptr_t)prev_pstack_ptr % _Alignof(size_t);
|
||||||
|
size_t* prev_usage_ptr =
|
||||||
|
(size_t*)(prev_pstack_ptr +
|
||||||
|
(prev_misalign ? _Alignof(size_t) - prev_misalign : 0));
|
||||||
ASAN_UNPOISON_MEMORY_REGION(prev_usage_ptr, sizeof(size_t));
|
ASAN_UNPOISON_MEMORY_REGION(prev_usage_ptr, sizeof(size_t));
|
||||||
usage = current_alloc_usage + *prev_usage_ptr;
|
usage = current_alloc_usage + *prev_usage_ptr;
|
||||||
ASAN_POISON_MEMORY_REGION(prev_usage_ptr, sizeof(size_t));
|
ASAN_POISON_MEMORY_REGION(prev_usage_ptr, sizeof(size_t));
|
||||||
}
|
}
|
||||||
|
|
||||||
// store new stack usage in the red zone
|
// store new stack usage in the red zone
|
||||||
ASAN_UNPOISON_MEMORY_REGION((void*)new_pstack_ptr, sizeof(size_t));
|
size_t misalign = new_pstack_ptr % _Alignof(size_t);
|
||||||
*(size_t*)new_pstack_ptr = usage;
|
size_t* usage_ptr =
|
||||||
ASAN_POISON_MEMORY_REGION((void*)new_pstack_ptr, sizeof(size_t));
|
(size_t*)(new_pstack_ptr + (misalign ? _Alignof(size_t) - misalign : 0));
|
||||||
|
ASAN_UNPOISON_MEMORY_REGION(usage_ptr, sizeof(size_t));
|
||||||
|
*usage_ptr = usage;
|
||||||
|
ASAN_POISON_MEMORY_REGION(usage_ptr, sizeof(size_t));
|
||||||
|
|
||||||
// unpoison the actual usable allocation
|
// unpoison the actual usable allocation
|
||||||
ASAN_UNPOISON_MEMORY_REGION((void*)start_ptr, size);
|
ASAN_UNPOISON_MEMORY_REGION((void*)start_ptr, size);
|
||||||
|
|||||||
+18
-9
@@ -114,6 +114,12 @@ static T* VecToArray(std::vector<T>& vector, bool clear = true){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Read data of type T from a potentially unaligned buffer pointer.
|
||||||
|
template <typename T>
|
||||||
|
static void ReadFromBuffer(T* dst, const char* src) {
|
||||||
|
std::memcpy(dst, src, sizeof(T));
|
||||||
|
}
|
||||||
|
|
||||||
//------------------ class mjCMesh implementation --------------------------------------------------
|
//------------------ class mjCMesh implementation --------------------------------------------------
|
||||||
|
|
||||||
mjCMesh::mjCMesh(mjCModel* _model, mjCDef* _def) {
|
mjCMesh::mjCMesh(mjCModel* _model, mjCDef* _def) {
|
||||||
@@ -961,7 +967,7 @@ void mjCMesh::LoadSTL(mjResource* resource) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// get number of triangles, check bounds
|
// get number of triangles, check bounds
|
||||||
nface_ = *(unsigned int*)(buffer+80);
|
ReadFromBuffer(&nface_, buffer + 80);
|
||||||
if (nface_<1 || nface_>200000) {
|
if (nface_<1 || nface_>200000) {
|
||||||
throw mjCError(this,
|
throw mjCError(this,
|
||||||
"number of faces should be between 1 and 200000 in STL file '%s';"
|
"number of faces should be between 1 and 200000 in STL file '%s';"
|
||||||
@@ -985,8 +991,10 @@ void mjCMesh::LoadSTL(mjResource* resource) {
|
|||||||
// add vertices and faces, including repeated for now
|
// add vertices and faces, including repeated for now
|
||||||
for (int i=0; i<nface_; i++) {
|
for (int i=0; i<nface_; i++) {
|
||||||
for (int j=0; j<3; j++) {
|
for (int j=0; j<3; j++) {
|
||||||
// get pointer to vertex coordiates
|
// read vertex coordinates
|
||||||
float* v = (float*)(stl+50*i+12*(j+1));
|
float v[3];
|
||||||
|
ReadFromBuffer(&v, stl+50*i+12*(j+1));
|
||||||
|
|
||||||
for (int k=0; k < 3; k++) {
|
for (int k=0; k < 3; k++) {
|
||||||
if (std::isnan(v[k]) || std::isinf(v[k])) {
|
if (std::isnan(v[k]) || std::isinf(v[k])) {
|
||||||
throw mjCError(this, "STL file '%s' contains invalid vertices.",
|
throw mjCError(this, "STL file '%s' contains invalid vertices.",
|
||||||
@@ -1039,10 +1047,10 @@ void mjCMesh::LoadMSH(mjResource* resource) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// get sizes from header
|
// get sizes from header
|
||||||
nvert_ = ((int*)buffer)[0];
|
ReadFromBuffer(&nvert_, buffer);
|
||||||
nnormal_ = ((int*)buffer)[1];
|
ReadFromBuffer(&nnormal_, buffer + sizeof(int));
|
||||||
ntexcoord_ = ((int*)buffer)[2];
|
ReadFromBuffer(&ntexcoord_, buffer + 2*sizeof(int));
|
||||||
nface_ = ((int*)buffer)[3];
|
ReadFromBuffer(&nface_, buffer + 3*sizeof(int));
|
||||||
|
|
||||||
// check sizes
|
// check sizes
|
||||||
if (nvert_<4 || nface_<0 || nnormal_<0 || ntexcoord_<0 ||
|
if (nvert_<4 || nface_<0 || nnormal_<0 || ntexcoord_<0 ||
|
||||||
@@ -1058,7 +1066,8 @@ void mjCMesh::LoadMSH(mjResource* resource) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// allocate and copy
|
// allocate and copy
|
||||||
float* fdata = (float*)(((int*)buffer) + 4);
|
using UnalignedFloat = char[sizeof(float)];
|
||||||
|
auto fdata = reinterpret_cast<UnalignedFloat*>(buffer + 4*sizeof(int));
|
||||||
if (nvert_) {
|
if (nvert_) {
|
||||||
vert_ = (float*) mju_malloc(3*nvert_*sizeof(float));
|
vert_ = (float*) mju_malloc(3*nvert_*sizeof(float));
|
||||||
memcpy(vert_, fdata, 3*nvert_*sizeof(float));
|
memcpy(vert_, fdata, 3*nvert_*sizeof(float));
|
||||||
@@ -1085,7 +1094,7 @@ void mjCMesh::LoadMSH(mjResource* resource) {
|
|||||||
memcpy(facetexcoord_, fdata, 3*nface_*sizeof(int));
|
memcpy(facetexcoord_, fdata, 3*nface_*sizeof(int));
|
||||||
}
|
}
|
||||||
|
|
||||||
// rearange face data if left-handed scaling
|
// rearrange face data if left-handed scaling
|
||||||
if (nface_ && !righthand) {
|
if (nface_ && !righthand) {
|
||||||
for (int i=0; i<nface_; i++) {
|
for (int i=0; i<nface_; i++) {
|
||||||
int tmp = face_[3*i+1];
|
int tmp = face_[3*i+1];
|
||||||
|
|||||||
+1
-1
@@ -52,7 +52,7 @@ namespace mju = ::mujoco::util;
|
|||||||
// In order to ensure that XMLs are locale-inpendent, we temporarily switch to the "C" locale
|
// In order to ensure that XMLs are locale-inpendent, we temporarily switch to the "C" locale
|
||||||
// when handling. Since the standard C `setlocale` is not thread-safe, we instead use
|
// when handling. Since the standard C `setlocale` is not thread-safe, we instead use
|
||||||
// platform-specific extensions to override the locale only in the calling thread.
|
// platform-specific extensions to override the locale only in the calling thread.
|
||||||
// See also https://github.com/deepmind/mujoco/issues/131.
|
// See also https://github.com/google-deepmind/mujoco/issues/131.
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
class LocaleOverride {
|
class LocaleOverride {
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -813,6 +813,30 @@ TEST_F(EngineIoTest, CanDetectStackFrameLeakage) {
|
|||||||
mj_deleteData(data);
|
mj_deleteData(data);
|
||||||
mj_deleteModel(model);
|
mj_deleteModel(model);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TEST_F(EngineIoTest, RedZoneAlignmentTest) {
|
||||||
|
static constexpr char xml[] = R"(
|
||||||
|
<mujoco>
|
||||||
|
<worldbody>
|
||||||
|
</worldbody>
|
||||||
|
</mujoco>
|
||||||
|
)";
|
||||||
|
|
||||||
|
std::array<char, 1024> error;
|
||||||
|
mjModel* model = LoadModelFromString(xml, error.data(), error.size());
|
||||||
|
ASSERT_THAT(model, NotNull()) << "Failed to load model: " << error.data();
|
||||||
|
|
||||||
|
mjData* data = mj_makeData(model);
|
||||||
|
ASSERT_THAT(data, NotNull());
|
||||||
|
|
||||||
|
mj_markStack(data);
|
||||||
|
mj_stackAlloc(data, 1, 1);
|
||||||
|
mj_stackAlloc(data, 1, 1);
|
||||||
|
mj_freeStack(data);
|
||||||
|
|
||||||
|
mj_deleteData(data);
|
||||||
|
mj_deleteModel(model);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|||||||
+1
-1
@@ -12,6 +12,6 @@
|
|||||||
"changelogUrl": "https://mujoco.readthedocs.io/en/latest/changelog.html",
|
"changelogUrl": "https://mujoco.readthedocs.io/en/latest/changelog.html",
|
||||||
"documentationUrl": "https://mujoco.readthedocs.io/en/latest/unity.html",
|
"documentationUrl": "https://mujoco.readthedocs.io/en/latest/unity.html",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"licensesUrl": "https://github.com/deepmind/mujoco/blob/main/LICENSE",
|
"licensesUrl": "https://github.com/google-deepmind/mujoco/blob/main/LICENSE",
|
||||||
"hideInEditor": false
|
"hideInEditor": false
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user