Alessio Quaglino
231d9632cd
Avoid duplicated code in mjCModel by adding ResetTreeLists().
...
PiperOrigin-RevId: 653575505
Change-Id: I61ee1462deae2a371cf6f36ca1cf3dbbd88d174c
2024-07-18 05:08:18 -07:00
Alessio Quaglino
67922f41b9
Exclude nbuffer from CompareModel.
...
This will give more informative errors when the test fails.
PiperOrigin-RevId: 653571444
Change-Id: I78b0a2bfc7794dae81607a9dbbdb91439af48b0c
2024-07-18 04:50:25 -07:00
Alessio Quaglino
dd9dd295ba
Prevent uninitialized memory during a copy of joints and actuators.
...
PiperOrigin-RevId: 653340718
Change-Id: Icc5ada05abd590504c157311a309f9b8493feac9
2024-07-17 13:22:11 -07:00
Saran Tunyasuvunakool
dbe18f5740
Add additional MuJoCo fields to MJX structs.
...
PiperOrigin-RevId: 653270676
Change-Id: I5f7a62d3bd542abc0d618e63d2426663e7d6406f
2024-07-17 10:04:52 -07:00
Yuval Tassa
dd25973481
Remove unnecessary def_map copying.
...
Introduced in 5b080bacc4
Made obsolete by 27b9ddda5b
[Context](https://github.com/google-deepmind/mujoco/commit/27b9ddda5bdd12345abdfbc0a6efce121d40cd6c#r144157607 )
PiperOrigin-RevId: 653254345
Change-Id: Ie944d2c3924d3eb91f7743c0d0c8413cd2cd79cc
2024-07-17 09:10:31 -07:00
Alessio Quaglino
2664cc1391
Allow passing a null pointer in mj_recompile.
...
Fixes #1819 .
PiperOrigin-RevId: 653242587
Change-Id: I36dbd6ed54abdf21abeb62cf41ee88f159008d01
2024-07-17 08:29:01 -07:00
Yuval Tassa
a2fd34caee
Modify test/testdata/model.xml so the wrapping is stable. Fixes #1795
...
PiperOrigin-RevId: 653202132
Change-Id: I90ccff840a0b98d44dbee8888cb37ff5195caaa6
2024-07-17 05:46:04 -07:00
Copybara-Service
f20edda26e
Merge pull request #1759 from Balint-H:fix/unity-multi-dof-axes
...
PiperOrigin-RevId: 653173396
Change-Id: Iedd13dc23ccdd370ba0237bbe278d3bde755bb84
2024-07-17 03:54:22 -07:00
Kyle Bayes
2cf352c2e6
Add VFS handling logic to mj_openResource.
...
PiperOrigin-RevId: 653124909
Change-Id: I4d031eb0bfb0070f8493753d2aeaac60ac283b85
2024-07-17 00:41:18 -07:00
Saran Tunyasuvunakool
7f46e936f6
Update setuptools to version 70.3.0.
...
Addresses CVE-2024-6345.
PiperOrigin-RevId: 652857861
Change-Id: Iea5f6cb58b825b226ba61d259775ddbee05acd6d
2024-07-16 08:38:56 -07:00
Alessio Quaglino
8e827d0d50
Add missing changelog item.
...
PiperOrigin-RevId: 652830666
Change-Id: Iba41871a4e92081dde6428f12abe93c58ea9b02a
2024-07-16 07:21:37 -07:00
Google DeepMind
c588023729
Mujoco changelog update for 3.2.0
...
PiperOrigin-RevId: 652594852
Change-Id: I69be392fb212263ac55b3cc25fd454c39cbd4553
2024-07-15 14:11:44 -07:00
Gabe Oppenheimer
22ce22ac8a
Update the MuJoCo version number ahead of the 3.2.0 release.
...
PiperOrigin-RevId: 652578624
Change-Id: I8ed6f66ff1247ff7421e3ed0521cf15e1c0b6c79
2024-07-15 13:16:06 -07:00
Gabe Oppenheimer
cb4cb7d09b
Update version hashes in MuJoCo CMake files ahead of the 3.2.0 release.
...
PiperOrigin-RevId: 652555501
Change-Id: I4279ea670e837414adbfc69f6e1e96a4c635f17d
2024-07-15 12:00:25 -07:00
Yuval Tassa
39b22ebc26
Remove dangling section header from function docs.
...
PiperOrigin-RevId: 652456322
Change-Id: Ib1d7aa387b7ba8957c93f0227f530aa0b37f2668
2024-07-15 06:11:25 -07:00
Alessio Quaglino
9a7c1df130
Set unused inherited opaque pointers to nullptr.
...
PiperOrigin-RevId: 652444674
Change-Id: I3e82b1e1ae029f2f01ddcdf5ce2ccb45624e7062
2024-07-15 05:15:45 -07:00
Alessio Quaglino
cf61d88e41
Move pointer assignments from CopyFromSpec() to PointToLocal().
...
Note that these internal pointers are inherited from the public structs and are unused internally.
PiperOrigin-RevId: 652414750
Change-Id: I5e42503bce8e9019291ec0a1f8c4278438474e9b
2024-07-15 02:47:32 -07:00
Yuval Tassa
3d28a1d8c7
Fix formatting in documentation code samples.
...
PiperOrigin-RevId: 652237833
Change-Id: Ia90fadccba39881748a7ead15db3285e00feb08f
2024-07-14 07:08:18 -07:00
Yuval Tassa
22a10fd2ff
Minor documentation improvements.
...
PiperOrigin-RevId: 652064694
Change-Id: I13009410fbd3ce5ac90788f61e32354474a8e19e
2024-07-13 08:36:47 -07:00
Yuval Tassa
e13ddfa2ab
Improve compiler-related documentation.
...
PiperOrigin-RevId: 651827545
Change-Id: I85c12dc12967e49087c342445dbfa049c5cdbcdf
2024-07-12 11:05:16 -07:00
Alessio Quaglino
5d51b4cd5f
Check that element is a nullptr before casting.
...
The bug was caused by the fact that the `mjs_as*` functions would return a pointer to a `mjC*` object, even if the input `mjsElement` pointer was null. This would cause a segfault.
PiperOrigin-RevId: 651802736
Change-Id: Ibec00d269a4befadff8a68e0513fd381c7e38a2a
2024-07-12 09:46:16 -07:00
Yuval Tassa
e76f3ce1e3
Rename model to spec in xml_native_reader.cc.
...
PiperOrigin-RevId: 651780148
Change-Id: I476c79af4b47bf763f1f3cb166d3f0897554a207
2024-07-12 08:22:54 -07:00
Richard Levasseur
a0df72f43f
Raise memory limit so test passes with dynamic linking
...
The memory leak test fails with `RAW: mmap error: 12` when dynamic
linking is enabled. This is probabably because
of the additional memory overhead dynamic linking incurs. Raising it slightly
appears to satisfy the test.
Tested:
TAP --sample ran all affected tests and none failed
http://test/OCL:650692833:BASE:650634362:1720548680801:c55c6a68
PiperOrigin-RevId: 651750900
Change-Id: Ia63d153b326ff7451391789e2d7cae50a62be723
2024-07-12 06:10:37 -07:00
Nimrod Gileadi
84108589c4
Move the map lookup outside of the mesh processing loop. Change to unordered_map.
...
PiperOrigin-RevId: 651745837
Change-Id: Ibfcbe4b8cefa53a3dbaa99c4ca68442e2e10bc5d
2024-07-12 05:45:25 -07:00
Alessio Quaglino
6e64dd10e8
Fix bug in RemoveFromList.
...
The function was interpreting that the elements that were expected to be detached contained useful user errors, and therefore it was not detaching them. Also, the function tried to compare the namespace between two models, but the namespace is already fused in the references at detach time.
PiperOrigin-RevId: 651738364
Change-Id: Ifdaa9bd5b658bfd18b544b7138a5c2c56b66e936
2024-07-12 05:08:00 -07:00
Yuval Tassa
f1aa52aa9b
Never use more threads than meshes for multi-threaded compile.
...
PiperOrigin-RevId: 651728817
Change-Id: Ib607d528c25a10e2cdb8c2b0b0da2189683d2691
2024-07-12 04:18:35 -07:00
Kyle Bayes
9c9faa02d5
Add FilePath utility class for handling resource / file paths in MuJoCo user code.
...
PiperOrigin-RevId: 651716008
Change-Id: I250b8cec32aab538f5862f8a05f42d1fae698307
2024-07-12 03:21:21 -07:00
Alessio Quaglino
2f46dec669
Fix bug in frame saving. Fixes #1802
...
PiperOrigin-RevId: 651696068
Change-Id: Ie1e2e1de4e83c42f2b5ebcc3afd0540b9afe7bbd
2024-07-12 01:56:38 -07:00
Yuval Tassa
3d1d1d0718
Multithreaded mesh compilation.
...
PiperOrigin-RevId: 651358120
Change-Id: Id6272aac84ec6ac1b709d2f4a44b7593307bd158
2024-07-11 04:21:49 -07:00
Nimrod Gileadi
e7301edd20
Copy arena contents in mj_copyData.
...
Fixes #1710 .
PiperOrigin-RevId: 651351384
Change-Id: I56e3204b30bb18f48278117e85e90464177da973
2024-07-11 03:54:44 -07:00
Kyle Bayes
f9ab89b205
Refactor user cache to just support void pointers so user objects can be cached whole.
...
PiperOrigin-RevId: 651307384
Change-Id: I92c058a900727070235d00b6d2165c29fd12e7b0
2024-07-11 01:01:27 -07:00
Erik Frey
c145b79f6e
Using typing instead of collections.abc. Fixes #1763
...
PiperOrigin-RevId: 651186508
Change-Id: I844ec884b802837554b0b60f2414d6bc37f2da14
2024-07-10 16:21:00 -07:00
Alessio Quaglino
27b9ddda5b
Add attach tag to MJCF.
...
PiperOrigin-RevId: 651117953
Change-Id: I57b0e53ed44607d479b3785d908e0837c0804cf3
2024-07-10 12:41:43 -07:00
Copybara-Service
5b080bacc4
Merge pull request #1799 from JewelryForge:main
...
PiperOrigin-RevId: 651069985
Change-Id: I758e27e2f4bf19bba38d9e1189a41accae40d028
2024-07-10 10:29:22 -07:00
Copybara-Service
60afda949c
Merge pull request #1714 from abhihjoshi:tendons
...
PiperOrigin-RevId: 651048034
Change-Id: If5b7cb55ff0007c3c6f932e62f068d1168778a33
2024-07-10 09:26:54 -07:00
Alessio Quaglino
7f9f8b5429
Catch errors in attach during replicate.
...
PiperOrigin-RevId: 651041336
Change-Id: I59986e157b4e22c74f8b8493899cdd4a3d5df839
2024-07-10 09:04:37 -07:00
Chengrui Zhu
1a47860577
Add a xml test file whose mesh has a default class. user_api_test will have a segmentation fault before #1799 .
2024-07-10 23:10:22 +08:00
Yuval Tassa
b483ce608e
Use std::thread in compiler on all platforms.
...
PiperOrigin-RevId: 651005412
Change-Id: I8dfb142dc2d87ab0af79583f2df168c105b50138
2024-07-10 07:10:45 -07:00
Yuval Tassa
7e97caaafd
Add a test for lengthrange computation, with and without threading.
...
PiperOrigin-RevId: 650997405
Change-Id: I45c3725dacb6ccf17977953a9ffed717c927b786
2024-07-10 06:39:18 -07:00
Yuval Tassa
17f6b12930
Report model load time in simulate if it takes more than 0.5 seconds.
...
PiperOrigin-RevId: 650933302
Change-Id: Id33aa9935a6b4f493dfa9a913f8a424b3f387fa1
2024-07-10 02:56:47 -07:00
Chengrui Zhu
5bd13b4982
Copy all keys of def_map when copying a mjCModel. Fixes #1798
2024-07-10 16:40:36 +08:00
Alessio Quaglino
462cfa5ceb
Attach the tree of defaults recursively and with namespacing.
...
PiperOrigin-RevId: 650664018
Change-Id: I17751a02a406dcb2a2ca218c316b5eb0370071b8
2024-07-09 09:54:09 -07:00
Yuval Tassa
d0f86bc2c5
Correct API documentation of mjvSceneState. Fixes #1793
...
PiperOrigin-RevId: 650662466
Change-Id: Ie887a63ca9136bbc688db6a79036701b9516c1d6
2024-07-09 09:49:07 -07:00
Nimrod Gileadi
393895bb29
Explicitly specify actdim on PID plugin actuators, to allow them to be used with keyframes.
...
Support actdim attribute on plugin actuators.
Remove the actuator_actdim callback. This callback leads to crashes when loading keyframes for models that have a stateful plugin.
PiperOrigin-RevId: 650649505
Change-Id: I40d1994d02ae4e20ce631b2702a984766cf2628e
2024-07-09 09:08:48 -07:00
Alessio Quaglino
e0d33eb1d0
Remove mjCBase::def and use mjCBase::classname instead.
...
PiperOrigin-RevId: 650629741
Change-Id: I10a9955b99e4a5ff0b5a742e22635ccad1455f1a
2024-07-09 08:02:32 -07:00
Nimrod Gileadi
c5f958bdff
When reporting compilation errors, include warning strings.
...
This allows plugins to call mju_warning, and have the string propagate to users.
PiperOrigin-RevId: 650621601
Change-Id: I608e7a3a1ad126ab8da2ff0634fa708458fb9ccc
2024-07-09 07:33:11 -07:00
Kyle Bayes
450e7ff777
Move user_resource.c to C++.
...
PiperOrigin-RevId: 650592110
Change-Id: I5e043970e3aa722e3961e478334cad4f3f1c191e
2024-07-09 05:33:38 -07:00
Yuval Tassa
70f86617f8
Fix typos in documentation.
...
PiperOrigin-RevId: 650191926
Change-Id: I84d098782c6e4585a31e1de6bb1a7af3b3698f94
2024-07-08 03:49:12 -07:00
Alessio Quaglino
f57dc90669
Refactor Default class to use pointers instead of indices.
...
This in order to make it easier to append the default tree to another tree.
PiperOrigin-RevId: 649812975
Change-Id: I2915ac7e37957e45eadc24d6caaf7beea236bf29
2024-07-06 03:51:30 -07:00
Yuval Tassa
9d0812911c
Add a test for type attribute.
...
PiperOrigin-RevId: 649635359
Change-Id: Ibe5d9fcb5f14371e5f154d645b838a9d012331d5
2024-07-05 06:16:46 -07:00