Commit Graph

4026 Commits

Author SHA1 Message Date
Google DeepMind f022faadf7 Revert 42b81966b7 due to GitHub failures
PiperOrigin-RevId: 862869742
Change-Id: I9c56c8e15b609c9a67e6c90542722e7326d8fe2c
2026-01-29 13:17:49 -08:00
Google DeepMind 63de5c51ee Fix line numbers in named access tests link.
The link to the named access tests in `tests/bindings_test.ts` was incorrectly formatted.

PiperOrigin-RevId: 862786877
Change-Id: Idf10d75638e55b7d3b0312c765a977274d014857
2026-01-29 10:08:44 -08:00
Taylor Howell 1381e8adee Add mjMINAWAKE to constants.cc
PiperOrigin-RevId: 862784740
Change-Id: I309fca497027cd8cb7cee6c998fc34d0cb5e94fd
2026-01-29 10:04:43 -08:00
Yuval Tassa 55f300b78c Fix typo
PiperOrigin-RevId: 862781462
Change-Id: I88844e2148e821ec92e37aa8aab3554c132a4d43
2026-01-29 09:57:09 -08:00
Yuval Tassa 883e69d7b1 Minor improvements to collision sensor documentation.
PiperOrigin-RevId: 862767431
Change-Id: I53861430e7868b23e37be9694f195a2dd3685db4
2026-01-29 09:22:23 -08:00
Google DeepMind 42b81966b7 Add a test for compiling XML with multiple assets from VFS.
PiperOrigin-RevId: 862767395
Change-Id: I6d51b5630a0d5033231a555c3b9297ae18dc429f
2026-01-29 09:21:11 -08:00
Sam Haves f434578d30 USD decoder improvements: Support actuators targeting tendons and improve side site index handling.
Adds support for mjTRN_TENDON actuators in the USD decoder. Modifies the tendon path parsing to correctly handle side site indices, allowing -1 to signify no side site for a given path element.

PiperOrigin-RevId: 862755621
Change-Id: I18b13b160e3d1c27945d0972a69012d6307131e9
2026-01-29 08:51:02 -08:00
Google DeepMind d2efc0e154 Add object-based accessors for mjData in WASM bindings.
PiperOrigin-RevId: 862736608
Change-Id: I0618e9d2af37e377bad1aead1b3fd1a12334df35
2026-01-29 07:55:56 -08:00
Google DeepMind 59c5017073 Improve error messages for named/indexed lookups in WASM bindings.
PiperOrigin-RevId: 862682001
Change-Id: I6381af64b724de0ab5aee43cdc89ce463b590cf1
2026-01-29 04:53:54 -08:00
Haroon Qureshi f6796f36b2 Only update GuiView::UpdateRenderable (which calls imGui::EndFrame
internally) when we want to render the GUI to the same target as the
scene.

PiperOrigin-RevId: 862647358
Change-Id: If3656032b74a168b804dfa34ef3eb97c9817c2c0
2026-01-29 02:54:44 -08:00
Taylor Howell 57b5ebc92b MuJoCo Warp documentation: height field collision overflow
PiperOrigin-RevId: 862454467
Change-Id: Iaccc44aa0c57faf6ad2dbc62f2b727cea2e4980d
2026-01-28 16:55:10 -08:00
Haroon Qureshi 86f82d18a2 Temporarily disable mjz support.
PiperOrigin-RevId: 862383413
Change-Id: I32927f59852e149b7aaf8b5225f35020532eb7f9
2026-01-28 13:58:41 -08:00
Taylor Howell 8889c13fa7 MuJoCo Warp documentation: Inertia matrix factorization
PiperOrigin-RevId: 862290080
Change-Id: I7acd30f1fff5cca95ca1139f71710cab5c493561
2026-01-28 10:18:50 -08:00
Yuval Tassa c5925e7b0e Improve wording in changelog
PiperOrigin-RevId: 862288773
Change-Id: I2dcd09ed1fb929396218ee32e99242d9be508b3b
2026-01-28 10:15:11 -08:00
Yuval Tassa 510cbceda5 Add missing space after comma
PiperOrigin-RevId: 862235154
Change-Id: I60ad15fcc918accf52abeced7e22a5a1d599df82
2026-01-28 07:53:18 -08:00
Haroon Qureshi a050b64635 Update minimum CMake version for miniz.
PiperOrigin-RevId: 862226233
Change-Id: I8612260e65f9f1c4192325a90bcfc6bac71585c0
2026-01-28 07:28:09 -08:00
Matija Kecman 0eff7acf80 Improve filament gui
* Added color to widgets which have changed from their initial values and the ability to revert to their initial values by clicking with the right mouse button
* Added some reasonable range limits, which are especially useful for drag widgets

