Commit Graph

4991 Commits

Author SHA1 Message Date
Haroon Qureshi 4b8a8fae92 Move code_builder.py to a common location.
PiperOrigin-RevId: 937332995
Change-Id: I2f03581cc47d96337bb637f30c678060207333fd
2026-06-24 07:44:40 -07:00
Yuval Tassa 0402bae176 Replicate the controls from the toolbar into the collapsible options sections and provides an option to hide the toolbar.
PiperOrigin-RevId: 937290592
Change-Id: I08f1f4880fd0b06123e817cb9ae7a3281daa8063
2026-06-24 06:09:24 -07:00
Haroon Qureshi 3d09a46d61 Use bulbradius as the vsm_blur_width as well.
PiperOrigin-RevId: 937286692
Change-Id: I03502da45951f90979b8f8d58915c80656a5eac7
2026-06-24 06:00:31 -07:00
Matija Kecman 38956ed95c Handle None values for model and data in StepControl.advance.
The `StepControl.advance` method now checks if the provided `model` or `data` Python objects are `None` before attempting to cast them to `MjModelWrapper` or `MjDataWrapper`, passing `nullptr` to the underlying C++ function if they are `None`.

This fixes an oversight in the python bindings, C++ code already supported null models.

PiperOrigin-RevId: 937243996
Change-Id: Ie67b8603517e7390fb54bfefbfed79ccf7b2bc5e
2026-06-24 04:18:29 -07:00
Haroon Qureshi a3039224ba Add attributes for codegen assistance.
PiperOrigin-RevId: 937219243
Change-Id: If3a0830b7020d52ef346d97886a90950941f4908
2026-06-24 03:17:03 -07:00
Haroon Qureshi 3e33f93ddc Remove unused material instances before rendering frame.
Also ensure material texture hashes are unique so that the material
cleanup works correctly.

PiperOrigin-RevId: 937206048
Change-Id: Ibed53457ee271f4faae3bcac5fb479b5ce9fc352
2026-06-24 02:46:33 -07:00
Haroon Qureshi 29b49991a2 Rename mjrf_getSamplerType to mjrf_getTextureSamplerType.
PiperOrigin-RevId: 937193469
Change-Id: I56f856e257fa1cf99b643f794139ef85817a0bb9
2026-06-24 02:18:07 -07:00
Yuval Tassa 080668df42 Add "(default)" to conflict warnings in user resolver.
When reporting conflicts between parent and child elements during attachment, the warning message now indicates if a value is derived from the default rather than being explicitly authored in the XML. This improves clarity in conflict resolution warnings.

PiperOrigin-RevId: 936724265
Change-Id: I68c677b19020c19bf0260f5b3b77fe6ca3661bb9
2026-06-23 09:44:29 -07:00
Haroon Qureshi 5637f74327 Add plugin for adding mjvGeoms to the scene.
PiperOrigin-RevId: 936709560
Change-Id: I69a01fc50e2d4b013d260d524515719c434bbf5f
2026-06-23 09:16:41 -07:00
Haroon Qureshi 557a2241f4 Add PreStep and PostStep plugin callbacks.
PiperOrigin-RevId: 936665884
Change-Id: Ie04562b02bfd61a62f9de77b3cef0fff534bf547
2026-06-23 07:49:29 -07:00
Haroon Qureshi 94a912d349 Allow plugins to request loading models by path.
PiperOrigin-RevId: 936638157
Change-Id: If594c6a9abac5eb0d62e7d6dce4dc2f558989969
2026-06-23 06:50:41 -07:00
Yuval Tassa c499f7f2b0 Add Nesterov momentum with O'Donoghue-Candès restarts to PGS solver (~2x speedup)
Benchmark on `2humanoid100.xml` (nefc=1785, nv=654):

