Commit Graph

2211 Commits

Author SHA1 Message Date
Alessio Quaglino c77babe046 Fix a bug in MuJoCo's user_mesh.cc that caused meshdir_ to be overwritten when a model was loaded with a nested model.
PiperOrigin-RevId: 675092713
Change-Id: Iad6336141749510bf5544cab9c06533ee1589c08
2024-09-16 04:22:13 -07:00
Yuval Tassa fd17b2144a Replace double- or single-precision-denominated function calls in the engine with the equivalent mjtNum-denominated calls. This avoids unnecessary casting or precision loss when MuJoCo is compiled for 32-bit float precision. Accordingly, remove #include <math.h> from all engine source files.
build / windows-2022 (push) Has been cancelled
build / macos-12 (push) Has been cancelled
build / ubuntu-20.04-clang-10 (push) Has been cancelled
build / ubuntu-20.04-clang-11 (push) Has been cancelled
build / ubuntu-20.04-clang-12 (push) Has been cancelled
build / ubuntu-22.04-clang-13 (push) Has been cancelled
build / ubuntu-22.04-clang-14 (push) Has been cancelled
build / ubuntu-22.04-gcc-10 (push) Has been cancelled
build / ubuntu-22.04-gcc-11 (push) Has been cancelled
build / ubuntu-22.04-gcc-12 (push) Has been cancelled
build / ubuntu-22.04-gcc-9 (push) Has been cancelled
Also, minor type-related fixes in `user_mesh.cc`.

PiperOrigin-RevId: 675082329
Change-Id: Icc5eb9f9eb4fbf09b08d7d4b9b2929f414e4a75c
2024-09-16 03:40:17 -07:00
Google DeepMind dde25d039b Update Mujoco dependencies to latest versions.
PiperOrigin-RevId: 674003245
Change-Id: Ib758fa361cb34a786dcd3d55fbf3e5a459b75a3f
2024-09-12 14:10:21 -07:00
Yuval Tassa 577afd1e28 Improve wording of some items in the changelog.
PiperOrigin-RevId: 673890612
Change-Id: I731f9afcd5ec5f54f7ddc318dcea238f08d7a6bf
2024-09-12 09:54:15 -07:00
Kyle Bayes 9f8f6947fc Remove global linear search in favor of (almost constant time) local search when finding the convex hull of the polytope and new point in EPA for NativeCCD.
PiperOrigin-RevId: 673852140
Change-Id: Ib2ab64bad3cd2aa7d252b4016754f37ea30e1077
2024-09-12 08:11:30 -07:00
Kyle Bayes 5144be2baa Add unit tests for NativeCCD.
PiperOrigin-RevId: 673849092
Change-Id: Ie703c9f461bb483fd3335d1ba589211205c73c8c
2024-09-12 08:03:18 -07:00
Kyle Bayes 8d165d5cc7 Fix early termination in GJK. It's possible for x_k to be the origin, so we should run the previous test to conclude that the objects are colliding.
PiperOrigin-RevId: 673834101
Change-Id: I596b30d2847670261f8067840b34dc13de401ecb
2024-09-12 07:17:53 -07:00
Taylor Howell e3d3a24b36 Add spatial tendons with site wrapping to MJX.
PiperOrigin-RevId: 673783473
Change-Id: I09b13787e3e0914c8de21d81db0347c4638b2f1d
2024-09-12 04:17:16 -07:00
Kyle Bayes 14f420069e Make projectOriginPlane in NativeCCD numerically robust.
PiperOrigin-RevId: 673761409
Change-Id: I64304c89f768414d60e2dcf2e71feb8a6f9b2635
2024-09-12 03:01:15 -07:00
Alessio Quaglino 567793c26f Store model paths in assets.
This enables to preserve the paths of the child spec during `attach`.

PiperOrigin-RevId: 673349237
Change-Id: Ibf075c7ec037ff5d540bc60d6e77c12f60269791
2024-09-11 05:20:14 -07:00
Yuval Tassa cf721def3a Missing renames of mpr_ -> ccd_
PiperOrigin-RevId: 673330801
Change-Id: I1cd67454660aaea6dd41eb50a12638358676b8d0
2024-09-11 04:09:57 -07:00
Taylor Howell 8710126d08 Raise NotImplementedError for unsupported sensors in MJX. Update MJX feature parity docs to include fully supported sensors.
PiperOrigin-RevId: 673325233
Change-Id: Ib262bdd37937c5230765c11d1f61581e55e8c397
2024-09-11 03:50:46 -07:00
Yuval Tassa 4e3dc14f8e Remove model/humanoid100/humanoid100.xml (used <include>), replace with model/humanoid/humanoid100.xml (uses <attach>)
PiperOrigin-RevId: 673123895
Change-Id: I0c3c6dac69d9fc12a6ea76d586c34503fc167bad
2024-09-10 15:14:04 -07:00
Alessio Quaglino 33e56ccb88 Remove edge length computations from elasticity plugins.
Read the lengths from mjModel and mjData flex arrays.

