Commit Graph

4161 Commits

Author SHA1 Message Date
Matija Kecman 8f56d5eefa Minor style fixes
PiperOrigin-RevId: 872669434
Change-Id: I794173b9fad3a286cbf57d246b2f8672412a0e20
2026-02-19 19:16:31 -08:00
Matija Kecman ca0552c83b Cleanup Studio toolbar
PiperOrigin-RevId: 872618794
Change-Id: I2e8f99dc47937416c8516ed1df7821369211b12f
2026-02-19 16:34:38 -08:00
Alessio Quaglino 8ba68cee3e Limit the number of flex contacts per collision pair.
This change introduces a filter for flex-related contacts, ensuring that no more than mjMAXCONPAIR contacts are kept for each geom-flex, flex-flex, flex internal, and flex self-collision pair. The contacts are sorted using farthest-point sampling:

- Starts with the deepest penetrating contact
- Iteratively selects the contact farthest from already-selected contacts
- Produces a spatially distributed set of contacts

PiperOrigin-RevId: 872593388
Change-Id: I50b233a0dc66da6a297852c258ba514f131c8f23
2026-02-19 15:32:17 -08:00
Taylor Howell fe50efd41a Sparse tendon Jacobian update for MuJoCo Warp
PiperOrigin-RevId: 872550625
Change-Id: Ifc5afacb048bec36ef6455072b188396db958002
2026-02-19 13:52:25 -08:00
Baruch Tabanpour 86bca81d18 Update mjx docs and changelog.
PiperOrigin-RevId: 872535000
Change-Id: I51b05a22ac553c34b436de63f43c7efca6607724
2026-02-19 13:18:10 -08:00
Baruch Tabanpour 62a32386d6 Add pmap support for mjx-warp render.
PiperOrigin-RevId: 872533248
Change-Id: I828303866c31d33d2367dd9fba4eb42028c67540
2026-02-19 13:14:22 -08:00
Taylor Howell 84431fbf7e Improved upper bound for nJten
PiperOrigin-RevId: 872479828
Change-Id: I750d56320d6ace6145475d378cb9d0c30919438d
2026-02-19 11:09:25 -08:00
Taylor Howell 9efe41c0c1 Remove dense code path for tendon Jacobian
PiperOrigin-RevId: 872444531
Change-Id: I6180101abc49469a72aee8bec5726e1e94f142ec
2026-02-19 09:53:49 -08:00
Haroon Qureshi 10524c28dd Track and restore viscous pause state every frame.
PiperOrigin-RevId: 872382150
Change-Id: I96bddcfb2a0a204c6505e9795dfff97f09834855
2026-02-19 07:06:38 -08:00
Copybara-Service cdc1f266c6 Merge pull request #3114 from thowell:lint
PiperOrigin-RevId: 872331279
Change-Id: I26848d48e3f66f29f32a9a03ab38f373123abd1d
2026-02-19 04:31:19 -08:00
Haroon Qureshi ab80bd0916 Allow model holder to release ownership of mujoco structs.
PiperOrigin-RevId: 872242489
Change-Id: I055f54f4e111cc78c489c12d9ae5c02cfb57169d
2026-02-19 00:06:07 -08:00
Baruch Tabanpour ccd282b036 Update MJX docs with MJX-Warp.
PiperOrigin-RevId: 872083735
Change-Id: Id09b82d1f6e7a69ec34353ba35a63edb5eae1046
2026-02-18 16:02:57 -08:00
Baruch Tabanpour 3c858f871b Keep render_util arg order consistent between mujoco_warp and mjx-warp.
PiperOrigin-RevId: 872055868
Change-Id: Ic5b4bdedbdb353dc0b1385cf555261a86407cfdb
2026-02-18 14:57:06 -08:00
Copybara-Service 57c2316b9e Merge pull request #3080 from kevinzakka:fix-fusestatic-camera-light-crash
PiperOrigin-RevId: 872054304
Change-Id: I9eab499002077afa46b236e8eae13100285f362c
2026-02-18 14:53:30 -08:00
Baruch Tabanpour 485e2eb028 Fix bug in mjx-warp render vmap.
PiperOrigin-RevId: 871901512
Change-Id: Ifc25e98ffd89284cc6db9248bcca352bb8811e7e
2026-02-18 09:10:34 -08:00
Copybara-Service 7d3e1abb21 Merge pull request #3083 from Ashutosh0x:fix/mingw-linker-stack
PiperOrigin-RevId: 871828475
Change-Id: I8abe526a81b9c1f51307729b5dde01aad809ff97
2026-02-18 05:59:41 -08:00
Copybara-Service 42514920c4 Merge pull request #3111 from StafaH:main
PiperOrigin-RevId: 871825088
Change-Id: I1e9c4a559a19427753cfdbacc7c7254ad0cb9c6c
2026-02-18 05:48:03 -08:00
Haroon Qureshi fdf6f1017c Remove enable_keyboard flag.
PiperOrigin-RevId: 871823567
Change-Id: I1e307f366106aa542a66b68b8e057b35c25134c9
2026-02-18 05:43:33 -08:00
Taylor Howell bb0b5ca521 lint 2026-02-18 12:43:31 +00:00
Taylor Howell 8541128853 Update _get_data_into_warp. Fixes #3109
PiperOrigin-RevId: 871790690
Change-Id: I225579f7559ca5c1de92af6606d02ff763f9f4d1
2026-02-18 04:04:29 -08:00
ashutosh0x 50349dc685 Fix MinGW stack flag syntax and Python binding crashes
- Detect linker type (lld-link vs ld) and use the appropriate stack flag: /STACK:16777216 for lld-link, --stack,16777216 for MinGW ld