PiperOrigin-RevId: 862220411
Change-Id: I1d2c61d8889d5ec29890d81b5f97af576cb5c611
2026-01-28 07:09:01 -08:00
Haroon Qureshi 40f2fe0977 CMakeLists for mjz.
PiperOrigin-RevId: 862214752
Change-Id: I498a1f0092adc9e94016bf23589403296bffb4f7
2026-01-28 06:53:06 -08:00
Yuval Tassa 1d44f7a0d0 Minor fix to changelog
PiperOrigin-RevId: 862213255
Change-Id: I20017785aca047efaead582f84a1ba9769411d41
2026-01-28 06:48:39 -08:00
Haroon Qureshi 2fd9b5e92f Partial roll back VFS refactor due internal breakages
PiperOrigin-RevId: 862210191
Change-Id: Ia15a345a267bcef4b593d507d54f1668da0c0611
2026-01-28 06:40:11 -08:00
Yuval Tassa 19ff06155a Refactor sensor computation into per-sensor functions.
PiperOrigin-RevId: 862180688
Change-Id: I9f3f4da8ca8abed778965fd3970171276ee4570d
2026-01-28 05:04:59 -08:00
Yuval Tassa 1d2d0b1c37 Remove batching optimization from GEOM* sensors
PiperOrigin-RevId: 861938606
Change-Id: Ibb135a4d99cab9ce23a04f844f7c730e8f3b31c8
2026-01-27 16:44:10 -08:00
Yuval Tassa 5fb47df197 Add mjData flags marking lazily evaluated pipeline stages
PiperOrigin-RevId: 861763477
Change-Id: Ib613c56949264573a16306800658f868d2aa7665
2026-01-27 09:45:06 -08:00
Alessio Quaglino ba32568138 Move flex vertex-edge adjacency to mjModel.
PiperOrigin-RevId: 861717037
Change-Id: I2ad8090b0318cb04b43d13966cb42260c82ef930
2026-01-27 07:41:47 -08:00
Haroon Qureshi 669e9b7484 Add an "offscreen" mode that allows users to render studio to a texture
then uses SDL to blit the texture into the window.

PiperOrigin-RevId: 861697047
Change-Id: Ib949b4ade0c79d867ba74ce013bc2b6fa2571f56
2026-01-27 06:48:16 -08:00
Yuval Tassa dce2ed00ea Change not required, issue was addressed in e48da1e38c
PiperOrigin-RevId: 861680910
Change-Id: Iea5c7190bf826c9254eb1bd2f78b0098073cba20
2026-01-27 06:03:04 -08:00
Yuval Tassa e787f8717d Change not required, issue was addressed in e48da1e38c
PiperOrigin-RevId: 861680071
Change-Id: I374f091cd2686737e53234ca0edc8703897fbd4a
2026-01-27 06:01:14 -08:00
Haroon Qureshi 75715ab966 Update logic for dealing with file dialogs.
This in preparation for an upcoming change that uses native file dialogs instead
of our very basic ImGui file dialog.

