Commit Graph

2449 Commits

Author SHA1 Message Date
Yuval Tassa b6037d1759 Improve mjSpec documentation. Fixes #2074.
PiperOrigin-RevId: 692251710
Change-Id: Ia46bbbe5b7eaa890433b38fed66824f716cc9ea0
2024-11-01 12:06:14 -07:00
Taylor Howell a51f346059 Use sparse (uncompressed) actuator_moment in mj_transmission.
PiperOrigin-RevId: 692179704
Change-Id: Ic30ac5a98dc13de2028e378df65dc88ba3912bf5
2024-11-01 08:06:28 -07:00
Kyle Bayes 1d58576d28 Fetch source code line links for API functions on docs client side.
PiperOrigin-RevId: 692115441
Change-Id: Ifbedf6a4998000f99e2275cb43293b3050daf0ee
2024-11-01 03:28:53 -07:00
Copybara-Service 09212a9541 Merge pull request #2159 from Andrew-Luo1:main
PiperOrigin-RevId: 691868879
Change-Id: If34d40aef885970895aa2e1dd11ce2206fa729be
2024-10-31 11:11:08 -07:00
Yuval Tassa c9f78ad8a8 Rename nnzJ to nJ in mjData.
This naming is more consistent.

PiperOrigin-RevId: 691858223
Change-Id: Ife3db822afa0b51b30d0792548b35b3742da388a
2024-10-31 10:43:10 -07:00
Taylor Howell 554641060b Add support for computing elliptic cone contact forces to MJX. Fixes #2153.
PiperOrigin-RevId: 691829630
Change-Id: I862ac9c7db07d0a74b718d2a41e19d5ae636a260
2024-10-31 09:22:59 -07:00
Kyle Bayes 18682aac6a Fix function definition formatting.
PiperOrigin-RevId: 691782530
Change-Id: Ib1611285e77e274b17074d5f09ede00cdc0c6f0f
2024-10-31 06:45:41 -07:00
Alessio Quaglino 94bbf297fc Replace flex_xvert0 with flex_vert0
`flex_xvert0` stored the Cartesian position of the vertices in `qpos0`. This array was unused, so it is now replaced with `flex_vert0`, which still contains the positions of the vertices, but normalized on the bounding box of the flex so that the coordinates are in `[0,1]^m->flex_dim`. This will be useful in the future for using different interpolation methods for computing flex deformations.

PiperOrigin-RevId: 691779361
Change-Id: I5c4223103cd4558f4e268fe3e8d8177541e4754f
2024-10-31 06:30:36 -07:00
Baruch Tabanpour 26ccaeb78e Don't populate _qM_sparse, _qLD_sparse, _qLDiagInv_sparse fields if they were never set via _full_compat. Fixes #2188
PiperOrigin-RevId: 691538016
Change-Id: Ib0385166af2dfbbb46cf1986cb692e1fda467a0b
2024-10-30 13:43:02 -07:00
Kevin Zakka a9737c60e8 Copybara import of the project:
--
5b525ccaef3d7184d3167815be63ed630781a064 by Kevin Zakka <kevinarmandzakka@gmail.com>:

Add command line scripts to MJX docs.

COPYBARA_INTEGRATE_REVIEW=https://github.com/google-deepmind/mujoco/pull/2196 from kevinzakka:typo-fixes 5b525ccaef3d7184d3167815be63ed630781a064
PiperOrigin-RevId: 691497203
Change-Id: I7c5d6a8fcbd2a42939673cee5eadb30bebdad833
2024-10-30 11:41:11 -07:00
Yuval Tassa 70d944b458 micro-optimization to mju_mulMatTVecSparse
PiperOrigin-RevId: 691431137
Change-Id: I95f94ff38ae911194b21aa220af35c7374af9739
2024-10-30 08:41:18 -07:00
Yuval Tassa 32df8a515a Fix typos. fixes #2139
PiperOrigin-RevId: 691429879
Change-Id: I929b7a387ec41f68b8d85fe20de83083216da36a
2024-10-30 08:34:39 -07:00
Copybara-Service 7c2b2d353c Merge pull request #2190 from jjyyxx:patch-2
PiperOrigin-RevId: 691384670
Change-Id: I28c69eac4f51f1c41bd4f88540c516d0f628d197
2024-10-30 05:43:04 -07:00
Yuxuan Jiang e1cb43819a Fix typo in MJDATA_VECTOR definition 2024-10-30 14:27:32 +08:00
Baruch Tabanpour 03d04f6096 Add texture fields to mjx.Model for madrona collaborators.
PiperOrigin-RevId: 691170517
Change-Id: Icb8e2d6ed65a13d17dc2565d3d84de629a10c37a
2024-10-29 14:49:12 -07:00
Taylor Howell f47840e57c Add mju_dense2sparse to public API.
PiperOrigin-RevId: 691125900
Change-Id: Id9b7c739ee14bff2317168da258b1a3acbdafdbe
2024-10-29 12:47:48 -07:00
Alessio Quaglino e835f139c8 Add sibling traversal for tree elements.
PiperOrigin-RevId: 691057957
Change-Id: I3f30cf175b5ad0842f3fbbf7fdb42ba7a2212682
2024-10-29 09:55:08 -07:00
Alessio Quaglino b941e994d9 Move keyframe resizing from compilation to attach (mjCModel::operator+=).
This allows to resize parent keyframes also when the child has no keyframes.

