Commit Graph

132 Commits

Author SHA1 Message Date
Michael Moss 021c804bf8 Update dependencies ahead of the 3.12.0 release.
PiperOrigin-RevId: 966530808
Change-Id: Idbab4c60a6aef063c02a0ec6de6176033f52fac1
2026-08-18 05:16:27 -07:00
Copybara-Service 2c8d7b565d Merge pull request #3252 from devshahofficial:devshahofficial/studio-filament-source-build
PiperOrigin-RevId: 958356099
Change-Id: If4e68babdc6c68d7dd05ced7197a1869db4a0625
2026-08-03 07:12:38 -07:00
Michael Moss 59d84a714d Update dependencies ahead of the 3.11.0 release (retry).
Also updates MuJoCo files needed to address changes in Filament.
- "build with clang on windows" patch to sync context lines, remove some
  upstream conflicts, disable Clang thread-safety attribute errors, and
  allow running on MSYS2.
- Skip building Filament samples.
- Add missing <string_view> to material_manager.cc.
2026-07-24 15:27:31 +00:00
Michael Moss 28bea62d78 Fix git apply and re-enable cmake cache on Windows.
This forces git to treat the current directory as the git checkout to apply the
patch to, which avoids issues where a non-git checkout (e.g. from an unpacked
cached tarball) can cause git to find a higher-level git checkout and try to
apply the patches there, which then fails when the files to patch aren't found.

PiperOrigin-RevId: 953377327
Change-Id: I86f51d4e2823b64c825070139479089c7f30e53e
2026-07-24 08:21:48 -07:00
Michael Moss a9f56dabc2 Fix Windows CMake patch application and add more logging.
PiperOrigin-RevId: 953024686
Change-Id: I5527f52b7473e74a9203916d866a6a91c01a06c9
2026-07-23 16:44:24 -07:00
Michael Moss b04a18a00a Fix backslash escaping in KOKORO_GFILE_DIR on Windows.
This var was missing from the "clean up" step for all the path vars, causing
the cmake cache lookups to silently fail due to path mismatch.

PiperOrigin-RevId: 952410036
Change-Id: I5c542e821317497e899de95e5c62d76f88836e60
2026-07-22 16:59:14 -07:00
Michael Moss 3429373b96 Rollback filament dependency updates and patches.
PiperOrigin-RevId: 952196997
Change-Id: I0c4284823bb642e847bc73d4732bcce6a72455c8
2026-07-22 10:23:50 -07:00
Michael Moss c0d1c399af Update patch context in filament-allow-clang-windows.patch.
PiperOrigin-RevId: 952161543
Change-Id: Ia832f692f1f42e905a6cf66365731d5714297db9
2026-07-22 09:19:02 -07:00
Michael Moss 8c0a73482c Remove unversioned tarball fallback from FindOrFetch.cmake.
PiperOrigin-RevId: 952098246
Change-Id: Id3030fde3045223857711b3e8cce7e671490f8c7
2026-07-22 07:08:04 -07:00
Michael Moss 782c00bc49 Update dependencies ahead of the 3.11.0 release.
PiperOrigin-RevId: 951974346
Change-Id: Ie2b7a357442705e7d37d824463f7feb120a212e7
2026-07-22 02:13:00 -07:00
Yuval Tassa 6f487086a5 Add MUJOCO_ENABLE_LTO CMake option to make LTO configurable. Fixes #3374, #2904
PiperOrigin-RevId: 950629900
Change-Id: If4b3755f0e8653efbd9e6a4134140dd96b1f743d
2026-07-19 23:46:15 -07:00
Michael Moss 3c6080b1c0 Add a CMake deps cache to improve build reliability and speed.
PiperOrigin-RevId: 947522108
Change-Id: I4aa11c08c5ee47a8ab0fc023038d84b46775c9b6
2026-07-14 01:38:03 -07:00
Yuval Tassa 6afe13573b Fix single-precision (mjUSESINGLE) CMake builds.
PiperOrigin-RevId: 947367737
Change-Id: If2b56c9d4b4c214c858f6d8b588443f6bd4896ee
2026-07-13 19:02:26 -07:00
devshahofficial 7fada46855 Improve Filament Studio source builds 2026-06-29 13:37:20 -07:00
Yuval Tassa b6a0db7a17 Add Atkinson Hyperlegible Mono font support
PiperOrigin-RevId: 937799904
Change-Id: I89e4652cc45afdd9a55b3042395c4a56c70289fb
2026-06-25 00:16:39 -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
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
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
Saran Tunyasuvunakool 6039d4680a Modify the UI appearance of MuJoCo Studio.
PiperOrigin-RevId: 935247135
Change-Id: I4c35cf2f0cdfa36aa6d3c65c52a752edab266531
2026-06-20 03:34:21 -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
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
Kevin Zakka 1aaced190a Copybara import of the project:
--
3439d8a5cd745dfd2776593916eead65cb456afc by Kevin Zakka <kevinarmandzakka@gmail.com>:

Respect an explicit CMAKE_INTERPROCEDURAL_OPTIMIZATION=OFF

The default-LTO guard checked the value rather than whether it was DEFINED, so an
explicit -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=OFF (used in CI to cut build time)
was silently flipped back ON. Check DEFINED instead; default-on for Release is
preserved when the caller makes no choice.

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

Speed up CI

~10x faster on the POSIX jobs (~45m -> ~4-5m) and ~2x overall wall-clock.

- Build Studio/Filament and WASM only in their dedicated canary jobs, not in
  every matrix job (WASM uses emcc, which ignores the host compiler).
- Compiler matrix -> build_matrix.json with core/extended tiers: PRs build the
  core set, pushes to main run the full sweep.
- ccache across build jobs (studio cache keyed on the Filament pin); fix the
  Python-bindings build so ccache hits (CCACHE_BASEDIR).
- Disable IPO/LTO on POSIX (it was silently on); keep it on Windows where /GL-off
  exposes a latent test bug and build time is not the bottleneck.
- Run ctest in parallel on POSIX (~2x); uv for Python installs (~29s -> ~8s).
- Move MJX (compiler-independent) to a single dedicated job.
- Restrict GITHUB_TOKEN to contents: read; bump actions off deprecated Node20.

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

Build the gcc jobs with LTO off too

