Kyle Bayes
bdccbcc60a
Add multiccd fields to MJX and add simplex box-mesh model.
...
PiperOrigin-RevId: 813190617
Change-Id: Idc450da59d6420825077a642719525750f6551ec
2025-09-30 03:40:29 -07:00
Haroon Qureshi
70d03adc71
Store the status of the scene in the scene itself.
...
PiperOrigin-RevId: 813119377
Change-Id: Iebff9e7796ca9809ea22902522982bfd96eeba06
2025-09-30 00:06:00 -07:00
Haroon Qureshi
fc8979ed4a
Add test for checking exhausted geoms.
...
PiperOrigin-RevId: 812776271
Change-Id: Ic9456ab201610a69237182ac22147e3d3e240308
2025-09-29 07:18:12 -07:00
Sam Haves
c31f11824e
Add hfields to cache_hits benchmark.
...
PiperOrigin-RevId: 812759213
Change-Id: I155c2db58811dd1efa56a6361fd39aac669b63e7
2025-09-29 06:22:24 -07:00
Haroon Qureshi
b17f4b26dc
Add more scene golden tests.
...
PiperOrigin-RevId: 812708484
Change-Id: Icba94b128c89097703611ac4f6974f6d1cb19b4d
2025-09-29 03:19:48 -07:00
Yuval Tassa
fe8384b6c5
Visualize joint and tendon limits by re-coloring.
...
PiperOrigin-RevId: 811590674
Change-Id: I5b65f2294a4bcda3c321fb51ebf29501bd0d416d
2025-09-25 19:02:26 -07:00
Sam Haves
922aebbeed
Provide explicit argument for asset cache ID.
...
This will allow assets to cache compiled results with different parameters. For example, we could cache both an RGB version of a texture and a Mono version.
PiperOrigin-RevId: 811341377
Change-Id: Ifd6a4ff88661a2b38be47c02d6a666de2c202885
2025-09-25 07:24:12 -07:00
Sam Haves
e3377ceca3
Add cache hit benchmark to parsing benchmarks.
...
PiperOrigin-RevId: 810495543
Change-Id: I8c10806a091f870266f2c1194b39159c1f3105e0
2025-09-23 10:40:12 -07:00
Yuval Tassa
d71d42a374
Add private function mju_isZeroByte to check for byte-wise zero.
...
PiperOrigin-RevId: 810456282
Change-Id: I877d0f9225e7a783ed7ff12ce54f4ed0a7889793
2025-09-23 08:49:43 -07:00
Taylor Howell
d616f11508
Remove references to deprecated nconmax and njmax.
...
PiperOrigin-RevId: 809987304
Change-Id: I4109497fe108234dd77011d61eb3ef833e6ae111
2025-09-22 06:28:41 -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
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
Alessio Quaglino
5bbda2186d
Make the Octree interpolation continuous.
...
This is done by detecting the hanging nodes and compute the function at those location by interpolating the corresponding coarse vertices.
PiperOrigin-RevId: 807700228
Change-Id: I27dcb85361ca445c2099dd07b280cae5c92d3131
2025-09-16 08:15:26 -07:00
Kyle Bayes
ac4874226c
Support NULL in dir parameter in mj_addFileVFS.
...
Fixes #2839 .
PiperOrigin-RevId: 807208005
Change-Id: I8def3b1e388dc19fa2fa8a92d53abef30dee5b88
2025-09-15 06:00:13 -07:00
Alessio Quaglino
4fc69fa64d
Ensure that the Octree is balanced.
...
This means that two adjacent nodes can only have at most one level of refinement difference.
Note: This is a small breaking change for mjWarp since the order of the children was flipped.
PiperOrigin-RevId: 806299445
Change-Id: Ia326a31c7a8162ae02d70c868d87779198e805be
2025-09-12 08:34:15 -07:00
Yuval Tassa
f61f89bf54
Update use of absl::MutexLock in fixture.cc
...
PiperOrigin-RevId: 806203271
Change-Id: Ia058d117aedb12c1014912bf5ff192fcc9782964
2025-09-12 02:46:22 -07:00
Alessio Quaglino
9d5063799f
Resize keyframes also at the start of compilation.
...
Previously, it was assumed that attaching was the last operation performed on the mjSpec, so keyframes resulted in the incorrect size. In order to prevent information loss, we now only allow the resize function to expand the keyframe array, since attach should never remove a degree of freedom.
PiperOrigin-RevId: 804917828
Change-Id: Icfacd207ced1c6aac600d514f8d9065ceff2d347
2025-09-09 08:16:32 -07:00
Kyle Bayes
ea660f4c13
Expose minimal asset cache API.
...
PiperOrigin-RevId: 803126923
Change-Id: Iabf63802572f7cb86864b5ece85f44b3f15a4ec0
2025-09-04 12:18:36 -07:00
Yuval Tassa
b9900db00e
Extract memory allocation functions and core utilities
...
PiperOrigin-RevId: 801745499
Change-Id: Iaf05c3430769d3115743d8ab020d13148cb2eb59
2025-09-01 03:38:25 -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
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
Taylor Howell
1ac51cf2a5
Update comment in engine_forward_test.cc.
...
PiperOrigin-RevId: 799550233
Change-Id: I75840bdcb94d4b10962f1fff5a225a6fe5bc0672
2025-08-26 07:12:51 -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
Taylor Howell
4cf5c37211
Fix spelling in engine_forward_test.cc.
...
PiperOrigin-RevId: 799147728
Change-Id: If5e734ba31961d459281f7cb5edea7c370c1f2fd
2025-08-25 09:15:48 -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
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
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
Yuval Tassa
f71053243e
Replace std::array with C-style array for error buffer in GJK tests.
...
PiperOrigin-RevId: 797730796
Change-Id: I228c58e163c8c6d1426a88c1a6f447c4a56a34e6
2025-08-21 06:03:53 -07:00
Yuval Tassa
174a50442d
Allow transposing of sparse sub-matrices whose first row is > 0
...
PiperOrigin-RevId: 797728559
Change-Id: I3c825118dae198333d357d2e4f248d00b0f5d8ce
2025-08-21 05:56:33 -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
972ffd7b90
Improve mj_fullM documentation, add clarifying test.
...
PiperOrigin-RevId: 796134559
Change-Id: I85ab3680d3545ccf83d0d3af8a7c21cb36e96d4e
2025-08-17 11:02:14 -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
5a24eb2d34
Add error reporting to model loading in engine tests, where missing
...
PiperOrigin-RevId: 795844607
Change-Id: I4163c53c05796c2e3036af28a98f58c15bb1c99c
2025-08-16 08:11:49 -07:00
Yuval Tassa
bbb70d98a4
Add utility functions for mapping between sparse matrix patterns.
...
PiperOrigin-RevId: 795543910
Change-Id: I92be3afc3cd90020027737fffdba18c45e25f825
2025-08-15 11:22:35 -07:00
Yuval Tassa
b566ef2883
Ignore geoms with tiny mass in inertiafromgeom computation. Fixes #2754
...
PiperOrigin-RevId: 795475978
Change-Id: I02b5db9e2ac7ec556cb0a0ec6dbe4214ba9128d7
2025-08-15 07:57:02 -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
f077fd00a9
Compute sparse matrix sizes before making the mjModel in the compiler.
...
PiperOrigin-RevId: 794998215
Change-Id: Ib7d0a2479b18cc8b3168c0656d3c4be0eff43a0f
2025-08-14 05:51:17 -07:00
Alessio Quaglino
840108cf7c
Refactor octree in preparation for continuous interpolation.
...
PiperOrigin-RevId: 792092644
Change-Id: I096ca0989210a00ae0b4556498d96212755d23c7
2025-08-07 04:06:03 -07:00
Yuval Tassa
fde479736e
Finalize built-in mesh example model and documentation
...
PiperOrigin-RevId: 791227350
Change-Id: Ibdcdb8a4ee5b3f78c9ae93e1db2a9a2f9d55a80c
2025-08-05 08:32:51 -07:00
Yuval Tassa
705ec6d7fb
Adds built-in superellipsoid mesh.
...
PiperOrigin-RevId: 791196831
Change-Id: I1d864f6e620870f016377a4d9e2e26d1a23fd77e
2025-08-05 07:02:52 -07:00
Yuval Tassa
a5d4d1000e
Add built-in supertoroid mesh.
...
PiperOrigin-RevId: 791180080
Change-Id: I3a70f50ff4a52a1bd4b88fc30334a574895145b4
2025-08-05 06:06:43 -07:00
Yuval Tassa
996f0040fd
Add built-in sphere mesh.
...
PiperOrigin-RevId: 791162850
Change-Id: I573a414727e79f1a495e0f2282b2faff48ab3443
2025-08-05 05:05:05 -07:00
Yuval Tassa
5220767457
Add built-in hemisphere mesh.
...
PiperOrigin-RevId: 791148546
Change-Id: Ic9ff0c9b0f5fa4fd22d5f7f848f150cf74d378ba
2025-08-05 04:16:24 -07:00
Yuval Tassa
a5a6379f83
Add built-in cone mesh type.
...
Also delete `prism` type since it is subsumed by cone.
PiperOrigin-RevId: 790992343
Change-Id: I7a9c6f2a4377489173acd64b23086c748d2cee8e
2025-08-04 19:35:32 -07:00
Yuval Tassa
7b9f5bdae7
Fix bug in raycast to hfield. Fixes #2765
...
PiperOrigin-RevId: 790784429
Change-Id: Ib2319722796ed510afed960bbf5cebc86cf185a9
2025-08-04 09:40:59 -07:00
Kyle Bayes
f2a2afeb03
Fix address bug in meshEdgeNormals in doing edge multiccd with meshes.
...
PiperOrigin-RevId: 790731924
Change-Id: Ia475b1f01731518166f229c25ebffd1fbf7c7939
2025-08-04 07:03:14 -07:00
Alessio Quaglino
7baaa39846
Add SDF geom to test/testdata/model.xml.
...
Also, when a mesh has both an octree and a bvh, render only the octree.
PiperOrigin-RevId: 790680831
Change-Id: Iaf3896933f6728af4db1eaa83ff5b06558ab0d19
2025-08-04 03:53:51 -07:00