Commit Graph

741 Commits

Author SHA1 Message Date
Erik Frey 6aa06d2f43 Add _all_fields to MjOption, MjModel, MjData for struct introspection.
PiperOrigin-RevId: 810066486
Change-Id: I807104fc955a505512287f63b7c184a29c0d150e
2025-09-22 10:27:21 -07:00
Google DeepMind 0e1104768a No public description
PiperOrigin-RevId: 809083979
Change-Id: I5c6641b73c76153c15f5cdf858b788e1433acc81
2025-09-19 10:10:45 -07:00
Google DeepMind 26ea20a21f No public description
PiperOrigin-RevId: 809074980
Change-Id: Ib3e3522addceddba6a057cfef80fcbd30a420b3d
2025-09-19 09:49:07 -07:00
Alessio Quaglino 77e025ea98 Move meshdir and texturedir to mjsCompiler.
For backwards compatibility in the Python bindings, both `spec.compiler.meshdir` and `spec.meshdir` are now allowed.

Fixes #2834.

PiperOrigin-RevId: 809060113
Change-Id: Ie23f1c5dd57de43568312a8e062906f4013bb474
2025-09-19 09:05:44 -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
Kyle Bayes 9740705510 Add cache functions to Python bindings.
PiperOrigin-RevId: 807813218
Change-Id: Ieab2843d92e79c07bc9f98196db51297a456dedb
2025-09-16 13:02:59 -07:00
Google DeepMind 2287b9f815 Don't prepend meshdir to asset paths in MjSpec.to_zip.
PiperOrigin-RevId: 806287351
Change-Id: I9afc8251f9cbced9ecd370b39cec6aeff424514b
2025-09-12 07:54:16 -07:00
Haroon Qureshi 017e7d5a73 Add light ids.
PiperOrigin-RevId: 805755907
Change-Id: I92a1b1ea4ce1495c2746fd518f33ab2d1ad81399
2025-09-11 03:20:44 -07:00
Rishi Krishnan 4b18009f47 Revert Eigen version
PiperOrigin-RevId: 805395095
Change-Id: I9c8184f2e667dd7595a6211626be606878f9c04f
2025-09-10 09:34:06 -07:00
Rishi Krishnan 6ec5f8b9c2 Update Mujoco Deps in preperation for the 3.3.6 release
PiperOrigin-RevId: 805007266
Change-Id: I9332d0b8439f8941b9dc9889c1e27d54e9a70b99
2025-09-09 12:01:53 -07:00
Kyle Bayes ea660f4c13 Expose minimal asset cache API.
PiperOrigin-RevId: 803126923
Change-Id: Iabf63802572f7cb86864b5ece85f44b3f15a4ec0
2025-09-04 12:18:36 -07:00
Michiel Blokzijl 02a535b44f Update https://pypi.org/project/glfw/ to 2.9.0.
This ensures that Python bindings build also uses GLFW 3.4, similar to C/C++
MuJoCo.

The hashes are from https://pypi.org/project/glfw/2.9.0/#files.

PiperOrigin-RevId: 802536702
Change-Id: Ie9cfc17a5f9146fe6731681115f7aaa98fcb323e
2025-09-03 07:01:53 -07:00
Haroon Qureshi 8d884585dd Add target relative mouse motion actions.
PiperOrigin-RevId: 802072880
Change-Id: I1ff204594a126f8e50df4c703709f70ec4dd458c
2025-09-02 03:39:49 -07:00
Alessio Quaglino 8acd83f317 Add passive collision mode for flexes.
PiperOrigin-RevId: 801754907
Change-Id: I4147af2ee2596519d42cb9a03cf8d5488f0bc3e8
2025-09-01 04:13:58 -07:00
Yuval Tassa b092563cab Remove mjDSBL_PASSIVE, split it into mjDSBL_SPRING and mjDSBL_DAMPING.
PiperOrigin-RevId: 800870384
Change-Id: I273e0ceec090901e2620febb67e57914928e94bb
2025-08-29 06:06:28 -07:00
Tom Power 79f2bbc727 Fix memory error when placing images in viewport
PiperOrigin-RevId: 800148735
Change-Id: I1c12ef23b0af9538b285d032460cf832eb48bf49
2025-08-27 13:20:45 -07:00
vidurvij-apptronik 28aa33b673 expose glfw 2025-08-27 12:00:37 -05:00
Haroon Qureshi ed6fa7fe09 Remove unused mjMOUSE_SELECT option.
PiperOrigin-RevId: 799957524
Change-Id: I69d091781dc2a2e4a762d2255d04fc411295602a
2025-08-27 03:19:04 -07:00
Yuval Tassa 7443e685ac Allow contact sensor subtree1/subtree2 to be any body.
PiperOrigin-RevId: 799632590
Change-Id: If9cd6c5a3a5f83d89ae024a8f64232ab1f1d603a
2025-08-26 11:00:39 -07:00
Yuval Tassa debfdf011e Add some missing Nullable annotations.
PiperOrigin-RevId: 799527319
Change-Id: If84a3b2f19243ea9cf8b114d1421879d8186eb1d
2025-08-26 05:52:01 -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
Yuval Tassa 2b45b39ce5 Move mjtConstraint from mjmodel.h to mjdata.h.
PiperOrigin-RevId: 798987338
Change-Id: I3117742de7eb3c16366f266fe0c0651262717cb4
2025-08-24 23:45:14 -07:00
Yuval Tassa d77ecb3f06 Move mjtConstraintState from mjmodel.h to mjdata.h.
This is the correct location, this enum is only used in `mjData`, not `mjModel`.