PiperOrigin-RevId: 691045299
Change-Id: I3ab6509b13b5754e937ec77daf9efe697cabf1bc
2024-10-29 09:17:55 -07:00
Yuval Tassa e889cffe23 Clarify in mju_boxQP test that for the synthetic test set, the average number of factorizations is expected to be 5 or less, while the worst case is expected to be 6 or less.
PiperOrigin-RevId: 691037804
Change-Id: Id0bc8bedf08d623efcacbe696775f0ef0f6781b9
2024-10-29 08:55:50 -07:00
Yuval Tassa 1336e99d88 Remove test annotation from mjspec notebook
PiperOrigin-RevId: 690987516
Change-Id: Ia99b65278609166ecec9002e5290c44a54255d80
2024-10-29 06:02:06 -07:00
Alessio Quaglino 0995af83f9 Add documentation for SdfLib plugin.
Fixes #2182.

PiperOrigin-RevId: 690980373
Change-Id: Ifc94f928e9cfbdbef3cb6f11ad4bffed542bf49a
2024-10-29 05:32:13 -07:00
Google DeepMind 71cfcc5432 Use assertIn instead of assertContainsSubsequence for substring checks.
A contained subsequence must not necessarily be continuous, so the check only
checked if the individual letters were appearing in order within the message,
possibly interspersed with other characters.

PiperOrigin-RevId: 690977874
Change-Id: I36bd5a0105b979a9b0d6d04ca5239245d4f8d041
2024-10-29 05:20:52 -07:00
Yuval Tassa 6703a40fcf Improve plugin documentation.
PiperOrigin-RevId: 690974299
Change-Id: Iadaabafb7434ada9579d6e2f64aae435cdfedbd8
2024-10-29 05:07:31 -07:00
Taylor Howell ce5f8b4728 Fix typo in mju_muscleDynamics comments.
PiperOrigin-RevId: 690949399
Change-Id: I8102fb72cce909786eab0771467c7f6f751792bf
2024-10-29 03:31:28 -07:00
Alessio Quaglino f1d4b23e48 mjSpec tutorial backwards compatibility with the latest MuJoCo release.
PiperOrigin-RevId: 690747714
Change-Id: Ib8894a1dc2a68e30a110e773c77fbd2baee87efd
2024-10-28 14:19:17 -07:00
Baruch Tabanpour d01fb81b50 Use eq_active0 in MJX.
PiperOrigin-RevId: 690727109
Change-Id: If60a99d7644e0376a27039478319ff5300b15cc1
2024-10-28 13:21:05 -07:00
Alessio Quaglino 13f11d4c45 Fit typo in mjSpec tutorial link.
PiperOrigin-RevId: 690676376
Change-Id: I5f082f5703488403aa65be76d208def68ccc3eb9
2024-10-28 11:00:09 -07:00
Alessio Quaglino 0be0896bec Add mjSpec tutorial.
PiperOrigin-RevId: 690670950
Change-Id: I68de7ad57a75d6c1a443fa2cd427e59799ddd830
2024-10-28 10:45:30 -07:00
Yuval Tassa 864b805a6e Fix multiple bugs related to connect and weld constraints with site semantics. Fixes #2179
The introduction of site specification to connects and welds in 3.2.3 conditionally changed the semantics of `mjData.eq_obj1id` and `mjData.eq_obj2id`. These changes were not properly propagated in several places leading to incorrect computations of constraint inertia, readings of affected force/torque sensors and runtime enabling/disabling of such constraints.

