Commit Graph

4069 Commits

Author SHA1 Message Date
Haroon Qureshi be93e8eeb2 Give Resource Providers a chance to load files.
File resolution only checks local file system. Resource providers may still
be able to load from a path even if it is not resolved.

PiperOrigin-RevId: 867534134
Change-Id: I802566136b965ad839393f56a4d4924dda2e1973
2026-02-09 04:23:44 -08:00
Haroon Qureshi 8557cf201b Allow root models to be in a subfolder.
PiperOrigin-RevId: 867217045
Change-Id: Iae6f7c7f137c2b229b52d93aacea1a4c9e06003e
2026-02-08 08:08:09 -08:00
Yuval Tassa ed15493aef Reorganize changelog
PiperOrigin-RevId: 867201472
Change-Id: I5841bd10656546db7c544ff910ed2983ce88415e
2026-02-08 06:48:14 -08:00
Yuval Tassa d680b3d234 Rename "delay" buffer functions to "history" buffers.
The functions and associated tests related to managing time-stamped data buffers have been renamed from `mju_delay*` to `mju_history*` to better reflect their general purpose beyond just handling delays.

PiperOrigin-RevId: 866978339
Change-Id: I8655e91bce783287ad2adc412d13a1c39aa2c322
2026-02-07 14:10:16 -08:00
Alessio Quaglino e6639f1e29 Apply prefix/suffix to flex material names.
PiperOrigin-RevId: 866518766
Change-Id: I5f042f52a27d2a6c66fe9642bccc73328fe14603
2026-02-06 10:32:32 -08:00
Saran Tunyasuvunakool 74d657a777 Add X macros for mjVisual and mjStatistic.
PiperOrigin-RevId: 866502731
Change-Id: I7cfaf3cd96512d93c801b7611eedb71689e21a5b
2026-02-06 09:53:22 -08:00
Yuval Tassa 6419534bad Add actuator and sensor delays. Fixes #1004
PiperOrigin-RevId: 866478839
Change-Id: Id21a6da0f98454c8fa39ea5af8a5e213d6eae497
2026-02-06 08:47:36 -08:00
Yuval Tassa 84fa527723 Add delay buffer utilities to engine_util_misc.
PiperOrigin-RevId: 866450284
Change-Id: I86d6dd6a6f7519640f75ca405fb60a12e8619c86
2026-02-06 07:22:34 -08:00
Haroon Qureshi 60b5b1d59d Fix include path.
PiperOrigin-RevId: 866348008
Change-Id: Ie67fc38ac108810c1ecbefbb8d26c394d988956b
2026-02-06 01:52:03 -08:00
Haroon Qureshi 3e8a81383a Move mjSpec/mjModel/mjData management into a separate class.
PiperOrigin-RevId: 866327584
Change-Id: I72f6ec656e193f67dee22214fe01c517432f87e5
2026-02-06 00:51:15 -08:00
Haroon Qureshi eb7aaa2868 Internal changes.
PiperOrigin-RevId: 866317956
Change-Id: Ic92c0f9b7005198025e388f83dff630253240b3b
2026-02-06 00:22:31 -08:00
Sam Haves c63ba211e5 Refactor MjcPhysics EqualityJointAPI polynomial coefficients.
The single array attribute `mjc:polycoef` has been replaced by five individual double attributes: `mjc:coef0`, `mjc:coef1`, `mjc:coef2`, `mjc:coef3`, and `mjc:coef4`.

PiperOrigin-RevId: 865947359
Change-Id: If9d14a77b0a06e5dc712eeadd6e9402411570706
2026-02-05 07:56:11 -08:00
Sam Haves 7b0b3cf8e3 Set CMAKE_INSTALL_RPATH for USD decoder plugin.
PiperOrigin-RevId: 865918418
Change-Id: If56b83925301b8d02411c35ae5906901a8dd97f8
2026-02-05 06:37:18 -08:00
Alessio Quaglino 6afd742f43 Fix trilinear flexcomp with unused vertices.
Fix a crash and dimension mismatch issue in user_flexcomp when dealing with interpolated="true" meshes that contain unused vertices. Previously, vertbody would correspond only to used vertices while vert included all vertices, leading to assertions or out-of-bounds access. Also enable node pinning for interpolated meshes.