PiperOrigin-RevId: 673116608
Change-Id: Iffa209abb7443707effaffb5bda99345399fac1c
2024-09-10 14:54:53 -07:00
Yuval Tassa e4d4153352 Move sanitizer instrumentation to a separate header file. Fixes #2049.
PiperOrigin-RevId: 672986547
Change-Id: I42522f4925237a73168e965364a2dd65c0f067cb
2024-09-10 09:05:35 -07:00
Yuval Tassa 8fa7fe7f5b Add a tutorial section on multiple frames in the same scene. Fixes #1757, #1356.
PiperOrigin-RevId: 672902542
Change-Id: Ie9fae2151354206b1418c129e2bd2ab016695ec3
2024-09-10 04:22:07 -07:00
Baruch Tabanpour dd45e67ec4 MJX documentation update. Fixes #1703.
PiperOrigin-RevId: 672667174
Change-Id: I528a16c4233c1448cbca660bd6c7ab2e70d0c6ee
2024-09-09 14:07:16 -07:00
Yuval Tassa be00fafc43 Various documentation improvements.
- Replace two "below" instances in `XMLreference.rst` with proper links (there are many more that need fixing).
- Discuss friction cones and 32-bit floats in Performance Tuning.
- Delete Damping subsection in Tips and Tricks, no longer relevant after the introduction of the implicit/fast integrators.
- Simplify discussion of free bodies, mention free joint alignment.
- Clarify frame used by kinematic Jacobians.

PiperOrigin-RevId: 672615057
Change-Id: Ib59b71e3c09cdd13415519fc4a964131b155718f
2024-09-09 11:36:07 -07:00
Alessio Quaglino 4862b9e765 Remove plugin support from Composite particles.
This functionality is replaced by FlexComp.

PiperOrigin-RevId: 672503965
Change-Id: I58953267de285f82e416f9f60576a336b7d0da4c
2024-09-09 04:58:26 -07:00
Kyle Bayes 44145742a7 Exit GJK early if geom distance doesn't need to be recovered.
PiperOrigin-RevId: 672334991
Change-Id: I4af582c799140ccf3ac4d51952e547b08ab5d55e
2024-09-08 14:57:50 -07:00
Kyle Bayes 61721f8d3c Set tolerance in GJK to zero for colliding discrete geoms.
PiperOrigin-RevId: 672326091
Change-Id: Iddec335272461c9aee13c1960640a453ff59f841
2024-09-08 13:49:58 -07:00
Copybara-Service 56bb3ca5de Merge pull request #1901 from abhihjoshi:usd-fixes
PiperOrigin-RevId: 671815757
Change-Id: I8a08385b63401c743253545d89389ab8aaac91bc
2024-09-06 10:31:09 -07:00
Yuval Tassa e3cda3e0e3 Fix alignment in mjxmacro.h
PiperOrigin-RevId: 671759410
Change-Id: I4f92d8b60a64d89016af4c717beddf8b4b844996
2024-09-06 08:04:12 -07:00
Kyle Bayes 4fc6fb179b Remove libccd compatibility layer from native ccd.
PiperOrigin-RevId: 671740643
Change-Id: If3c1097df5c505f70c2dc0c090a7f5a93a43c683
2024-09-06 06:56:01 -07:00
Taylor Howell fa156ed22f Add accelerometer to MJX.
PiperOrigin-RevId: 671355424
Change-Id: I8593bcad6ba311f3c555b118889e2a5c6b367ec7
2024-09-05 06:57:09 -07:00
Taylor Howell 20296466b1 Add subtreelinvel and subtreeangmom sensors to MJX.
PiperOrigin-RevId: 671347528
Change-Id: I8a32590c650ca6d0bb6df43d0347f707ffc05f12
2024-09-05 06:21:50 -07:00
Taylor Howell 7b073b60c4 Add rne_postconstraint function to MJX. This function matches mj_rnePostConstraint and computes cacc, cfrc_ext, and cfrc_int.
PiperOrigin-RevId: 671336319
Change-Id: I263b46c56a7609b9a8a30895c012798579d3dffa
2024-09-05 05:35:26 -07:00
Taylor Howell cd8ff4401d Add eq_objtype to mjx.Model and support for connect constraint using sites in MJX.
PiperOrigin-RevId: 671225109
Change-Id: I8e2e6eb4c539d318658d3d7dfe0a7f03b411aabc
2024-09-04 22:00:36 -07:00
Abhishek Joshi fe1d6dad02 Using temp directory for usd exporter test 2024-09-04 18:18:37 -04:00
Kyle Bayes 81618f95f9 Update doc for mj_addFileVFS and mj_addBufferVFS as VFS is no longer memory limited.
PiperOrigin-RevId: 671087960
Change-Id: I0b022554f4f47fe2e64c8201cd855b63d514c344
2024-09-04 13:51:43 -07:00
Yuval Tassa 621ea29382 Improve error message for keyframe size mismatch. Fixes #2041
PiperOrigin-RevId: 671069582
Change-Id: Ie63d3bf2b543f7bb5e3c123093095e76a95b7b48
2024-09-04 12:58:31 -07:00
Yuval Tassa 4a4db13eba Update documentation to reflect that multi-threading is now used when loading meshes.
PiperOrigin-RevId: 671063740
Change-Id: I77f2e028c3e9e9801c03e8e107eb6d8830becf22
2024-09-04 12:38:29 -07:00
Kyle Bayes b9822e4347 Check hexahedron in polytope3 to make sure it contains the origin. Otherwise, EPA can return invalid results.
PiperOrigin-RevId: 671057312
Change-Id: Ieb21a77ea679ee5c18972d3a0375578d9a98405e
2024-09-04 12:17:54 -07:00
Yuval Tassa b502ceef00 Add note that XML saving requires that the spec first be compiled. Fixes #1832
PiperOrigin-RevId: 671046666
Change-Id: If5885545d5316537147d293fbe854caa568558b2
2024-09-04 11:47:34 -07:00
Kyle Bayes 79a5bd0915 Add better boundary tests in polytope3 for EPA.
PiperOrigin-RevId: 671038835
Change-Id: I259260a7b40e825678b52187bee4791266ae10c4
2024-09-04 11:25:44 -07:00
Yuval Tassa 8954a088ce Add automatic free-joint alignment.
PiperOrigin-RevId: 671010083
Change-Id: Ib7d60f75c7f545b1886703715663db8de77feeef
2024-09-04 10:07:33 -07:00
Alessio Quaglino ae4987026c Add tree element support to mjs_firstElement() and mjs_nextElement().
PiperOrigin-RevId: 671003046
Change-Id: I9e07d7c85c7218e9bded0f50af9db62d0f1e21e1
2024-09-04 09:46:24 -07:00
Alessio Quaglino d3dfa6f970 Add mjs_findElement() to find any element in a spec by name.
Also, remove mjs_findMesh() and mjs_findKeyframe().

