Commit Graph

4963 Commits

Author SHA1 Message Date
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
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 cedaa47d61 Migrate tests to use MockWarningHandler for warning interception.
PiperOrigin-RevId: 933656759
Change-Id: Ia21514c302799034bf598445933dd90427284737
2026-06-17 05:06:57 -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
Michael Moss 30357c38a3 Silence C++20 deprecation warnings in MuJoCo Python enums.
PiperOrigin-RevId: 933618689
Change-Id: I7cd99ed47748a56990bef9e390a6c9072d5a6c0a
2026-06-17 03:28:40 -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
Copybara-Service f6fb4af091 Merge pull request #3350 from kevinzakka:ci-ccache-header-fix
PiperOrigin-RevId: 933605716
Change-Id: Ia2f58f4a2b3240b18dc7f3f4bce7be8dd30e7f0e
2026-06-17 02:57:15 -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
Kevin Zakka ffd95cf656 CI: drop system_headers from Python-binding ccache sloppiness
CMake adds the imported mujoco target's include dir as -isystem, so with
system_headers sloppiness ccache stopped hashing the public MuJoCo headers.
A header-only change (new mjData field, new enum value) then went undetected
and ccache reused objects compiled against the old struct layout, yielding an
ABI-mismatched binding: wrong field offsets (garbage in struct/pickle tests),
stale mjENABLESTRING/mjNENABLE, and mjSpec-vs-mjData signature mismatches.

Removing system_headers makes ccache hash these headers and recompile on
change. The mtime/ctime flags stay (they absorb pip's per-run temp-dir churn
without affecting content detection).
2026-06-16 23:45:18 -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
nas 55c6332f20 Copybara import of the project:
--
8ce7d8199ace95d0f429b0ca9169d290d167cee1 by Anas <anaselghoudane@gmail.com>:

Use box midpoint to choose finite-difference direction in jacobian_fd

When bounds are provided, `jacobian_fd` chooses each coordinate's
finite-difference direction so the perturbation steps away from the nearer
bound. It compared `x` against `0.5 * (bounds[1] - bounds[0])`, which is half
the box *width*, not the box midpoint. For bounds that are not centered on the
origin this selects the wrong direction, and at the lower bound the perturbation
steps outside the box.

Compare against the midpoint `0.5 * (bounds[0] + bounds[1])` instead. Adds a
regression test checking that all residual evaluations stay within an off-center
box when `x` is at the lower bound; it fails before this change and passes after.

--
cfa085484c30df808362898e322de8adc6660b59 by Kevin Zakka <kevinarmandzakka@gmail.com>:

Expand jacobian_fd bounds test and avoid midpoint overflow

Use the distributive form `0.5*lo + 0.5*hi` instead of
`0.5*(lo+hi)` to avoid overflow for extreme bound values.

Expand the single-case test into a parameterized subTest covering
all four boundary positions (lower/upper of positive and negative
off-center boxes), and rename it to `test_jacobian_fd_respects_bounds`.

COPYBARA_INTEGRATE_REVIEW=https://github.com/google-deepmind/mujoco/pull/3301 from Nas01010101:fix/minimize-fd-box-midpoint cfa085484c30df808362898e322de8adc6660b59
PiperOrigin-RevId: 933224876
Change-Id: I833cfe3324876cdeb7ca680c23d1d8a4d16adcf1
2026-06-16 12:06:34 -07:00
Copybara-Service 167901cec4 Merge pull request #3347 from kevinzakka:fix-dependabot-esbuild-usdcore
PiperOrigin-RevId: 933129237
Change-Id: I6864bd002ea48955b8c11332c40ac6891ba6659d
2026-06-16 09:25:30 -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 55d7ff49ec Fix broken link in docs.
PiperOrigin-RevId: 933054777
Change-Id: Ic862992051200bff1b742025926961a7c2087ffa
2026-06-16 06:24: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
Kevin Zakka c44acdeb59 Bump vite to 8 to patch esbuild Dependabot alerts 2026-06-15 18:15:35 -07:00
Kevin Zakka 351f1ee2ba Bump usd-core to 25.11 to patch remaining Dependabot alert 2026-06-15 18:14:02 -07:00
Copybara-Service 8e13f3b54d Merge pull request #3332 from kevinzakka:fix-dependabot-pip-hashes
PiperOrigin-RevId: 932719862
Change-Id: I3627eaad46bf7f92ab927bb610c44d640a473adb
2026-06-15 16:04:37 -07:00
Kevin Zakka 936d040022 Bump usd-core to 25.8 to patch critical Dependabot alert 2026-06-15 08:53:04 -07:00
Kevin Zakka b1725b4fc9 Bump pinned pip dependencies to patch Dependabot alerts 2026-06-15 08:53:04 -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
Copybara-Service eb6c2eea91 Merge pull request #3331 from kevinzakka:fix-dependabot-security-alerts
PiperOrigin-RevId: 932472549
Change-Id: Ib0830dfefca386ae338f427d675a9d5e148efd2e
2026-06-15 08:21:26 -07:00