PiperOrigin-RevId: 865881995
Change-Id: Id150f00f22b5f48896ffbffddf03c57b252de8c0
2026-02-05 04:41:02 -08:00
Taylor Howell a52180069c MuJoCo Warp documentation: Options update
PiperOrigin-RevId: 865820928
Change-Id: I36fd4c52ad8bcb9cc8ecae7c93410023a4e56ed0
2026-02-05 01:47:51 -08:00
Sam Haves a6a639003f Fix number of textures in BM_CompileManyTextures to 100.
PiperOrigin-RevId: 865475996
Change-Id: I63fd1e8b9aaff9536a9609d8f8390f8c9473785e
2026-02-04 10:35:20 -08:00
Baruch Tabanpour d07f39b4a0 Add graph mode to MJX, in preparation of supporting staged graph capture.
PiperOrigin-RevId: 865380826
Change-Id: I840b48027e1142f87eb745d0d19b0cd3e87904b2
2026-02-04 06:38:13 -08:00
Haroon Qureshi b37caf6d0c Show save dialog (instead of open dialog) as needed.
PiperOrigin-RevId: 865374467
Change-Id: I599333659b12b05b7c779115fa397302f4978751
2026-02-04 06:20:01 -08:00
Haroon Qureshi 1a0fe29c41 Make missing decoder non-failing.
Otherwise, if you try to open a random file in studio, it will crash.

PiperOrigin-RevId: 865372002
Change-Id: I96d3121b6de792daaff53155ea2436ac3f6668db
2026-02-04 06:12:54 -08:00
Kyle Bayes 1a9ca3239a Replace comma operator with semi-colon.
PiperOrigin-RevId: 865353927
Change-Id: I3498d8dc17f96caf8fa1975613ed6a815d2f20e7
2026-02-04 05:14:17 -08:00
Haroon Qureshi c2ede20d08 Move model_, data_, and spec_ into private accessors.
This is in preparation for an upcoming change.

PiperOrigin-RevId: 865332731
Change-Id: I74041b3caf5de841f583f76682e1ced049557202
2026-02-04 04:02:52 -08:00
Haroon Qureshi 0add985a15 Handle null camera and vis_option.
PiperOrigin-RevId: 865088406
Change-Id: I4a3bf7f6cb696de1461bc53fd5d77b941ea0c0c5
2026-02-03 16:06:06 -08:00
Haroon Qureshi 1bd72428f1 Perform ImGui calls only when a context is available.
PiperOrigin-RevId: 865072901
Change-Id: I4b35d953df2f686d2f02f8e0aede7109729b5e04
2026-02-03 15:29:44 -08:00
Haroon Qureshi 144a8a9e85 Make EGL utils conditional on EGL.h.
PiperOrigin-RevId: 865064686
Change-Id: I3728de6e49e4c36d76b410c2458767f74df069c9
2026-02-03 15:09:51 -08:00
Haroon Qureshi feb3abcccf Fix paths.
PiperOrigin-RevId: 864933655
Change-Id: I44f34b47fe4f6725de59c6565f6b2b557b80eaa6
2026-02-03 10:16:19 -08:00
Taylor Howell 0ec7259e5c MuJoCo Warp documentation: Options
PiperOrigin-RevId: 864932415
Change-Id: I54fc7e8972ea38da783c5537fdfa62644f180e51
2026-02-03 10:14:22 -08:00
Haroon Qureshi ef8e6802ef Move EGL initialization into a separate class.
Initialize the EGL context in the Renderer when using the classic
rendering engine with no window.

PiperOrigin-RevId: 864884976
Change-Id: Ic6cc4637855a361e41f3bfb4b738c012ec93711f
2026-02-03 08:12:35 -08:00
Haroon Qureshi 7ec8b6e341 Pause sim when loading an empty model.
PiperOrigin-RevId: 864855430
Change-Id: Ib8c2b0949ee6fda8dd1490017e146d792119e840
2026-02-03 06:49:58 -08:00
Haroon Qureshi 34add7bb32 Removing trailing newline in zenity file dialogs.
PiperOrigin-RevId: 864842389
Change-Id: Ie4cc61a91732fcde0ef2c7eba927aede217b2e6d
2026-02-03 06:15:37 -08:00
Haroon Qureshi e82253e86c Prevent file dialog from reopening after being dismissed.
PiperOrigin-RevId: 864842269
Change-Id: I91819a3418875fe06dbed0cf7777e1dc7d358079
2026-02-03 06:14:35 -08:00
Haroon Qureshi 1a2bca4986 Use runtime enum for the renderer backend instead of preprocessor macros.
TESTED:
  studio:vulkan
  studio:vulkan --offscreen_mode=true
  studio:opengl
  studio:opengl_egl
  studio:classic
  studio:classic --offscreen_mode=true
  studio:server
  robot_sim/frontend:debug_server
  pyviewer:example
  pyviewer:example --define=mujoco_gl=vulkan
