Commit Graph

4128 Commits

Author SHA1 Message Date
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
Saran Tunyasuvunakool 496f6b47fc In mjpython, check the result of Py_InitializeFromConfig.
This is to properly handle the case where the interpreter wants to exit immediately, e.g. when `mjpython --version` is run.

Currently, we call `PyGILState_Ensure` regardless of the result of `Py_InitializeFromConfig` resulting in a segfault, as in issue #2870.

PiperOrigin-RevId: 869652555
Change-Id: I3a898279eb8aa25afbaece904cfdcc4fdcc92972
2026-02-13 03:44:58 -08:00
Taylor Howell 881544c0c5 Modify MuJoCo Warp dev version check
PiperOrigin-RevId: 869311325
Change-Id: I2f34bd932d7998d37b96b36e5d561f734567b8d5
2026-02-12 11:39:28 -08:00
Michael Moss 716ae107c6 Update dependencies and changelog ahead of the 3.5.0 release.
PiperOrigin-RevId: 869221912
Change-Id: I77aa1f898009c5d24218434863d0588ddf8a058b
2026-02-12 08:08:14 -08:00
Michael Moss 16c58b9951 Fix RC file syntax error for pedantic compilers. Fixes #839
PiperOrigin-RevId: 869211177
Change-Id: I42a0dacde6ca6652df1803033c2b96a7c7076616
2026-02-12 07:40:06 -08:00
Yuval Tassa 54b8b68b23 Prepare changelog for release
PiperOrigin-RevId: 869124525
Change-Id: I7ea6f3c1cf163e98b1bc0b8ed87f8e44afd59ab5
2026-02-12 03:16:34 -08:00
Yuval Tassa 14116336e0 Clarify time argument semantics in delayed actuator/sensor reads.
PiperOrigin-RevId: 869123314
Change-Id: Ib36ef6cfc8d12d1b8a9c98eadc144953447fc444
2026-02-12 03:12:45 -08:00
Yuval Tassa c54f1fe380 Use semantic versioning.
PiperOrigin-RevId: 869102767
Change-Id: I8b01b9343289d4ad7d15bcc3634a28e661308a90
2026-02-12 02:11:20 -08:00
Yuval Tassa a8cf4e012d Add Colab link for System Identification toolbox.
PiperOrigin-RevId: 869091889
Change-Id: Ib5ec2e451c7037cc92b4cb1a9c58d05f0049b298
2026-02-12 01:41:40 -08:00
Haroon Qureshi 8e5436c335 Make phong-shading multipliers configurable.
PiperOrigin-RevId: 869080920
Change-Id: I4eb7311b54270d596c09a01d6725c1efb931de4b
2026-02-12 01:09:30 -08:00
Kevin Zakka 2396a2541c Copybara import of the project:
--
4cabc9c52dc07ea2d64a3de6dbd58e47a2ad023c by Kevin Zakka <kevinarmandzakka@gmail.com>:

Add system identification tutorial and fix template packaging

- Add sysid tutorial notebook (sysid.ipynb)
- Include HTML templates in package-data to fix TemplateNotFound errors
  when pip installing mujoco[sysid]

COPYBARA_INTEGRATE_REVIEW=https://github.com/google-deepmind/mujoco/pull/3092 from kevinzakka:sysid-notebook 4cabc9c52dc07ea2d64a3de6dbd58e47a2ad023c
PiperOrigin-RevId: 868900119
Change-Id: I53c4cc94b5fb6f864c5cee589af9dfad9bfc8744
2026-02-11 16:43:08 -08:00
Yuval Tassa 6af0d4c823 Replace margin/gap max with sum.
PiperOrigin-RevId: 868842521
Change-Id: Ia4a4ca5c6821c5a7b3ba7b0af7f71d981c2866c1
2026-02-11 14:22:27 -08:00
Google DeepMind 336e1026a4 Sparse ten_J and ten_J_colind memory
PiperOrigin-RevId: 868834376
Change-Id: Iec92d9e09e3134666895e54a78cb02439d74a4de
2026-02-11 14:05:43 -08:00
Yuval Tassa b466829482 Fix implicit integrator derivatives when actuator force is clamped.
The derivatives of actuator velocity with respect to generalized velocities were incorrectly computed when the actuator force was limited by `forcerange`. This CL adds a check to zero out these derivatives when the actuator force is at its upper or lower limit, as the force is no longer a function of velocity in this clamped state.

PiperOrigin-RevId: 868818281
Change-Id: I89742a3f04989dd11f9cfada107200015b1472a7
2026-02-11 13:31:07 -08:00
Taylor Howell d011285380 Sparse ten_J and ten_J_colind memory
PiperOrigin-RevId: 868800229
Change-Id: Id83f9fd40dd9bece06fd99753e4202eea17ca884
2026-02-11 12:45:50 -08:00
Taylor Howell 94e834bf4f Import google-deepmind/mujoco_warp from GitHub.
PiperOrigin-RevId: 868759523
Change-Id: I83a9f014840e66d7775a3684aa2e59ec5a077191
2026-02-11 11:14:24 -08:00
Yuval Tassa 883ba2134d Add System Identification toolbox to changelog.
PiperOrigin-RevId: 868759286
Change-Id: I7845c0858a9ba8188f02b84259306f2638823267
2026-02-11 11:13:27 -08:00
Adrian Collister d881e9e374 Change tex_adr type to mjtSize.
Adds a test which verifies that we can index into the texture buffer at offsets larger than can be represented by a 32-bit signed int.