PiperOrigin-RevId: 690670420
Change-Id: I55ee8a013cbee8457f8d6c7f33c2981aedafbab6
2024-10-28 10:44:04 -07:00
Copybara-Service 2c86136dd6 Merge pull request #2160 from traversaro:patch-40
PiperOrigin-RevId: 690660035
Change-Id: Id4dc7eb53b7c6cda050d1e6b385eec16d66d077e
2024-10-28 10:17:13 -07:00
Yuval Tassa 3d920e6a70 Update build documentation to include instructions on how to build the docs locally.
PiperOrigin-RevId: 690616910
Change-Id: I717988e3adc67cb6d65488d39bc804c3d4f0e3b5
2024-10-28 08:17:16 -07:00
Yuval Tassa a4a6248a06 Move AsVector utility to fixture.h
PiperOrigin-RevId: 690577546
Change-Id: I2cebcffa1f2e3b0789f43e772e364c4762719ab3
2024-10-28 05:52:25 -07:00
Copybara-Service d95befaddd Merge pull request #2180 from pschmutz:schmutz/error_handling_when_loading_plugins
PiperOrigin-RevId: 690567811
Change-Id: I2d2c4e37e74ab4d97c0add5633feb766ef66dd08
2024-10-28 05:11:14 -07:00
Joss Moore ca45041049 MjSpecs.copy should return an MjSpec rather than a raw::MjSpec*
raw::MjSpec* is not a good python object.
PiperOrigin-RevId: 690564198
Change-Id: I3a5dd525a3a9acc67bb0e598dd508572dc4c687f
2024-10-28 04:55:38 -07:00
Yuval Tassa d8494fef3b Remove deprecated mjv_makeConnector function.
PiperOrigin-RevId: 690563333
Change-Id: Ice9c6b6cf41de8a55fa361477f9aee9181d50184
2024-10-28 04:51:47 -07:00
Taylor Howell 3c21abc0e5 Add ray intersection with ellipsoid to MJX.
PiperOrigin-RevId: 690557087
Change-Id: Icd2f0be1243574720baeac82b8bdd92e57c6a61c
2024-10-28 04:25:11 -07:00
Taylor Howell a36f2cccb6 Add nnz argument for size of allocated memory to mju_dense2sparse and check if this number is too small for number of non-zeros.
PiperOrigin-RevId: 690545825
Change-Id: I0e31cb907a1151cb2e4766d5f0cdfecb5629a2a6
2024-10-28 03:46:50 -07:00
Taylor Howell 1c424644dd Fix MJX touch sensor.
PiperOrigin-RevId: 690544118
Change-Id: Ic909c6f6ce0e31237cbe317fbbfbb1fd267bd462
2024-10-28 03:39:53 -07:00
Yuval Tassa 7dc8aef807 Remove the convexhull compiler option.
PiperOrigin-RevId: 690307675
Change-Id: I62d8213579ad07296ca96de004d39ae012174aa4
2024-10-27 04:31:10 -07:00
Yuval Tassa 61cb552f8a Refactor PBR texture layers from separate sub-elements to a single layer sub-element.
Add new element to PyMJCF schema.

PiperOrigin-RevId: 690115286
Change-Id: I7bb3f184cb321ca96037b2ca0ee160efef37469d
2024-10-26 07:41:38 -07:00
Philipp Schmutz 7cf457286d Print error instead of failing silently when loading plugins
Previously the return value of dlopen was ignored, meaning a failed load of a shared library would stay unnoticed
2024-10-26 16:22:47 +02:00
Baruch Tabanpour 078c7bb42e internal change
PiperOrigin-RevId: 689931872
Change-Id: Icc7b261b6d98e181a6bf0845f44a050af2833db2
2024-10-25 15:29:39 -07:00
Silvio 1201db8050 Do not test python bindings in python/dist directory
This will permit to early catch tests that rely on files not
installed in the wheel, i.e. catch if pytest --pyargs mujoco fails in a vanilla environment.
2024-10-25 13:24:21 +02:00
Silvio Traversaro 455116466b Fix running tests out of a installed mujoco python package 2024-10-25 13:24:21 +02:00
Baruch Tabanpour f24de91cc9 Use eq_active in MJX. Fixes #2173.
PiperOrigin-RevId: 689549368
Change-Id: I14d9817c5ca5dfc2a735ab8bacfb11b75c9feadc
2024-10-24 16:08:14 -07:00
Baruch Tabanpour 2de430a61f Use newton by default in benchmark.
PiperOrigin-RevId: 689538944
Change-Id: I99b5588ae5980eee43fb33ac390122ce38000dd3
2024-10-24 15:35:01 -07:00
Alessio Quaglino bebec52869 Add find_all with string input.
PiperOrigin-RevId: 689487165
Change-Id: I48511aec1610b2112f9456e8f410d077c57c7a95
2024-10-24 13:01:49 -07:00
Yuval Tassa a3ea01e57e Remove deprecated mju_rotVecMat and mju_rotVecMatT functions.
PiperOrigin-RevId: 689405782
Change-Id: I0281376d5d6f5c31ea2603d61c03c7b94aaa6312
2024-10-24 09:15:23 -07:00
Alessio Quaglino 159f23e6b4 Remember compiler options during attach.
Note:
- Move compiler options into `mjsCompiler` struct.
- The compiler options from the attached model are not written by mj_SaveXML.
PiperOrigin-RevId: 689391440
Change-Id: I1d63c146a32f87c737b7a55b64a54b0ffe3aecc9
2024-10-24 08:31:15 -07:00
Kyle Bayes 1043633cc3 Remove arbitrary limit of a 1000 elements from certain attributes. Fixes #2166.
PiperOrigin-RevId: 689343609
Change-Id: I7cbf5007884433807c76c6c309cb4a858479d34d
2024-10-24 05:37:17 -07:00