Commit Graph

156 Commits

Author SHA1 Message Date
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 58f6d52491 Introduce new logging API, fixes #858
PiperOrigin-RevId: 930744288
Change-Id: I6ec1203b55c031390f3eef23192e2337508ce886
2026-06-11 14:36:57 -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
Kyle Bayes b935d4153c Add new mju_threadpool API function, and delete old threading API.
PiperOrigin-RevId: 922838541
Change-Id: Id9f7e0fb298ffde61fcc49a802dc78971858ce51
2026-05-28 10:11:44 -07:00
Michael Moss 79aeceeaa3 Update MuJoCo version to 3.10.0 following the 3.9.0 release
PiperOrigin-RevId: 922027849
Change-Id: I52dd7fb5eeb962c2670ab5dbbe7ce192ac9332c5
2026-05-27 03:50:22 -07:00
Yuval Tassa bdf00966f9 Add compiler timing diagnostics to mjsCompiler, printed by compile.cc
For example, `compile mujoco_menagerie/robotis_op3/scene.xml` now outputs

```
Compile 1 (cold cache):
  total:      317.2 ms
  assets:     284.8 ms (wall clock)
    load:     616.1 ms
    hull:      26.4 ms
    poly:     137.8 ms
    inert:    177.8 ms
    bvh:      568.2 ms
    octr:       1.6 ms
    tex:       25.3 ms
  other:       32.4 ms

Compile 2 (warm cache):
  total:       79.9 ms
  assets:      54.5 ms (wall clock)
    load:     888.5 ms
    hull:       0.0 ms
    poly:       0.0 ms
    inert:      0.0 ms
    bvh:        0.0 ms
    octr:       0.0 ms
    tex:       21.4 ms
  other:       25.3 ms
```

PiperOrigin-RevId: 917850214
Change-Id: Iaec86230bec0faf2e47820e20cbff61de5b2621e
2026-05-19 08:28:47 -07:00
Michael Moss 28548ce51c Update MuJoCo version to 3.9.0 following the 3.8.1 release
PiperOrigin-RevId: 913596257
Change-Id: Ib8b27fd2224e38560a209054c1d508a9bba21bbf
2026-05-11 02:58:56 -07:00
Michael Moss 2b7cc28afa Update MuJoCo version to 3.8.1 following the 3.8.0 release
PiperOrigin-RevId: 905108575
Change-Id: Ief1f9c6f34559e7a5ccc60dcceec589316bcdf9e
2026-04-24 10:37:50 -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
Michael Moss 15f61679bf Update next MuJoCo version to 3.8.0 for pending breaking changes.
PiperOrigin-RevId: 904496070
Change-Id: I0b8b01cbcf27f28ac80dbc283bc63090f745f403
2026-04-23 09:33:15 -07:00
Michael Moss 4a98cc8bff Update MuJoCo version to 3.7.1 following the 3.7.0 release
PiperOrigin-RevId: 899835826
Change-Id: Ibe247b921e7dad7184acef69ee3199fec79c6e24
2026-04-14 16:49:03 -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
Michael Moss 6d70e66810 Update MuJoCo version from 3.6.0 to 3.7.0 following the 3.6.0 release
PiperOrigin-RevId: 881995135
Change-Id: I0c1a3b4a22c4c7cfada580b49a2cacde64cc84f3
2026-03-11 07:09:24 -07:00
Michael Moss 955d6c0b02 Update MuJoCo version from 3.5.1 to 3.6.0 prior to next release.
The next release will include breaking changes, so this bumps the major
version to reflect that.

PiperOrigin-RevId: 881351265
Change-Id: I970c68a0211651c07fcb8109ebd0b138196cf50a
2026-03-10 04:30:07 -07:00
Sam Haves 82e92cbcaa Remove PluginTest and make MujocoTest load plugins.
MujocoTest now loads plugins from MUJOCO_PLUGIN_DIR if set.
PluginTest is removed; all tests use MujocoTest directly.
testspeed binary loads plugins from MUJOCO_PLUGIN_DIR.

This is in preparation for moving common asset format parsing (obj, msh, stl, etc.) where we will always want to load those plugins.