- Filter out stack-related flags from Python binding modules to prevent crashes when loading MuJoCo as a DLL in Python

Fixes #3011
2026-02-18 14:22:59 +05:30
Haroon Qureshi 6b197e198a Reset free camera when loading a new model.
PiperOrigin-RevId: 871622663
Change-Id: I1f1a4681752f7436c7bc7adbe64dcea286c5620c
2026-02-17 20:08:02 -08:00
Kevin Zakka fa43e2c03b Fix tracking camera detaching when toggling visualization flags, fixes #3108
Toggling visualization flags via keyboard shortcuts (e.g., C for contact points, F for contact forces) causes the SECT_RENDERING event handler to unconditionally re-evaluate the camera selection, which can reset a tracking camera to free mode. This particularly affects users of mujoco.viewer who set tracking cameras programmatically.

Guard the camera update logic so it only runs when the camera selector itself is changed, not when other items in the rendering section are modified.

PiperOrigin-RevId: 871600340
Change-Id: Ia6ef2a1617c6cdc18c7d10b4b099a8f2c620a824
2026-02-17 18:59:33 -08:00
Baruch Tabanpour f6129596a6 Save depth images in visualize_render.py
PiperOrigin-RevId: 871454618
Change-Id: If844e2c4af10e271536c4e6a36e760e8d4d50374
2026-02-17 12:55:39 -08:00
Mustafa Haiderbhai b7875df580 Fixes 2026-02-17 14:54:26 -05:00
Sam Haves 448e221690 Raise ValueError if adding a spec results in a duplicate name.
PiperOrigin-RevId: 871397807
Change-Id: I50742efe7ba194ed3b1fe916f05e35b7fb2d7ec0
2026-02-17 10:54:47 -08:00
Taylor Howell af802a5386 Import google-deepmind/mujoco_warp from GitHub.
PiperOrigin-RevId: 871338519
Change-Id: I6ef9b4a4c3b623a87f4c43efa798b6757ac534ae
2026-02-17 08:48:20 -08:00
Taylor Howell 4d256c0ff1 MuJoCo Warp documentation: nccdmax / naccdmax
PiperOrigin-RevId: 871221522
Change-Id: Ia4e5c9a700b809815bd40af048762bfecde9231a
2026-02-17 03:12:50 -08:00
Haroon Qureshi 767e52fb5b Fire projectiles when hitting "Ctrl+Shift+Enter".
PiperOrigin-RevId: 871215312
Change-Id: Ie22699d5446a49ea6997594b2800cf72840554c1
2026-02-17 02:53:31 -08:00
Haroon Qureshi 4ce9fb53ee Re-enable MJZ support.
Disabled on Windows until we can make plugins work correctly.

PiperOrigin-RevId: 871214280
Change-Id: I831238704c2807e70f4347989d642a189764e53c
2026-02-17 02:51:14 -08:00
Alessio Quaglino 8024124572 Use stack allocation for temporary flex rigidity storage in mj_setConst. Fixes #3081
PiperOrigin-RevId: 871200819
Change-Id: Ifbc1c0bd62261325a06a246cb2adb1106c02f829
2026-02-17 02:16:07 -08:00
Haroon Qureshi 989b6e63c7 Add ability to delete bodies.
PiperOrigin-RevId: 871200603
Change-Id: I08bc786ca8106ef13cfcbe89e8cc42e9ad2c99d5
2026-02-17 02:14:54 -08:00
Mustafa Haiderbhai 911124f2c6 Add batch rendering to readme 2026-02-17 00:21:10 -05:00
Haroon Qureshi 8f2799a34b Move renderer.py and gl_context.py into a submodule.
PiperOrigin-RevId: 870789311
Change-Id: Iaa0fcc764a770eeb4570a6a189a5ad032d41d64c
2026-02-16 02:41:35 -08:00
Taylor Howell 66a413419a Reorder Option fields
PiperOrigin-RevId: 870779423
Change-Id: Ie356725810a820e910396abd9daef0f9c9f94abc
2026-02-16 02:18:23 -08:00
Copybara-Service 160e601ba1 Merge pull request #3085 from Ashutosh0x:fix/windows-zero-alloc
PiperOrigin-RevId: 870765044
Change-Id: I91b6a6096fe58200f8b36fda62838046a9ee08fe
2026-02-16 01:47:04 -08:00
Saran Tunyasuvunakool 2efca34f58 Fix mjpython after breakage from 496f6b47fc.
PiperOrigin-RevId: 870253531
Change-Id: Icfbfaed41d4cdd3f8472c37a254cb7b1f2a32d7b
2026-02-14 14:32:42 -08:00
Baruch Tabanpour 538c131415 Last bits of mjx-warp render codegen.
PiperOrigin-RevId: 869900622
Change-Id: If86942fddc45b9d71505d7fc4e2345dc120ccab2
2026-02-13 14:55:26 -08:00
Baruch Tabanpour bbfe7fe0e2 Update mjx-warp render with partial codegen.
PiperOrigin-RevId: 869874195
Change-Id: I71a16a6c192873786a09211dc4d326c3a4115ad9
2026-02-13 13:50:07 -08:00
Saran Tunyasuvunakool faf55f7020 Fix header_test.cc.
C++ standard says the argument to alignof must be a type. Clang and GCC are permissive but MSVC isn't.

