From 14e90f3897f2ab2353dfdaa19dbf39d52a191ba3 Mon Sep 17 00:00:00 2001 From: Taylor Howell Date: Thu, 1 Jan 2026 02:45:41 -0800 Subject: [PATCH] MuJoCo Warp documentation: Array shapes. PiperOrigin-RevId: 850969970 Change-Id: I41dce50644c9a6521e0bab9c84fea63f78e7a6ce --- doc/mjwarp/index.rst | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/doc/mjwarp/index.rst b/doc/mjwarp/index.rst index b9a46554..114821c7 100644 --- a/doc/mjwarp/index.rst +++ b/doc/mjwarp/index.rst @@ -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 ` 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 `__. +**Why do some arrays have different shapes compared to mjModel or mjData?** + +By default for batched simulation, many :class:`mjw.Data ` fields having a leading batch dimension of +size ``Data.nworld``. Some :class:`mjw.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 `. + +Additionally, certain fields including ``Model.qM``, ``Data.efc.J``, and ``Data.efc.D`` are padded to enable fast +loading on GPU. + Compilation -----------