PiperOrigin-RevId: 798860951
Change-Id: I48b9a2afc831bd9a6966cc9586429fd03605bdd2
2025-08-24 12:37:54 -07:00
Yuval Tassa 1c1bb14e1c Order fields in mjxmacro like in mjmodel and mjdata headers, add tests.
PiperOrigin-RevId: 798848000
Change-Id: Id1a41f6a0a4e3e6f3bb197f096061bd1d72a4b51
2025-08-24 11:17:30 -07:00
Yuval Tassa a230aa60c5 Improve mj_addM and associated test
- Updated docs to clarify that only the lower triangle is touched
- The function was unnecessarily adding the upper triangle in the sparse case
- The test used an unnecessarily large model and stepping it leading to timeouts under ASAN

PiperOrigin-RevId: 798528736
Change-Id: I592cc17dfb62379bb0cd6b332a8eb7e8b0ef6355
2025-08-23 03:56:47 -07:00
Google DeepMind a64a26c3ae No public description
PiperOrigin-RevId: 798355907
Change-Id: I3a225e3200cbc60ccc3d93f21694a606a7ab296a
2025-08-22 15:04:46 -07:00
Yuval Tassa 93c5665730 Add some missing Nullable annotations.
PiperOrigin-RevId: 798298579
Change-Id: I773eda7deca10c820345a33835716072e0b9af5a
2025-08-22 12:15:02 -07:00
Sam Haves 1fb1810b07 Add ability to specify a material assignment to a mesh asset.
This extends both the spec and the XML definition to allow specification of a material name on a mesh. This material acts as a fallback in the case that the referencing geom element does not specify a material of it's own.

PiperOrigin-RevId: 798232378
Change-Id: Iaf300c727732744ea1b613e64334ee505ac6e209
2025-08-22 09:11:31 -07:00
Google DeepMind 42d8454555 Internal change.
PiperOrigin-RevId: 798190254
Change-Id: Ie3a3b6e074511991cc6ccb35f2c26c6d9ae7ccd8
2025-08-22 06:41:49 -07:00
Google DeepMind ecfe65242f Add nullable attribute to AST nodes for function parameters in API introspection. Fixes #309
This change introduces an `nullable` flag to `ArrayType`, `PointerType`, and `FunctionParameterDecl`. The code generation process now parses function comments from `mujoco.h` to identify parameters marked as "Nullable" and sets this flag accordingly.

PiperOrigin-RevId: 797870883
Change-Id: Ic7cac5a7a9c14177fbf97b8655c5c4809d4ef683
2025-08-21 12:35:10 -07:00
vidurvij-apptronik df6b503101 Update simulate library name in python cmake 2025-08-21 14:34:12 -05:00
Yuval Tassa 2f28473bc1 Remove transposed Jacobian fields from mjData
No longer computed unconditionally, only ad-hoc where required.

PiperOrigin-RevId: 797753297
Change-Id: I2030fc342c98ff33575b0526dd72e2110c4fcb74
2025-08-21 07:21:24 -07:00
Alessio Quaglino b66175eba6 Bending stiffness for curved shells in flex.
PiperOrigin-RevId: 796361841
Change-Id: I105ea235fe2a8e1bcbde67276d77fa92eed214a1
2025-08-18 04:13:18 -07:00
Yuval Tassa 6b41fbe72a Use CSR matrices for dof-dof index mappings
PiperOrigin-RevId: 795895311
Change-Id: I1000e0ee98906ef35990e73236e85d6354487b82
2025-08-16 13:06:32 -07:00
Yuval Tassa c0096b51a4 Move ntree to mjModel allocator sizes
PiperOrigin-RevId: 795855203
Change-Id: Idab185294d53dced9ebf073b782969dc5643b95a
2025-08-16 09:16:41 -07:00
Yuval Tassa 1447711037 Rename spec to sig in state-related API functions.
(to avoid confusion with mjSpec)