PiperOrigin-RevId: 869823902
Change-Id: I7e113ce62a60cc9be499e8580846a5258deea001
2026-02-13 11:43:45 -08:00
Baruch Tabanpour fb47ff01cd initial implementation of mjx-warp render.
PiperOrigin-RevId: 869822624
Change-Id: Ic20db1dcc2e7287752b273c4ad986066cceccad9
2026-02-13 11:40:55 -08:00
Matija Kecman 1808079c62 Implement viscous pause in Studio
Viscous pause is like pause but the simulation continues with zero gravity, high viscosity and passive springs disabled. It is useful to move things like cabinets with shelves---just move the shelf and the drawers come along as well.

* Updated the simulation control widgets
* Added Ctrl-space shortcut to toggle play/viscous pause

PiperOrigin-RevId: 869810053
Change-Id: Icf649e1f2631c2a64a5d2f25af9537b6a12bdf2c
2026-02-13 11:11:15 -08:00
Saran Tunyasuvunakool 5274e5f720 Clean up X macros and usages for mjOption, mjStatistic, and mjVisual.
* Replace various MJOPTION_ macros with a single MJOPTION_FIELDS.
* Use XVEC macro to denote vector members where there is a mixture of
  vector and scalar members in a given struct type.
* Split up MJVISUAL_FIELDS into separate macros for each substruct.
* Modify engine_print.c and Python bindings struct.h/cc to use the
  new X macros.

PiperOrigin-RevId: 869760513
Change-Id: Idac4fe9aa99f0258e7c79802ca9023a0d4486e2d
2026-02-13 09:10:36 -08:00
Haroon Qureshi 6d8b6028e2 Tweak default lighting and specularity for non-PBR scenes.
Most "classic" objects looked washed out. To "revert" to the old look, you can add the following to your XML files:

```
<custom>
    <numeric name="filament.phong.specular_multiplier" data="0.1"/>
    <numeric name="filament.fallback.scene_light_intensity" data="100000.0"/>
    <numeric name="filament.fallback.environment_light_intensity" data="10000.0"/>
</custom>
```

PiperOrigin-RevId: 869725829
Change-Id: Icab0cedaa27915400497745db886c393709c14b1
2026-02-13 07:37:36 -08:00
Taylor Howell 5903d4826f Sparse ten_J and ten_J_colind
PiperOrigin-RevId: 869712136
Change-Id: Id2979684aa0c39552cb8453852483cbac55f0ea3
2026-02-13 06:57:22 -08:00
Yuval Tassa 277f469239 Update sensor delay documentation to use "period" instead of "interval".
PiperOrigin-RevId: 869711956
Change-Id: I981c04aea58b5ce8a1cf8f2cdceba841e7729ccb
2026-02-13 06:56:15 -08:00
Matias Manevi bf39b1172f Copybara import of the project:
--
b1734da56e293b50e7bd0cc8b9a8ee5677aa70ec by MatiasManevi <manevimatias@gmail.com>:

Improve wording for WASM Windows support status

COPYBARA_INTEGRATE_REVIEW=https://github.com/google-deepmind/mujoco/pull/3095 from MatiasManevi:wasm-readme b1734da56e293b50e7bd0cc8b9a8ee5677aa70ec
PiperOrigin-RevId: 869699309
Change-Id: I2780d2406139e33eeb5521f509245d29b69a61ab
2026-02-13 06:17:27 -08:00
ashutosh0x 04e5df08a9 Update mju_malloc to return NULL for zero-sized allocations 2026-02-13 19:22:05 +05:30
Michael Moss 84f254f7c7 Update benchmark dep and add workaround for Clang breakage.
PiperOrigin-RevId: 869687267
Change-Id: If4ce7a107b1489b30475d8778e7347503298dbbe
2026-02-13 05:39:24 -08:00
Michael Moss 42958aab81 Update MuJoCo version from 3.5.0 to 3.5.1 following the 3.5.0 release
PiperOrigin-RevId: 869654894
Change-Id: I9cacaf4cbb70ad17faa24c3c30ec38ffe91b5deb
2026-02-13 03:54:25 -08:00