PiperOrigin-RevId: 864768322
Change-Id: I4478e0115b3807060d60d98b4ddfd63da9389aac
2026-02-03 02:13:15 -08:00
Taylor Howell 24e5b966c3 MuJoCo Warp documentation: remove beta software warning.
PiperOrigin-RevId: 864761934
Change-Id: I56afaf9bf9e86ed3ea34ff576230d3b3bc4bf28a
2026-02-03 01:56:35 -08:00
Alessio Quaglino a54c9f1d78 Specialized box and capsule collision primitives for stable 2D flex interactions.
PiperOrigin-RevId: 864500749
Change-Id: I52aed6e29569477a8a0b6b5eb55ad483f1077c0e
2026-02-02 13:36:42 -08:00
Sam Haves 8344dba11e Remove special USD handling from simulate CMakeLists.
USD support is now enabled via plugin.

PiperOrigin-RevId: 864491943
Change-Id: Ib0a80413821b0f398ff05bf87c8fb79e93a811e6
2026-02-02 13:15:48 -08:00
Sam Haves 49b4790877 Enable multithreading for texture compilation, use new user ThreadPool for compilation.
PiperOrigin-RevId: 864449279
Change-Id: I5dd053ab0b1f14d81e1f68296eadc59cd5b8d698
2026-02-02 11:35:41 -08:00
Sam Haves f0d5ed73b2 Restore cache capacity after BM_CompileManyTextures benchmark.
The BM_CompileManyTextures benchmark temporarily sets the MuJoCo cache capacity to 0. This change ensures that the original cache capacity is restored after the benchmark completes, preventing side effects on other tests.

PiperOrigin-RevId: 864332653
Change-Id: I5f756e30d4922d5e6f9b70d19ba9d0e31cde9259
2026-02-02 06:43:05 -08:00
Sam Haves 683b1b5d38 Create threadpool for src/user and primarily compiler usage.
PiperOrigin-RevId: 864328236
Change-Id: Iffaa9b8e6eacdb038020af9d6ad82d7cb7a6c941
2026-02-02 06:31:00 -08:00
Haroon Qureshi b7a46d04b6 Implement OS-specific file dialogs.
PiperOrigin-RevId: 864235878
Change-Id: I709fc52c0c467f317694ba0772572a448c45de35
2026-02-02 01:33:40 -08:00
Yuval Tassa 815dbb996e Use body_weldid to find the first movable body in a chain.
PiperOrigin-RevId: 863774053
Change-Id: I8df96d5af7cc80d78a6f35560c3c31bed8be550e
2026-01-31 17:16:36 -08:00
Google DeepMind 7418d86eda Enable Emscripten threading for MuJoCo WASM builds.
PiperOrigin-RevId: 863309872
Change-Id: I2edabb386f3abc74e507d0419b136b1586d01241
2026-01-30 10:58:18 -08:00
Haroon Qureshi b073cd2ca4 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: 863248779
Change-Id: I8bcbd5445814ba1e72c6d7b80ad6a054f5f1df57
2026-01-30 08:20:53 -08:00
Haroon Qureshi 9da834c12c Tweak status bar layout.
PiperOrigin-RevId: 863184918
Change-Id: Ibff6c71e6004f4dd2ad2b49cc889d2f9c2dfd41e
2026-01-30 05:07:11 -08:00
Haroon Qureshi e35c981f48 Add uv offsets to autogenerated 2D uv coordinates.
The original render_gl3.c code does the following:

```
mjr_setf4(plane, 0.5*scl[0], 0, 0, -0.5);
glTexGenfv(GL_S, GL_OBJECT_PLANE, plane);
mjr_setf4(plane, 0, -0.5*scl[1], 0, -0.5);
glTexGenfv(GL_T, GL_OBJECT_PLANE, plane);
```

The 4th component of the GL_OBJECT_PLANE function effectively
describes a UV-offset for the generates uvs. In our filament
implementation, we had overlooked this 4th component.

PiperOrigin-RevId: 863181644
Change-Id: I60688117ea2019257da683cdda0c7d389dd5af1e
2026-01-30 04:55:31 -08:00
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