PiperOrigin-RevId: 874194428
Change-Id: Id90805a9ba5de4627911b56d8b9c4ab4e1b29310
2026-02-23 12:15:22 -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 42958aab81 Update MuJoCo version from 3.5.0 to 3.5.1 following the 3.5.0 release
PiperOrigin-RevId: 869654894
Change-Id: I9cacaf4cbb70ad17faa24c3c30ec38ffe91b5deb
2026-02-13 03:54:25 -08:00
Yuval Tassa 4fa062c7e5 Update unreleased MuJoCo version from 3.4.1 to 3.5.0.
PiperOrigin-RevId: 868169291
Change-Id: I8041842811f5f664c80116993315f50d549b5575
2026-02-10 08:52:04 -08:00
Yuval Tassa 30b903b6c0 Migrate mjModel size fields from int to mjtSize.
This change updates all size-related members within the `mjModel` struct from `int` to `mjtSize`. This allows MuJoCo to handle models with a larger number of elements. Corresponding changes were made to macros, function signatures, and I/O routines to accommodate the new `mjtSize` type.

PiperOrigin-RevId: 860144595
Change-Id: I701c6d607715d240766b6210a9773cd9e4258c59
2026-01-23 09:41:49 -08:00
Yuval Tassa 4830f5a79e Add missing documentation for the asset cache.
Also improve `compile` sample timing logic and documentation.

PiperOrigin-RevId: 852855741
Change-Id: I9b2798208198ca68cf4cee9c968772954ada91c5
2026-01-06 11:07:42 -08:00
Copybara-Service 4a21b0ee01 Merge pull request #2831 from DavidPL1:fix-sample-compile-exitcodes
PiperOrigin-RevId: 852832955
Change-Id: Iddc7c9366f6e81800ed48a0790336db7dfa3e9d1
2026-01-06 10:18:43 -08:00
Matija Kecman e7077b5a05 Fix testspeed argument count check
PiperOrigin-RevId: 844128965
Change-Id: I3089c7e71efde1ee6fe7c24903d634ed44dfd6eb
2025-12-13 11:20:02 -08:00
Gabe Oppenheimer 96e376451c Update MuJoCo version from 3.4.0 to 3.4.1 following the 3.4.0 release
PiperOrigin-RevId: 840914696
Change-Id: Iffabc70dd174384ba1c535cafcd34982ff8e5712
2025-12-05 16:15:56 -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
Gabe Oppenheimer b6e162d6fa Update MuJoCo version from 3.3.8 to 3.4.0
PiperOrigin-RevId: 836719207
Change-Id: I28cbc90cee42aebfb5a4201561289ef6747cdc83
2025-11-25 10:16:02 -08:00
Haroon Qureshi f217a8f987 Implement FetchPackage; a simple wrapper around FindOrFetch.
FetchPackage calls FindOrFetch, but sets USE_SYSTEM_PACKAGE to OFF
(i.e. do not find, just fetch). It also sets EXCLUDE_FROM_ALL.

PiperOrigin-RevId: 822565180
Change-Id: I70476f57b8d3371cefd02e840add279423913f3f
2025-10-22 06:43:51 -07:00
Gabe Oppenheimer 48f10bfcb6 Update MuJoCo to v3.3.8 following the 3.3.7 release.
PiperOrigin-RevId: 819919328
Change-Id: Ib34f959f6f8efd83362d49e784aa8e0594036899
2025-10-15 14:39:05 -07:00
Alessio Quaglino b6f25ca623 Check mjs_getName return value in XML parser. Fixes #2898.
PiperOrigin-RevId: 819351410
Change-Id: I0807d71328068f6388991ae15274c7d61b4d3e53
2025-10-14 12:40:28 -07:00
Gabe Oppenheimer ae1febd83f Automated g4 rollback of changelist 818694877.
*** Reason for rollback ***

BEGIN_PUBLIC
Holding off on a minor version bump until the next release.

*** Original change description ***

#mujoco update the version to 3.4.0 ahead of the 3.4.0 release.

Bump the version to 3.4.0 ahead of the next release.

***