PiperOrigin-RevId: 861671041
Change-Id: I9b00c05efdda5e37ffe15048a2ccf66f6eca89d9
2026-01-27 05:31:01 -08:00
Haroon Qureshi ad482a57bb Add a headless OpenGL renderer target.
PiperOrigin-RevId: 861642051
Change-Id: Ie0b880a2d3d85205dcd41bca5dc270efd35b7767
2026-01-27 04:08:33 -08:00
Haroon Qureshi fe16255602 Add mjz support to studio.
PiperOrigin-RevId: 861627355
Change-Id: Iafd291965ca78d03fdc1efe0e40dabcd4f2dacc4
2026-01-27 03:22:58 -08:00
Haroon Qureshi 32a4412e2b First-pass implementation of a spec loader for zipped assets.
PiperOrigin-RevId: 861625990
Change-Id: I65cf601cd9aa3aab4915a5a247dda00a6a9aa3db
2026-01-27 03:18:30 -08:00
Haroon Qureshi e43ed60d29 Allow GUI to be rendered to texture as well.
Update SetFrameBuffer to allow users to customize which swap chain
(window or offscreen) to use for rendering both the main mjvScene
as well as the GUI.

PiperOrigin-RevId: 861624061
Change-Id: Ife7bfc447afb007016300438fc5f88a8e4cfa0f6
2026-01-27 03:12:05 -08:00
Haroon Qureshi 0ddbb46fa1 Refactor mjVFS and resource management.
Resource operations (e.g. mju_openResource, mju_readResource, and
mju_closeResource, etc.) are now all handled by a VFS instance. It
is now up to the VFS to determine which provider to use in order to
handle those operations.

This allows us to dynamically add/remove (aka "mount") providers to
a VFS to handle special requests. mj_addFileVFS and mj_addBufferVFS
have been reimplemented as two such use-cases. Moreover, we expose
the mounting behaviour with two new functions: mj_mountVFS and
mj_unmountVFS.

PiperOrigin-RevId: 861550939
Change-Id: I070eb4bcc2982466c8f368f7918005538baa5185
2026-01-26 23:53:29 -08:00
Matija Kecman e977b0d660 Fix GIL deadlock in Python viewer methods
Removed the GIL lock in set_figures, clear_figures, set_texts, clear_texts, set_images, and clear_images

PiperOrigin-RevId: 861245200
Change-Id: I52f21d82f9813752c7cb357213c24ea6188583db
2026-01-26 10:11:16 -08:00
Yuval Tassa 5fc6ed4eda Make XML schema dropdown titles clickable links.
PiperOrigin-RevId: 861182944
Change-Id: I01fec8f102a87f8daf65ad5ba5ed3a09c0022cd0
2026-01-26 07:26:27 -08:00
Yuval Tassa 7f8084ae1d Rename XML reference icons to avoid anchor issues.
Before this change:
`https://mujoco.readthedocs.io/en/latest/XMLreference.html#body-site-m`

After this change:
`https://mujoco.readthedocs.io/en/latest/XMLreference.html#body-site`

PiperOrigin-RevId: 861180069
Change-Id: I6f15906c8be463825248487021f9f46fc82a95da
2026-01-26 07:16:08 -08:00
Alessio Quaglino 54ace777c1 Add convenient plugin assignment in Python bindings.
PiperOrigin-RevId: 861168536
Change-Id: I274fbf3460d475434f837ab58bf5e2b0988369fd
2026-01-26 06:37:31 -08:00
Haroon Qureshi bdb553ff8a Add a ModelPlugin that can be used to load and update models.
PiperOrigin-RevId: 861077626
Change-Id: I3ef4989cfbfff3632c5915c00ebda1e7a48716e8
2026-01-26 01:24:43 -08:00
Alessio Quaglino e933081ff1 Optimize flexvert Jacobian computation.
The dense Jacobian arrays `J0_dense` and `J1_dense` are now zeroed only once before the vertex loop. Inside the loop, only the entries that were actually used are zeroed out after being added to the sparse Jacobian, allowing for efficient reuse of the dense arrays across all vertices.

PiperOrigin-RevId: 860799056
Change-Id: Ia61daae5eeb2f4dbc0c5d8c0064622a881e92b7a
2026-01-25 05:22:44 -08:00
Yuval Tassa e48da1e38c Fix __muloti4 linker error on Clang 13
Add `-rtlib=compiler-rt` linker flags for the Clang 13 CI build.

