From 1d482047d1a787bcc5708b5d8984e6cec1ba43fb Mon Sep 17 00:00:00 2001 From: Taylor Howell Date: Mon, 12 Jan 2026 03:16:07 -0800 Subject: [PATCH] MuJoCo Warp documentation: How to fix simulation runtime warnings? PiperOrigin-RevId: 855149274 Change-Id: Iccfb85f1ec836cb06235d21d23e913f77a816487 --- doc/mjwarp/index.rst | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/doc/mjwarp/index.rst b/doc/mjwarp/index.rst index 7ae371b7..d25757b7 100644 --- a/doc/mjwarp/index.rst +++ b/doc/mjwarp/index.rst @@ -579,6 +579,23 @@ and MJX. This feature is likely to change in the future. +**How to fix simulation runtime warnings?** + +Warnings are provided when memory requirements exceed existing allocations during simulation: + +- `nconmax`_ / `njmax`_: The maximum number of contacts / constraints has been exceeded. Increase the value of the + setting by updating the relevant argument to :func:`mjw.make_data ` or + :func:`mjw.put_data `. +- ``mjw.Option.ccd_iterations``: The convex collision detection algorithm has exceeded the maximum number of iterations. + Increase the value of this setting in the XML / :ref:`mjSpec` / :ref:`mjModel`. Importantly, this change must be made + to the :ref:`mjModel` instance that is provided to :func:`mjw.put_model ` and + :func:`mjw.make_data ` / :func:`mjw.put_data `. + +- ``mjw.Option.contact_sensor_maxmatch``: The maximum number of contact matches for a + :ref:`contact sensor`'s matching criteria has been exceeded. Increase the value of this MJWarp-only + setting `m.opt.contact_sensor_maxmatch`. Alternatively, refactor the contact sensor matching criteria, for example if + the 2 geoms of interest are known, specify ``geom1`` and ``geom2``. + Compilation -----------