```
Convergence at fixed iteration count (mean relative error vs Newton):
  20 iters: 2.98e-03 vs 1.54e-02 (5.2x better)
  40 iters: 8.14e-05 vs 2.60e-03 (32x better)
  80 iters: 1.17e-07 vs 1.77e-04 (1500x better)

Pipeline throughput (tolerance=1e-8, islands disabled):
  Nesterov: 243 steps/s, 46 iters/step
  Baseline: 151 steps/s, 95 iters/step
  Solver speedup: 1.8x, overall step speedup: 1.6x

Pipeline throughput (tolerance=1e-8, islands enabled):
  Nesterov: 306 steps/s, 442 iters/step
  Baseline: 175 steps/s, 966 iters/step
  Solver speedup: 2.1x, overall step speedup: 1.7x
```

PiperOrigin-RevId: 936610759
Change-Id: I2978e8bd545971d9151005623967e5cf0ad125cc
2026-06-23 05:52:14 -07:00
Haroon Qureshi 5cef2472d5 Remove custom step_fn for StepControl::Advance.
PiperOrigin-RevId: 936609234
Change-Id: I606cf4d71d856cbd260900d63b22c719974c977d
2026-06-23 05:49:20 -07:00
Taylor Howell 027cfd1201 simplify camera projection sensor
PiperOrigin-RevId: 936571266
Change-Id: I5647e61fcc81ba6eb482dd95d3c40438f478bb18
2026-06-23 04:17:38 -07:00
Haroon Qureshi da2f0ebd7b Add prestep/poststep callbacks to StepControl.
PiperOrigin-RevId: 936567801
Change-Id: I62d4d657791fe68101e63c2050adb63929128acf
2026-06-23 04:07:26 -07:00
Haroon Qureshi 7f66f42568 Make Renderer own the scenes.
PiperOrigin-RevId: 936547976
Change-Id: Iec87426a9ae255cdbd3efadc7b602d4183679c81
2026-06-23 03:15:48 -07:00
Haroon Qureshi 2800a682e4 Remove unused render_flags parameters.
PiperOrigin-RevId: 936528056
Change-Id: Iae8545ec1d71bc7d5a20c46394104fb1db369d5d
2026-06-23 02:29:25 -07:00
Haroon Qureshi 7a00c1f3e0 Factor out AstProcessor into its own library.
PiperOrigin-RevId: 936518263
Change-Id: I597ef4382e7ddc953f8daedd4f5123d71f0e8a42
2026-06-23 02:08:57 -07:00
Yuval Tassa 5d043d8f72 Minor tweaks to studio GUI style parameters.
PiperOrigin-RevId: 936508032
Change-Id: I93806ba3d0569b5ee01e95384f7f835a201b8253
2026-06-23 01:46:31 -07:00
Kyle Bayes 0fd7bea973 Modernize struct and enum style in MuJoCo headers.
PiperOrigin-RevId: 936485706
Change-Id: I31864acc4bd44573127d3d04c6b1a23f9d9c4cbc
2026-06-23 00:48:11 -07:00
Yuval Tassa afccd36dd4 Add threading support to PGS
PiperOrigin-RevId: 936252614
Change-Id: I6762245cc2dbdb95568f0a927c26b575dc494b51
2026-06-22 14:29:17 -07:00
Michael Moss 5700829122 Update MuJoCo version to 3.10.1 following the 3.10.0 release
PiperOrigin-RevId: 936044969
Change-Id: If0ebcc192419302da01741ebabb2b7dd3d7f7baf
2026-06-22 07:25:02 -07:00
Michael Moss 28009f9105 Update changelog for the 3.10.0 release.
PiperOrigin-RevId: 936044016
Change-Id: I4b6e3205819b7bd0469415fe0b57990b68309d1b
2026-06-22 07:22:23 -07:00
Yuval Tassa e2528cbd93 Rename "Stats" window to "Info" and remove "Stats" dock.
PiperOrigin-RevId: 936026479
Change-Id: I72e4f2cba6df255d5446faedc81727b39ef735bc
2026-06-22 06:38:03 -07:00
Michael Moss 4b1320a5f9 Patch Abseil to verify compiler support for std::source_location.
PiperOrigin-RevId: 936018935
Change-Id: I2cabbdf497dbb67452c27fc5ed02c56e6884f3d4
2026-06-22 06:16:36 -07:00
Kyle Bayes 1490336955 Change LoadModelFromString to return a smart pointer, add MakeData, and update tests to have C++ RAII clean up model and data.
PiperOrigin-RevId: 935980153
Change-Id: I41d25bfab4935494dc984168820cb7cad123cadf
2026-06-22 04:19:01 -07:00
Michael Moss 34d142ee50 Force Abseil's SourceLocation implementation for compatibility with clang 13/14.
PiperOrigin-RevId: 935926249
Change-Id: I063544e37eb735d0461a20c2ede7e23ea28d23bc
2026-06-22 02:02:00 -07:00
Yuval Tassa bf59ca6a1b Make the info overlay position fixed (bottom left)
PiperOrigin-RevId: 935868629
Change-Id: I26b8d50f276b05c9869ea0f6cc5c3033ab6ef2f9
2026-06-21 23:39:55 -07:00
Yuval Tassa d5db39c762 Fix various bugs related to value bounds in studio UI.
PiperOrigin-RevId: 935855305
Change-Id: I14b41fc751dc04d35beada0dd5d1f0bfddf9af34
2026-06-21 23:01:57 -07:00
Yuval Tassa 916695e794 Fix step timing diagnostics and make compiler errors transient in simulate.
PiperOrigin-RevId: 935675994
Change-Id: I7bc26291fb061e712187e0a6205723fda65b5f46
2026-06-21 11:08:01 -07:00
Michael Moss 3b08f39747 Update dependencies ahead of the 3.10.0 release.
PiperOrigin-RevId: 935674769
Change-Id: I4ad9c7494f499bc1016b99df78053337db439309
2026-06-21 11:02:27 -07:00
Michael Moss 3cb05726c4 Add MuJoCo Studio icons to the Mac and Windows apps.
PiperOrigin-RevId: 935655979
Change-Id: I4cb34a5592959c24764e8c63db0cac055d5c5dfb
2026-06-21 09:40:01 -07:00
Michael Moss 929d9abeb4 Add action to sync live branch on each release.
PiperOrigin-RevId: 935649160
Change-Id: Ic36b06fef1865ecee63f12faba0eb5d49914362b
2026-06-21 09:07:00 -07:00
Kevin Zakka a8eaccd2b6 Copybara import of the project:
--
6ab68a057443f038a3d844807f205b1c99cab944 by Kevin Zakka <kevinarmandzakka@gmail.com>:

Fix pickle code-execution vulnerability in sysid loaders

Serialize signal_mapping as JSON so the trajectory and time series loaders can use allow_pickle=False, preventing arbitrary code execution from untrusted .npz files.

COPYBARA_INTEGRATE_REVIEW=https://github.com/google-deepmind/mujoco/pull/3353 from kevinzakka:sysid-disable-pickle-load 6ab68a057443f038a3d844807f205b1c99cab944
PiperOrigin-RevId: 935400242
Change-Id: Iecd907174441fbcfd02c106b912a7ff375c9098c
2026-06-20 15:10:54 -07:00
Yuval Tassa 2cacf17071 Defer texture destruction in ImguiBridge to prevent use-after-free.
PiperOrigin-RevId: 935327326
Change-Id: I12a148b71abbe50581c7977a1f6dc5e220c40e81
2026-06-20 09:46:52 -07:00
Yuval Tassa 9ac0b283dc Menu reorg in studio
- Added "Info" and "Profiler" to the "View" menu.
- Deleted the obsolete "Charts" menu entirely
- Removed the "Stats" toggle item from the "Help" menu.

PiperOrigin-RevId: 935314037
Change-Id: I01ee30cbba5c1b4aa54c2940b0265401cc965c07
2026-06-20 08:43:09 -07:00
Saran Tunyasuvunakool 6039d4680a Modify the UI appearance of MuJoCo Studio.
PiperOrigin-RevId: 935247135
Change-Id: I4c35cf2f0cdfa36aa6d3c65c52a752edab266531
2026-06-20 03:34:21 -07:00
Kevin Zakka b1e3753a1a Fix typo in github username in changelog.
PiperOrigin-RevId: 935244857
Change-Id: I33159f2caa765be585e46cb1b8ccc8e37f103de3
2026-06-20 03:22:50 -07:00
Haroon Qureshi d93c102190 Move mjrfilament.h to mujoco/include.
PiperOrigin-RevId: 934931460
Change-Id: I63bf34b3a7197b277ea7a5caf3d84d840f6210a1
2026-06-19 08:01:05 -07:00
Michael Moss f663139256 Fix CMake error caused by relative RPATH.
PiperOrigin-RevId: 934847161
Change-Id: I7dce4161a8d8076d2d2c1c7b3234844733c5e8b0
2026-06-19 03:59:56 -07:00
Michael Moss 976476c482 Fix Windows build with MSVC.
PiperOrigin-RevId: 934812811
Change-Id: I45381b180d9120d8bfab5b10f50accf617607f8c
2026-06-19 02:24:32 -07:00
Haroon Qureshi 71721ed8e6 Merge generate scripts into a single script.
PiperOrigin-RevId: 934787488
Change-Id: I1e4d5870a7f4b339fa0de60271211fdffe80a3d8
2026-06-19 01:17:22 -07:00
Michael Moss 0dc37fd77b Add RPATH to fix mujoco_studio library loading error on Linux.
PiperOrigin-RevId: 934768602
Change-Id: I0b54ee1b3ed1a1ed85bcc88b36443539056275b1
2026-06-19 00:21:48 -07:00
Haroon Qureshi 4ec843d70d Use int instead of mjtGeom for public API.
PiperOrigin-RevId: 934766146
Change-Id: Iefaf32834ecbe12fe03c932ff593153277fc8f48
2026-06-19 00:13:32 -07:00
Michael Moss 492585ca7a Enable MuJoCo Studio build and packaging on Windows.
Also:
- Patched Filament to support building with Clang, so the default MuJoCo build
  mode doesn't need to change. This should probably be upstreamed.
