Commit Graph

252 Commits

Author SHA1 Message Date
Matija Kecman 8f56d5eefa Minor style fixes
PiperOrigin-RevId: 872669434
Change-Id: I794173b9fad3a286cbf57d246b2f8672412a0e20
2026-02-19 19:16:31 -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
Kevin Zakka fa43e2c03b Fix tracking camera detaching when toggling visualization flags, fixes #3108
Toggling visualization flags via keyboard shortcuts (e.g., C for contact points, F for contact forces) causes the SECT_RENDERING event handler to unconditionally re-evaluate the camera selection, which can reset a tracking camera to free mode. This particularly affects users of mujoco.viewer who set tracking cameras programmatically.

Guard the camera update logic so it only runs when the camera selector itself is changed, not when other items in the rendering section are modified.

PiperOrigin-RevId: 871600340
Change-Id: Ia6ef2a1617c6cdc18c7d10b4b099a8f2c620a824
2026-02-17 18:59:33 -08:00
Taylor Howell 5903d4826f Sparse ten_J and ten_J_colind
PiperOrigin-RevId: 869712136
Change-Id: Id2979684aa0c39552cb8453852483cbac55f0ea3
2026-02-13 06:57:22 -08:00
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
Google DeepMind 336e1026a4 Sparse ten_J and ten_J_colind memory
PiperOrigin-RevId: 868834376
Change-Id: Iec92d9e09e3134666895e54a78cb02439d74a4de
2026-02-11 14:05:43 -08:00
Taylor Howell d011285380 Sparse ten_J and ten_J_colind memory
PiperOrigin-RevId: 868800229
Change-Id: Id83f9fd40dd9bece06fd99753e4202eea17ca884
2026-02-11 12:45:50 -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
Sam Haves 8344dba11e Remove special USD handling from simulate CMakeLists.
USD support is now enabled via plugin.

PiperOrigin-RevId: 864491943
Change-Id: Ib0a80413821b0f398ff05bf87c8fb79e93a811e6
2026-02-02 13:15:48 -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
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
Yuval Tassa 769f37b653 Implement sleeping in engine
PiperOrigin-RevId: 829361787
Change-Id: I6f64d8e25c4248cf32c18cd94d37ff5def78946e
2025-11-07 03:33:07 -08:00
Yuval Tassa abc02b736e Minor fixes to viewer diagnostics
- When `mjData.nefc` was 0 (solver not run at all), we were plotting the stale diagnostics from the last run; now fixed.
- In the case where islands were used, the semantic of the plotted diagnostic `sqrt_nnz` (square root of Hessian nonzeros) is changed. It used to be the sum of square roots of solver nonzeros per island, it is now the square root of the sum of all nonzeros in all islands. The semantic `sqrt(sum(nnz_i))` was found to be more consistent than `sum(sqrt(nnz_i))`, in the sense that switching islanding on/off leads to smaller changes and is more in line with the interpretation of islanding as [block-diagonalization](https://mujoco.readthedocs.io/en/3.3.7/computation/#constraint-islands).

PiperOrigin-RevId: 827624908
Change-Id: I5fc86364ead585a4752a6d44823fb75cf6c7c318
2025-11-03 13:23:05 -08:00
Sam Haves 18e60369f3 If building simulate with USD support remove the no-deprecated warning due to deprecated header usage in USD.
PiperOrigin-RevId: 822807399
Change-Id: I2765f4a7260b5ac8b3ef5894c1c5ce7a3a745baf
2025-10-22 17:56:43 -07: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
Yuval Tassa 431f96572e Remove unused mjOption.apirate.
PiperOrigin-RevId: 815633571
Change-Id: Ib98f3eb2df47f96fa1fe6e987a3a0cd23a9479f6
2025-10-06 02:51:17 -07:00
Taylor Howell 401bf431b8 Modify Simulate::InjectNoise to set target of exponential decay to value from key_ctrl if a valid key is provided as input.
PiperOrigin-RevId: 813819040
Change-Id: I79508039b17fb3484b71ae0d19614c32adacfa10
2025-10-01 10:46:29 -07: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
Matija Kecman afbefc38a6 Ensure noise is injected when the simulation is paused and a single step is manually requested
PiperOrigin-RevId: 807688008
Change-Id: I8de9706c633565d6d6944b58d34de9da1037a837
2025-09-16 07:35: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
Yuval Tassa ec94bb49aa Make constraint island discovery on by default.
Also fix latent bug in mjData serialization.

PiperOrigin-RevId: 799505349
Change-Id: I299e7cc8133fa2ec0b339a7ff3d02543e06778b1
2025-08-26 04:27:24 -07:00
vidurvij-apptronik b88ec4df73 Fix SimulateDependecies 2025-08-21 14:10:44 -05:00
Yuval Tassa c7a82c32dc Do not update qacc_warmstart at the end of the solver call; instead, update it at the same time as all other state variables. This change makes mj_forward idempotent.
See changelog herein for motivation and discussion.

PiperOrigin-RevId: 797392841
Change-Id: If50e9f09e1d07e8363169d3589c32097aeca2432
2025-08-20 11:30:13 -07:00
Vidur edb17909a7 Update cmake 2025-08-18 14:00:38 -05: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
Vidur d13329ed1d adding build interfaces to the linked directories 2025-07-23 12:53:38 -05:00
Vidur Vij af87c6d7a0 Pull request changes 2025-07-18 12:39:07 -05:00
Yuval Tassa 5e666635f6 Remove mjtVisFlag.mjVIS_FLEXBVH and mjvOption.oct_depth
PiperOrigin-RevId: 783355711
Change-Id: I1e11999d5c533925f1d07266aeca95598a5691ba
2025-07-15 09:08:22 -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
Sam Haves 14972d2490 Add mj_loadUSD function. Change simulate to use that instead of manual spec compilation.
PiperOrigin-RevId: 780608874
Change-Id: I333238c756fe76b371518a7cdf9452b93da3540a
2025-07-08 10:04:08 -07:00
Vidur b2300684d8 Remove unused variable definition 2025-07-01 18:36:11 -05:00
Vidur 4c7c68e518 add glfw3 install back to cmake 2025-07-01 18:17:21 -05:00
Vidur ef8da59cb3 Merge branch 'original/main' into vidur/remove-installing-glfw3-headers 2025-07-01 16:27:15 -05:00
Vidur 641d95313a Remove installing glfw3 headers 2025-07-01 16:25:07 -05:00
Sam Haves e80a62c6d5 Allow loading USD files into simulate.
PiperOrigin-RevId: 776584803
Change-Id: I66a5277b3752d69ba5d44ed419204951edb18d41
2025-06-27 07:59:21 -07:00
Matija Kecman 09f7154e57 Add option to only sync the state to improve sync performance in passive mode.
By default this option is off, which preserves the current behavior of syncing all of `mjModel` and `mjData`.

PiperOrigin-RevId: 776498017
Change-Id: I02127c9397efbabebb89b0e0d139b00b6e665d35
2025-06-27 02:49:58 -07:00
Yuval Tassa 14dc7c2a60 Add "cameraid" attribute to visual/global specifying the default camera to use at model load.
PiperOrigin-RevId: 773783069
Change-Id: I2fff2abdceedc982d89cee8d14b95abceea1c113
2025-06-20 11:41:27 -07:00
Google DeepMind 6b309b5251 Display equality constraints in the simulate UI.
Add section for toggling constraint activity to the UI, similar to actuators or joint controls.

PiperOrigin-RevId: 772866923
Change-Id: I017b9195fcf67b5865e9d44d6c8aded64c8bc46d
2025-06-18 04:42:34 -07:00