Commit Graph

2417 Commits

Author SHA1 Message Date
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
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
Yuval Tassa 5d043d8f72 Minor tweaks to studio GUI style parameters.
PiperOrigin-RevId: 936508032
Change-Id: I93806ba3d0569b5ee01e95384f7f835a201b8253
2026-06-23 01:46:31 -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
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
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
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
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
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 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 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
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
Yuval Tassa e76afa7160 Reduce the opacity of the Filament selection outline.
PiperOrigin-RevId: 933665589
Change-Id: Ic55785568c0129c2f145bedc0cde7ec4bdc05dcf
2026-06-17 05:29:04 -07:00
Yuval Tassa 38c3388046 Fix rotation Jacobian offset in mj_jacSum sparse path.
PiperOrigin-RevId: 933640368
Change-Id: Ib30acd651b6022b0835e07b3f3b01e648791a511
2026-06-17 04:24:00 -07:00
Yuval Tassa cffb077c4b Register atexit handler to clear GlobalModel.
PiperOrigin-RevId: 933624252
Change-Id: Ib214514ac5390137dbf1034d113ff8aa9e9cdeb1
2026-06-17 03:44:08 -07:00
Yuval Tassa 410c73168c Add policies for global attribute conflict resolution upon attach
For example when loading parent_merge.xml:

```
WARNING: Attach conflict when attaching 'child' to 'parent_merge', policy is 'merge'
timestep: parent has 0.005, child has 0.002, taking the minimum
iterations: parent has 50, child has 100, taking the maximum
flag 'Damper': added from child
```

When loading parent_error.xml:

```
XML Error: Attach conflict when attaching 'child' to 'parent_error', policy is 'error'
timestep: parent has 0.005, child has 0.002
iterations: parent has 50, child has 100
Element 'attach', line 10
```
PiperOrigin-RevId: 933620810
Change-Id: Ib477863b5ef763474d27fb4be5a4148be1d5d500
2026-06-17 03:36:10 -07:00
Kyle Bayes 386b45fb75 Add tolerance to upper > lower bound check on first iteration of EPA.
PiperOrigin-RevId: 933615381
Change-Id: I175d3b97fa65f71a8f1cc34da5f6b9a23ab856d2
2026-06-17 03:19:19 -07:00
Haroon Qureshi 6294e77907 Do not render flexes/skins with no geometry.
PiperOrigin-RevId: 933604372
Change-Id: I80169ff09ec6908d101b5f10bbf8aa1a6e8b8249
2026-06-17 02:54:11 -07:00
Haroon Qureshi e1711529f2 Add RGBA8 support to RenderTarget::ReadColorPixels.
PiperOrigin-RevId: 933521511
Change-Id: Ic279fb8f86615cc4cfddef6ac27a502b22bafd79
2026-06-16 23:30:04 -07:00
Yuval Tassa 6f8bb5ef55 Refactor compiler warning handling.
Compiler warnings are now accumulated in a vector of strings within the mjSpec object. New API functions `mjs_numWarnings` and `mjs_getWarning` are added to access these warnings. The compiler's log handler now chains warnings to the global log handler, ensuring they are still displayed immediately. Call sites in `mj_loadXML`, `mj_compile`, and the Python and WASM bindings have been updated to use the new warning API.

PiperOrigin-RevId: 933361650
Change-Id: I47cab98a460c57b0898c0a1a43fce2a5b9648eb1
2026-06-16 16:28:33 -07:00
Kyle Bayes 0eec09dd60 Add runtime assertions to mji functions.
PiperOrigin-RevId: 933106771
Change-Id: I523cdceb89c90611f27983731c49fd4887034431
2026-06-16 08:36:32 -07:00
Kyle Bayes d9b677b49b Refactor remaining primitive and convex collision code to use mjPreContact instead of mjContact. Introduce internal struct mjcPair in engine_collision_driver.c for readability and extensibility for flex objects. This is a no-op.
PiperOrigin-RevId: 933105275
Change-Id: Id862b01774df63dcdb42629a5b7dd12019f12ffd
2026-06-16 08:33:09 -07:00
Kyle Bayes b469144a81 Modify mjc_FlexSDF to support mjPreContact directly.
PiperOrigin-RevId: 933068825
Change-Id: I328d64bb05270067ce146908b0df3ca83f10ed9b
2026-06-16 07:04:16 -07:00
Yuval Tassa 8efb396b26 Reorder and adjust GUI physics options.
PiperOrigin-RevId: 933007222
Change-Id: Ia6944744112baa309de165144179ad96d914a734
2026-06-16 04:06:35 -07:00
Haroon Qureshi c0fa33f97f Rename mjrFilamentConfig to mjrfContextConfig.
PiperOrigin-RevId: 932996526
Change-Id: Ia81ee074471ab4ff41e0829fa5ba70203599fdb6
2026-06-16 03:36:22 -07:00
Haroon Qureshi ecee1e0c53 Rename nattributes to num_attributes for consistency.
PiperOrigin-RevId: 932973447
Change-Id: Idbf9a52c89e24f34ae360d1617cb72dfaa92aa4e
2026-06-16 02:40:13 -07:00
Copybara-Service c9ba1e452d Merge pull request #3338 from devshahofficial:devshahofficial/filament-emissive-factors
PiperOrigin-RevId: 932483570
Change-Id: If8ff968d2650551118a38ea4837063796bd85f66
2026-06-15 08:45:48 -07:00
Haroon Qureshi 7472440dbd Make mjrfilament.h conform to C standards.
PiperOrigin-RevId: 932424719
Change-Id: I1f8d8d91041ea1c2b77010761404bf0e519bcc29
2026-06-15 06:33:18 -07:00
Haroon Qureshi 9e45ce9801 Use num_ prefix consistently in API.
PiperOrigin-RevId: 932391786
Change-Id: I71c7f300fdb84ce1129ea3da6336df2fcffc5712
2026-06-15 05:08:34 -07:00
devshahofficial 7646a56e82 Fix Filament emissive material factors 2026-06-13 15:58:30 -07:00
Yuval Tassa 67a1ea6dca Track authored flags for global attributes
PiperOrigin-RevId: 931585539
Change-Id: Ifdc8c59de6c5a553daf6e0af09d8192aff6b0610
2026-06-13 02:58:32 -07:00
Haroon Qureshi 0ea9c7cb3a Expose function for determining if tendons should be drawn using a catenary.
PiperOrigin-RevId: 931170146
Change-Id: Ia3352a3e2bdc5e4df932e9d476e1e34200b62df1
2026-06-12 08:45:22 -07:00