PiperOrigin-RevId: 795848898
Change-Id: I0b64eb85f5c7a3ee889a746c751d9f5561650277
2025-08-16 08:38:25 -07:00
Yuval Tassa 977f94e9df Delete sparsity structures from mjData, use the ones in mjModel
PiperOrigin-RevId: 795067950
Change-Id: If4f52e40ac49f7c6986b33ef9c8b534199dfd21a
2025-08-14 09:13:02 -07:00
Yuval Tassa 7eb13777f8 Put sparsity structures in mjModel, don't use them yet.
PiperOrigin-RevId: 795032051
Change-Id: I75c69e881980ff9c308acf00bb3a65f4b2ef12f5
2025-08-14 07:37:42 -07:00
Alessio Quaglino 07e7417d26 Add prefix to asset paths when appending specs.
PiperOrigin-RevId: 794966246
Change-Id: I4825a11cc3234e6f403340dd997742cea0e2183b
2025-08-14 03:48:56 -07:00
Alessio Quaglino eff4dda189 Suffix asset names when attaching specs.
PiperOrigin-RevId: 794717786
Change-Id: I02abe06ca3c43138e91e61f4acf87a26b3faf7fc
2025-08-13 13:43:16 -07:00
Alessio Quaglino cc52d0242b Do not strip the path when compiling an mjSpec.
The path has already been stripped while parsing. This will enable prefixes that contain a `/` while attaching.

Also use `spec.meshdir` for asset paths in `spec.to_zip()`.

PiperOrigin-RevId: 794573523
Change-Id: Ic36bb641c3d72848399006cf718afd8542e91ed4
2025-08-13 07:43:25 -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
Rishi Krishnan 3152458a6b Update Mujoco Deps in preperation for the 3.3.5 release
PiperOrigin-RevId: 792755404
Change-Id: I9776bb5e5bf2a891e0fa0fbf486875727e1d13b4
2025-08-08 14:07:00 -07:00
Yuval Tassa 249b0cd87d Improve field order and comments in mjdata.h
PiperOrigin-RevId: 792642328
Change-Id: I59330e228a111edec9e86d93d5cdf646b0fab00e
2025-08-08 08:52:35 -07:00
Saran Tunyasuvunakool 4e67fe79f3 Fix use of DYLD_FALLBACK_LIBRARY_PATH in mjpython.
According to `man dyld`, the default value for DYLD_FALLBACK_LIBRARY_PATH changed in late 2023. In newer binaries, if DYLD_FALLBACK_LIBRARY_PATH is not set, dyld will use /usr/local/lib and /usr/lib as fallback. If it is set, these locations will not be used as lookup paths unless explicitly added.

Fixes #2781

PiperOrigin-RevId: 791897707
Change-Id: I00d7e80bfbd5e5d7dbf2f601eaad4d9b0e1030f3
2025-08-06 16:53:25 -07:00
Saran Tunyasuvunakool 21a7ac7dd9 Change the license field in pyproject.toml to SPDX string.
According to the deprecation warning, support for the old way of declaring the license will be removed from setuptools on 2026-Feb-18.

PiperOrigin-RevId: 791716539
Change-Id: Iaf9ec55f9425380b017bd7ea370cd481ed01aa8f
2025-08-06 09:11:14 -07:00
Yuval Tassa 784c7a419b Improve builtin hemisphere docs
PiperOrigin-RevId: 791271829
Change-Id: I391215b5388f4e9e2a17198dbcdbd0c605fda4b4
2025-08-05 10:25:45 -07:00
Yuval Tassa 2f4375dda3 Add font_scale option to Renderer
PiperOrigin-RevId: 791213051
Change-Id: I22efd8d09637edbd9a4861132dfff3b46e9340bc
2025-08-05 07:50:20 -07:00
Yuval Tassa 705ec6d7fb Adds built-in superellipsoid mesh.
PiperOrigin-RevId: 791196831
Change-Id: I1d864f6e620870f016377a4d9e2e26d1a23fd77e
2025-08-05 07:02:52 -07:00