- Added missing Windows deps to MuJoCo Platform CMake config.
- Updated Studio CMake config to fix unresolved symbols issues on Windows.
PiperOrigin-RevId: 934612701
Change-Id: I3a34a5d274e1452c9cfef0e2868f2788b4b0c7e8
2026-06-18 16:50:31 -07:00
Michael Moss e7ef6528b7 Enable MuJoCo Studio build and packaging on macos.
Also:
- Packages MuJoCo Studio as MuJoCoStudio.app in the MuJoCo.dmg.
- Fixes a Filament compile issue.
- Patches libwebp to fix compile error related to universal builds and forces
  it to build as static.
- Removes the separate, obsolete "build_studio" step.
PiperOrigin-RevId: 934564785
Change-Id: I50c83283b5e138062e37d53926a5a77fdf99dbfa
2026-06-18 15:03:20 -07:00
Michael Moss 8db92ab4a9 Enable building Studio (Linux only) as a component of the main MuJoCo build.
And remove the separate, conditional (and hacky) "build_studio" step.

PiperOrigin-RevId: 934375150
Change-Id: I46514d0f33c17bb29625b818cdde3a285fd2c439
2026-06-18 08:44:16 -07:00
Michael Moss 1f8c6f1183 Add licenses for third-party dependencies brought in by Studio.
PiperOrigin-RevId: 934300272
Change-Id: I7be1fccb4a80ea86803696699f53687f7d37da91
2026-06-18 05:51:06 -07:00
Yuval Tassa e2afec9153 Make decorations lit, Rename unlit_decor material to decor.
PiperOrigin-RevId: 933693797
Change-Id: I37128b528296d978d4917ec65316d8d99ce017bb
2026-06-17 06:43:37 -07:00
Haroon Qureshi 037bdfa519 Add edge and vertex rendering for flexes.
PiperOrigin-RevId: 933675465
Change-Id: Ice3c3a35820588c732b73f1dbad22e346acc4046
2026-06-17 05:56:18 -07:00