Restores LTO-off for gcc (recovering the build-time win). That surfaces known
gcc-12 -Wrestrict false positives in libstdc++ <char_traits> at -O3; two clean,
behavior-preserving rewrites in the XML writer avoid them. Confirmed gcc-12 and
gcc-14 build clean with LTO off (PR #3325).

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

Respect explicit IPO=OFF in the Simulate and Sample options too

Apply the same DEFINED check as cmake/MujocoOptions.cmake to the simulate/ and
sample/ subprojects (which carry identical copies of the guard) to keep the three
in sync, as the internal import requires. Since the guard now honors =OFF, stop
forcing IPO=OFF on the tiny samples/simulate CI builds so they keep their default
LTO and don't expose the gcc -Werror false positives that -O3-without-LTO triggers.

COPYBARA_INTEGRATE_REVIEW=https://github.com/google-deepmind/mujoco/pull/3315 from google-deepmind:speed-up-ci 2c38da0f48f77635e58e4b7931b86d60f3c253c7
PiperOrigin-RevId: 930008698
Change-Id: Ic41dc87881833c95f2ebfc0602de1ed438db3d4f
2026-06-10 12:27:14 -07:00
Google DeepMind 36f5c4899c Remove the usage of Texture::setImage that uses FaceOffsets
PiperOrigin-RevId: 926092842
Change-Id: I8010804c6dda89d41ebaf650af776505e5c5ed34
2026-06-03 09:47:37 -07:00
Michael Moss 583aa5ad4f Update dependencies ahead of the 3.9.0 release.
PiperOrigin-RevId: 921512490
Change-Id: Iac2e4e52dde5ca7aeda62f033fcc03aadcaeb904
2026-05-26 09:30:49 -07:00
Saran Tunyasuvunakool 99e626096f Fix miniz include.
PiperOrigin-RevId: 914519929
Change-Id: I0dc00ef3f4518571165e4be0e85016511e0cdd60
2026-05-12 15:51:27 -07:00
Saran Tunyasuvunakool 7f5be412a0 Put miniz in MujocoDependencies.cmake.
PiperOrigin-RevId: 914322421
Change-Id: I3f6e821164eede979802c51a6f8ee00d3346d585
2026-05-12 09:27:00 -07:00
Michael Moss cb5a9caa5c Update dependencies ahead of the 3.8.1 release.
PiperOrigin-RevId: 913212199
Change-Id: I97e5a2367010c492e6277a8c333ae8eb8155f7f2
2026-05-10 00:51:43 -07:00
Saran Tunyasuvunakool 1465d8b6ce Initial implementation of MuJoCo Live.
This is a combination of minor tweaks to the existing Studio WASM application, CMake cleanup to make it buildable, and integration with GitHub Actions for deployment.

The new features added are drag-and-drop, model specification through `?model=` URL parameter, HTTP and HTTPS resource provider, and a user-visible loading message while the model is loading.

PiperOrigin-RevId: 904594610
Change-Id: I3a73b1ca0fcd6fc9ba192469942b2dab010a9308
2026-04-23 12:56:12 -07:00
Sam Haves a744b366fb Include obj and stl decoder plugins as sources in CMake builds.
This removes the need to load these decoders via mj_loadAllPluginLibraries when using MuJoCo built with CMake. Other plugins are unchanged.

PiperOrigin-RevId: 897114719
Change-Id: Iee914cc5e05798186f384a67901f1cf86bc2f887
2026-04-09 07:58:28 -07:00
Michael Moss 904744bd72 Fix --gc-sections linking error on github macos-15-x86_64.
This forces `CMAKE_REQUIRED_FLAGS` to be treated as a string instead of list,
so none of the args get dropped when passed through `check_c_source_compiles`.

PiperOrigin-RevId: 886717366
Change-Id: I6314f9bfabd9d62bdcad5070c8801c453c381b79
2026-03-20 04:57:54 -07:00
Sam Haves ef78f07ffb Automated g4 rollback of changelist 885555524.
*** Reason for rollback ***

Rolling back obj/stl decoder inclusion as sources due to broken windows build.

*** Original change description ***

Include obj and stl decoder plugins as sources in CMake builds.

This removes the need to load these decoders via mj_loadAllPluginLibraries when using MuJoCo built with CMake. Other plugins are unchanged.

***

PiperOrigin-RevId: 885576586
Change-Id: I31e6fa4d10697862f7d800d0d771ca752747e36d
2026-03-18 07:18:19 -07:00
Sam Haves 15ca42ff68 Include obj and stl decoder plugins as sources in CMake builds.
This removes the need to load these decoders via mj_loadAllPluginLibraries when using MuJoCo built with CMake. Other plugins are unchanged.

PiperOrigin-RevId: 885555524
Change-Id: I20aa5b6c55b678398345d49cb1c47667ae2bebcf
2026-03-18 06:23:26 -07:00
Sam Haves 91d3565cd5 Move OBJ handling to a mjpDecoder.
PiperOrigin-RevId: 878041994
Change-Id: I6e7f6876e65fd2184ff5637d4268644cefcabecf
2026-03-03 11:22:02 -08:00
Sam Haves 0ec836b281 Rollback of Move OBJ handling to a mjpDecoder.
PiperOrigin-RevId: 875705083
Change-Id: I21403d84abd56ef72de915bddc724fe3efa506e6
2026-02-26 07:04:39 -08:00
Haroon Qureshi 137a504625 Add imgui stdlib target.
PiperOrigin-RevId: 875686702
Change-Id: Ie8ba8349c70da3313a1896b14a30d076f2068368
2026-02-26 06:13:38 -08:00
Sam Haves b907ffedaa Move OBJ handling to a mjpDecoder.
PiperOrigin-RevId: 875194599
Change-Id: I2cccc683d69a217f1817e70d16bc1815e366d00c
2026-02-25 09:13:09 -08:00
Alessio Quaglino 22e3217fc0 Replace TriangleMeshDistance with custom BVH-based SDF computation.
The `mjCOctree::ComputeSdfCoeffs` function has been replaced by `mjCOctree::ComputeSdf`. The new implementation removes the dependency on the `triangle_mesh_distance` library. Instead, it uses a provided `mjCBoundingVolumeHierarchy` to perform closest point queries on the mesh. The signed distance is computed by finding the closest triangle face via the BVH and determining the sign based on the dot product of the vector from the closest point on the triangle to the octree vertex and the triangle's normal.

Optional Laplacian smoothing has been added to the SDF coefficients. This helps smooth out potential discontinuities at octree level boundaries.

PiperOrigin-RevId: 875093374
Change-Id: I6fa53243a2dda107ccf255bc6b876ca5a4554d4f
2026-02-25 04:47:46 -08:00
Copybara-Service 7d3e1abb21 Merge pull request #3083 from Ashutosh0x:fix/mingw-linker-stack
PiperOrigin-RevId: 871828475
Change-Id: I8abe526a81b9c1f51307729b5dde01aad809ff97
2026-02-18 05:59:41 -08:00
ashutosh0x 50349dc685 Fix MinGW stack flag syntax and Python binding crashes
- Detect linker type (lld-link vs ld) and use the appropriate stack flag: /STACK:16777216 for lld-link, --stack,16777216 for MinGW ld

- Filter out stack-related flags from Python binding modules to prevent crashes when loading MuJoCo as a DLL in Python

Fixes #3011
2026-02-18 14:22:59 +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 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
Haroon Qureshi a050b64635 Update minimum CMake version for miniz.
PiperOrigin-RevId: 862226233
Change-Id: I8612260e65f9f1c4192325a90bcfc6bac71585c0
2026-01-28 07:28:09 -08:00
Haroon Qureshi 40f2fe0977 CMakeLists for mjz.
PiperOrigin-RevId: 862214752
Change-Id: I498a1f0092adc9e94016bf23589403296bffb4f7
2026-01-28 06:53:06 -08:00
Sam Haves a5dc57c0c3 Move OpenUSD parsing to usd_decoder
Add usd_decoder to mujoco/plugin.
  - Previously was src/experimental/usd/usd_to_mjspec.cc, now that same spec is returned by the plugin.

PiperOrigin-RevId: 854350962
Change-Id: Ia980190a557c50ce8197980922a2594b613859b4
2026-01-09 14:48:29 -08:00
Sam Haves 9e150fe82c Add separate build step for OpenUSD to third_party_deps.
This will fetch and call the build_usd.py build helper for OpenUSD and build within the MuJoCo _deps folder. Simplifying the build process for MuJoCo with USD. Users can still provide their own USD build, but must now do so via pxr_DIR.

PiperOrigin-RevId: 846735578
Change-Id: I0da7eb2da6465e2d518084340e762bf370adb6d5
2025-12-19 08:00:15 -08:00
Haroon Qureshi 680e9a6b79 Update studio build script and instructions.
Mujoco studio now works on Windows and MacOS.

PiperOrigin-RevId: 840235447
Change-Id: I66d3430d5d994de2eb13ee08ad3051c6c7187e12
2025-12-04 07:27:37 -08:00
Gabe Oppenheimer b663b7602b Final preparations for the v3.4.0 release
PiperOrigin-RevId: 838824676
Change-Id: Icb5a825cb41be4d0730f4a6729b63531d649066f
2025-12-01 10:06:33 -08:00
Haroon Qureshi c6b587b515 Use cmake FILE(COPY) for deploying custom CMakeLists.txt.
PiperOrigin-RevId: 838696575
Change-Id: I3c61bda9d1d89185f257797c2e0c0f4ef2c7cb95
2025-12-01 03:37:37 -08:00