Clang 13 generates calls to __muloti4 (a 128-bit overflow-checked multiplication intrinsic) for signed 64-bit multiplication with overflow detection. This symbol is provided by LLVM's compiler-rt but is missing from GNU's libgcc, which is the default runtime library on Ubuntu.

Related issues:

- https://github.com/llvm/llvm-project/issues/14841
- https://github.com/abseil/abseil-cpp/issues/841
- https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=244169

PiperOrigin-RevId: 860529686
Change-Id: If58dc0328aa1dd87aef8ea02da555f57ad96b02c
2026-01-24 08:15:56 -08:00
Alessio Quaglino e9c61694e1 Align flex_vert0 to the XY plane during model initialization if dim=2.
PiperOrigin-RevId: 860435368
Change-Id: Ida616e1e69c224f7c0dbad2a10dd59e64cbadf49
2026-01-24 00:50:01 -08:00
Alessio Quaglino 769109630f Move flexvert_J and flexedge_J sparsity pattern to mjModel.
PiperOrigin-RevId: 860392796
Change-Id: Ie1264f2df5bf04b5794a3c7d8ad1a92524a6a567
2026-01-23 22:00:14 -08:00
Alessio Quaglino 7da271c687 Add vertex equality option.
PiperOrigin-RevId: 860299454
Change-Id: I7befd8e5f4c8bac6d74684a96a9cc3cee9ae1e29
2026-01-23 16:30:05 -08:00
Yuval Tassa a5de40b400 Replace mjtSize with size_t for size calculations in engine.
Use unsigned size_t instead of signed mjtSize for size multiplications to avoid Clang's overflow-checking intrinsic. This is semantically correct as size calculations are inherently unsigned.

PiperOrigin-RevId: 860213177
Change-Id: I837aa6556335478969d4977492d0f231419f020a
2026-01-23 12:35:13 -08:00
Yuval Tassa 68537e1e32 Replace mjtSize with size_t for size calculations.
Use unsigned size_t instead of signed mjtSize for size multiplications to avoid Clang's overflow-checking intrinsic. This is semantically correct as size calculations are inherently unsigned.

PiperOrigin-RevId: 860172221
Change-Id: I3b6cb720db8771b8f266f1927e2980ac7514538b
2026-01-23 10:51:43 -08:00
Yuval Tassa 30b903b6c0 Migrate mjModel size fields from int to mjtSize.
This change updates all size-related members within the `mjModel` struct from `int` to `mjtSize`. This allows MuJoCo to handle models with a larger number of elements. Corresponding changes were made to macros, function signatures, and I/O routines to accommodate the new `mjtSize` type.

PiperOrigin-RevId: 860144595
Change-Id: I701c6d607715d240766b6210a9773cd9e4258c59
2026-01-23 09:41:49 -08:00
Taylor Howell 4a64017a5f Add documentation for MJX API
PiperOrigin-RevId: 860108133
Change-Id: I85469efcfe49d320ef8b89c9d174f33499a22b31
2026-01-23 07:53:17 -08:00
Google DeepMind c55c9a7bf1 Replace printf with mju_error in WASM bindings.
PiperOrigin-RevId: 860099912
Change-Id: Ia6a24da9301099aa976bb7a38beb9da15074a43d
2026-01-23 07:26:13 -08:00
Sam Haves 2582a83ac3 Add equalityJointAPI to mjcPhysics.
PiperOrigin-RevId: 860081702
Change-Id: Ifd961dcb2a8e0f5d885e9e9dadc0153b03cb5f4d
2026-01-23 06:28:29 -08:00
Google DeepMind e1992e62d7 Add mj_loadBinary binding to WASM.
This change adds an Emscripten binding for loading binary MuJoCo models (`.mjb`) from the virtual filesystem. The new binding, `mj_loadBinary`, takes a filename and an `MjVFS` object, enabling the loading of models that reference assets within the VFS.

PiperOrigin-RevId: 859740455
Change-Id: I9f9d8bbba0b57422e2356867e4282a1b04566475
2026-01-22 13:08:00 -08:00