PiperOrigin-RevId: 818748143
Change-Id: I722e9beb80c61a48bd997da6a1840777a81d5036
2025-10-13 11:14:42 -07:00
Gabe Oppenheimer 02d2d4d49a Bump the version to 3.4.0 ahead of the next release.
PiperOrigin-RevId: 818694877
Change-Id: I42e261956a0219e549bec6a54cbf330a74f02f9f
2025-10-13 09:22:49 -07:00
Matija Kecman bd68f0c6cc Update CMake to use C++20
PiperOrigin-RevId: 817573868
Change-Id: I22c98515763623d7411fd12910cf88cdaa336e6e
2025-10-10 03:54:47 -07:00
Sam Haves e4704cd28b Create list_dependencies sample to list all dependencies for an MCJF file.
PiperOrigin-RevId: 814816067
Change-Id: Idc6232e5d1ef1ff0318aeacd0e3d4b4a5a303485
2025-10-03 13:47:28 -07:00
Taylor Howell 7e16ecaa25 Updates for testspeed.cc ctrl noise.
PiperOrigin-RevId: 814192687
Change-Id: I0498c8efc8e71cd578e6b9d40ffa1411447d3e43
2025-10-02 05:37:48 -07:00
David Leins 2d1b5f1ed0 Adds missing failure exit codes for sample compile 2025-09-23 10:14:47 +02:00
Yuval Tassa 681f5767b2 Remove -Wno-extra-semi, add workaround for mjSORT confusing some IDEs
PiperOrigin-RevId: 808689636
Change-Id: Ia091fb597c171a33842e62690d06f32614fbe4eb
2025-09-18 12:28:09 -07:00
Yuval Tassa 4b8454b79c Add semicolons after mjSORT macro calls.
PiperOrigin-RevId: 808587320
Change-Id: I9fd290b9a2b615647135f1250e87af8ea9bb81f6
2025-09-18 08:13:46 -07:00
Rishi Krishnan 8e9eb2fa38 Update MuJoCo's version number following the 3.3.6 release.
PiperOrigin-RevId: 808180152
Change-Id: I23de64cb0968b94c489b29622e4308d16513793a
2025-09-17 09:13:04 -07:00
Copybara-Service 9af1f55862 Merge pull request #2713 from vidurvij-apptronik:vidur/remove-installing-glfw3-headers
PiperOrigin-RevId: 808125077
Change-Id: If87b65d2d8607f153dfd66fbfa9a6ca39c98845f
2025-09-17 06:17:42 -07:00
Michiel Blokzijl 508d22f794 Update the GLFW dependency used by MuJoCo to 3.4.
This makes it possible to build open-source MuJoCo with Wayland support out of
the box.

Currently, it is necessary to run cmake with -DGLFW_USE_WAYLAND=ON and ensure
cmake can find the "ECM" package somehow (a dependency of the 3.3.6 version of
GLFW), for which there is no automated fetching setup. As this is no longer a
dependency of GLFW it seems to make more sense to update GLFW to make out of the
box builds on Wayland.

PiperOrigin-RevId: 800456607
Change-Id: Iffdf1d65319bfb134e580faceb63ac3bed7b9c84
2025-08-28 07:24:26 -07:00
Rishi Krishnan ed3ff15870 Update MuJoCo's version number following the 3.3.5 release.
PiperOrigin-RevId: 792806341
Change-Id: Ic68ecceacc48ddbd6b0c741ae8f0791551e1b4dd
2025-08-08 16:45:12 -07:00
Yuval Tassa 5187a712be Standardize exit codes for samples.
Fixes #909 #910

PiperOrigin-RevId: 782951003
Change-Id: I093c0032f665bf34fecf71a75012b2b0c4c22aba
2025-07-14 10:15:46 -07:00
Rishi Krishnan 3c99705f85 Update MuJoCo's version number following the 3.3.4 release.
PiperOrigin-RevId: 781596261
Change-Id: Iac050c4b9cb65542b52fa6b8c54ff2537bc6a648
2025-07-10 10:47:26 -07:00
Kevin Sayed a4ab35c194 update scrubs and set next version
PiperOrigin-RevId: 770740070
Change-Id: I6b2f1356706b1849872df2583adbbb3f72057884
2025-06-12 11:39:45 -07:00
Google DeepMind 4137a4c774 Bump version to 3.3.3 following the 3.3.2 release
PiperOrigin-RevId: 752482043
Change-Id: I3dae8a0b9de2be4d456e856825c18f16f62bf51a
2025-04-28 16:09:25 -07:00
Yuval Tassa 8f768be2da Remove solver_nisland field from mjData.
PiperOrigin-RevId: 750527660
Change-Id: I6b34944c92483ea2abc774df75efd868255a2bac
2025-04-23 03:27:41 -07:00
Gabe Oppenheimer 440ce5eb7a Update the version number to 3.3.2 following the 3.3.1 release.
PiperOrigin-RevId: 746147577
Change-Id: Idb7b4e7e06a4730b4f2eea8f6600b898e998f8db
2025-04-10 13:17:20 -07:00