PiperOrigin-RevId: 670978980
Change-Id: Id88b800eb8a4c5efc40866f72a4442bf1d1437d0
2024-09-04 08:24:22 -07:00
Alessio Quaglino 0e8c0b80eb add content_type to model in the XML schema.
PiperOrigin-RevId: 670961443
Change-Id: I98cd6bb61b50029cdd4f5b31e23d268989d136da
2024-09-04 07:25:55 -07:00
Nimrod Gileadi 9a27fc14c2 Raise appropriate errors for mj_addBufferVFS in Python bindings.
When loading models in the XML bindings, different issues with the asset dictionary were all reported as "assets dict is too big".

PiperOrigin-RevId: 670960339
Change-Id: I2e47d91a6b433fd90ebdf9960a9b5b47413af410
2024-09-04 07:20:25 -07:00
Kyle Bayes e9a85764ea Native CCD: Replace mju_malloc with C standard malloc, fix bug in computing v5 in polytope3, and add another warning in EPA.
PiperOrigin-RevId: 670939250
Change-Id: Ia0d8b7c78ed2ef7019f2a691c066b20e98dc1889
2024-09-04 05:53:31 -07:00
Yuval Tassa 3437361bfb Add reduced sparse dof-dof matrix structures to mjData.
PiperOrigin-RevId: 670919263
Change-Id: I3592de802ae84648d97230115c2e9c3437424968
2024-09-04 04:24:02 -07:00
Yuval Tassa 42eb669e4e Precompute mappings between M <-> D sparse representations.
PiperOrigin-RevId: 670898353
Change-Id: I4b15477b1b6eb4a64cf7d4a0bb5af8fcb95d4e45
2024-09-04 02:57:13 -07:00
Baruch Tabanpour 303e5e7718 Fix test threshold for external tests.
PiperOrigin-RevId: 670720396
Change-Id: I28bff46535ffdd99724c75f8137834d84c3ec534
2024-09-03 15:06:42 -07:00
Baruch Tabanpour 49711fa14f Add support for joint and tendon frictionloss to MJX.
PiperOrigin-RevId: 670679777
Change-Id: I2eb56d013c11d4e1851f1c2edd6d98faaf854db9
2024-09-03 13:17:41 -07:00
Yuval Tassa 2d3d5415b7 Add mj_jacDot: Time derivative of kinematic Jacobian.
PiperOrigin-RevId: 670505417
Change-Id: Icf30cff5dc955e002bd2f5d5fb3a04f8388d0780
2024-09-03 04:49:47 -07:00
Nimrod Gileadi fb38727303 Update zipp to 3.19.1 in make_sdist_requirements.txt
PiperOrigin-RevId: 670486730
Change-Id: I1dfabb8d5206024595a49d2421f148a284a4eac7
2024-09-03 03:37:49 -07:00
Copybara-Service a02934a408 Merge pull request #2036 from kevinzakka:doc-fix
PiperOrigin-RevId: 670207735
Change-Id: I810720a41e6b770f8d7d3bacea9f5dc1433827b7
2024-09-02 07:08:56 -07:00
Kevin Zakka f60ab4492d Remove vestigial mentions of mjOption.collision in the docs. 2024-08-31 16:49:25 -07:00
Yuval Tassa 7abd5d427a Restore mistakenly deleted/modified changelog items.
PiperOrigin-RevId: 669732777
Change-Id: I473480acb06f881049c1f338e1e87ff86c30f330
2024-08-31 15:04:08 -07:00