PiperOrigin-RevId: 868756646
Change-Id: Ibc1a2b269fce41aec370611b0aab77803837e7a8
2026-02-11 11:09:36 -08:00
Yuval Tassa 2b5afce4aa Fix island graph construction for multi-tree constraints, fixes #3073
Replace dynamically-sized edge list with a dense ntree×ntree adjacency matrix for deduplication and a flat CSR representation.

PiperOrigin-RevId: 868728432
Change-Id: Iebe97a0870740e5465549b967bbde0c81e658269
2026-02-11 10:05:32 -08:00
ashutosh0x c962188655 Fix zero-sized allocation crash on Windows
On Windows, _aligned_malloc(0) returns NULL, which MuJoCo interprets as a fatal out-of-memory error. This causes crashes on models with empty arrays.

Ensure a minimum allocation of 64 bytes for any 0-sized request.

Fixes #2992
2026-02-11 22:33:28 +05:30
Google DeepMind cc5d544d15 Update typos in sysid/README.md
PiperOrigin-RevId: 868690171
Change-Id: Iffc71fb7bad73e18be767429600936014095ed9e
2026-02-11 08:25:56 -08:00
Copybara-Service e9de358bfc Merge pull request #3076 from yurekami:fix/plugin-symlink-loading
PiperOrigin-RevId: 868602117
Change-Id: Ice4d7991f46dad45736864baebd7378cc24e9d4f
2026-02-11 04:13:41 -08:00
Copybara-Service 91751a506b Merge pull request #3082 from aftersomemath:sysid-pr2
PiperOrigin-RevId: 868599752
Change-Id: Ifb57f34857d542b542b8ac9f047397c651f8008b
2026-02-11 04:06:44 -08:00
Yuval Tassa 7f74487a26 Fix implicit integrator derivatives for actearly actuators.
The derivative calculation for actuator velocity in implicit integrators now correctly accounts for the `actearly` flag, using the next activation value when `actearly` is true.

PiperOrigin-RevId: 868598722
Change-Id: Ia180afb15b31a718170aeaf9d4ac514bb9e6073b
2026-02-11 04:03:46 -08:00
Levi Burner e89dae359e sysid: named ic construction, bug fixes, docstrings, README, more tests
Co-authored-by: Kevin Zakka <kevinarmandzakka@gmail.com>
2026-02-11 00:22:56 -05:00
Haroon Qureshi 730d494b7f Focus default camera on the model if available.
PiperOrigin-RevId: 868407477
Change-Id: Iac37bcfe8657dededeeecc70db3e4ac18f8ef151
2026-02-10 18:17:33 -08:00
Sam Haves 6715a0ceaa Expose mju resource functions to public header.
Many of these functions are useful when writing a custom decoder.

PiperOrigin-RevId: 868321921
Change-Id: I7e0dd285e0559b6f486acf8cbf4376ff8d91943d
2026-02-10 14:31:41 -08:00
Baruch Tabanpour 210cf86486 Use kernel cache dir per mjx-warp test fixture.
PiperOrigin-RevId: 868259579
Change-Id: I9f1346899591ca603ad2e34949d22b78c464c2ad
2026-02-10 12:10:28 -08:00
Alessio Quaglino 419b96cb91 Reduce simulation steps in MjCollisionTest.PinchingSucceeds.
PiperOrigin-RevId: 868229821
Change-Id: I781955a8f06ca2338baa713ff6a3448b4743b35e
2026-02-10 11:05:10 -08:00
Copybara-Service 3ec09f7296 Merge pull request #3079 from aftersomemath:sysid-pr
PiperOrigin-RevId: 868229512
Change-Id: I790bc08fc8b0745583a2f92d9ee2c5a19ba558ea
2026-02-10 11:04:12 -08:00
Baruch Tabanpour 3c107b3047 Add stage_in and stage_out for MJX-Warp.
PiperOrigin-RevId: 868180029
Change-Id: I0d1b17b6023d32498766b5d1d9e5624bd31cda3d
2026-02-10 09:19:09 -08:00
Copybara-Service 7ef3ae6ad1 Merge pull request #3061 from LouRohanNV:fixUsdMaterialInterfaces
PiperOrigin-RevId: 868177637
Change-Id: I2de8f2af3b5fc126d103256b1ea00c5f8c7a8955
2026-02-10 09:12:10 -08:00
Yuval Tassa 4fa062c7e5 Update unreleased MuJoCo version from 3.4.1 to 3.5.0.
PiperOrigin-RevId: 868169291
Change-Id: I8041842811f5f664c80116993315f50d549b5575
2026-02-10 08:52:04 -08:00