MuJoCo Warp documentation: Array shapes.

PiperOrigin-RevId: 850969970
Change-Id: I41dce50644c9a6521e0bab9c84fea63f78e7a6ce
This commit is contained in:
Taylor Howell
2026-01-01 02:45:41 -08:00
committed by Copybara-Service
parent 451f40fa87
commit 14e90f3897
+12
View File
@@ -321,6 +321,8 @@ To enable this routine set ``Model.opt.ls_parallel=True`` or add a custom numeri
The parallel linesearch is currently an experimental feature.
.. _mjwBatch:
Batched :class:`Model <mujoco_warp.Model>` Fields
=================================================
@@ -468,6 +470,16 @@ Sparse Jacobians are not currently implemented and ``Data`` fields: ``ten_J``, `
``efc.J`` are always represented as dense matrices. Support for sparse Jacobians is tracked in GitHub issue
`#88 <https://github.com/google-deepmind/mujoco_warp/issues/88>`__.
**Why do some arrays have different shapes compared to mjModel or mjData?**
By default for batched simulation, many :class:`mjw.Data <mujoco_warp.Data>` fields having a leading batch dimension of
size ``Data.nworld``. Some :class:`mjw.Model <mujoco_warp.Model>` fields having a leading batch dimension with size
``1``, indicating that this
:ref:`field can be overridden with an array of batched parameters for domain randomization <mjwBatch>`.
Additionally, certain fields including ``Model.qM``, ``Data.efc.J``, and ``Data.efc.D`` are padded to enable fast
loading on GPU.
Compilation
-----------