Kyle Bayes
fbe0990b17
Fix bugs in nativeccd with collisions with margin.
...
PiperOrigin-RevId: 730903745
Change-Id: I45ddb674f32cb1f28ff37c587ea953ec595241b3
2025-02-25 08:51:21 -08:00
Kyle Bayes
024616345d
Support edge contacts with multiccd in nativeccd.
...
PiperOrigin-RevId: 730489114
Change-Id: I02847d84bbc15a1526391d5e1b7109ab83ea4a59
2025-02-24 09:48:43 -08:00
Kyle Bayes
a6f1dc5e9e
Match faceset type to intersect res param type in nativeccd.
...
PiperOrigin-RevId: 730470904
Change-Id: Id7b3712c10d5ec871e2d272036e4e87c1e8620e0
2025-02-24 08:58:10 -08:00
Kyle Bayes
ae1c3b7ec0
Support multi-contact with meshes in nativeccd. Contacts are pruned to up to 4 per geom.
...
PiperOrigin-RevId: 730457036
Change-Id: Ib2368f3a7def4fdb94673620df3603e372c35745
2025-02-24 08:14:04 -08:00
Yuval Tassa
fe9fcae5dc
Clean up mj_tendon.
...
PiperOrigin-RevId: 729042293
Change-Id: Id0d8483b71b9dbb99e19a67323034f3762e26346
2025-02-20 03:44:39 -08:00
Kyle Bayes
7f3bb062c3
Add fields in mjModel for supporting mesh multicontact in nativeccd.
...
PiperOrigin-RevId: 728659204
Change-Id: I7f8a11b082640284ea009d8693f228078680b953
2025-02-19 07:12:26 -08:00
Yuval Tassa
b516edae1b
Rename inertia factorization routines:
...
```
mj_factorI -> mj_factorI_legacy
mj_solveLD -> mj_solveLD_legacy
mj_factorIs -> mj_factorI
mj_solveLDs -> mj_solveLD
```
PiperOrigin-RevId: 728246367
Change-Id: I3bc7804cb96faac2ae5419ba9abfc3c1648ed4c6
2025-02-18 09:42:05 -08:00
Yuval Tassa
fb07e0d1f7
Convert qLD to CSR format.
...
PiperOrigin-RevId: 728196818
Change-Id: I31bdf32e251293284426ed345019f27fd051a0e1
2025-02-18 07:14:45 -08:00
Kyle Bayes
442b968e22
Improve box-box multicontact with nativeccd.
...
PiperOrigin-RevId: 728136635
Change-Id: I2343110e5c87b6621d5750c7ad42f0e75081d737
2025-02-18 03:41:26 -08:00
Yuval Tassa
e39a5df06a
mju_compressSparse(): add option to compress away small elements.
...
PiperOrigin-RevId: 726010576
Change-Id: Ib6458037a5cf9a9d82abb364b7dda7aab2f36807
2025-02-12 05:08:20 -08:00
Yuval Tassa
faed1a1137
Clean up mj_jacSparse.
...
PiperOrigin-RevId: 725994792
Change-Id: I928a6312a6910231bfeb96ef7a3f29f1d128565c
2025-02-12 04:06:00 -08:00
Kyle Bayes
e3b9538d92
Add saving the indices of mesh vertices with the support points in nativeccd.
...
PiperOrigin-RevId: 725660975
Change-Id: I036882a5bde5d009bfa6e66b6a10f6cfb1a78292
2025-02-11 09:28:49 -08:00
Yuval Tassa
5ee0654830
Roll back recent change to mjData.qLD until some issues are resolved.
...
PiperOrigin-RevId: 724389161
Change-Id: I1b30ab0950ab5c5e611b1c6fc3bf3f42f964939c
2025-02-07 10:21:42 -08:00
Yuval Tassa
c27d3758c2
Convert qLD to CSR format.
...
PiperOrigin-RevId: 723955038
Change-Id: I30c3dc7f59739e89ae5fff8841432bc74717ec1b
2025-02-06 08:59:35 -08:00
Alessio Quaglino
0d4bc1de00
Do not use flexedge_length if trilinear interpolation is used.
...
PiperOrigin-RevId: 723452451
Change-Id: I5a67fb74c13e80ae6d390694dd0c9f8c5e4d5213
2025-02-05 04:09:32 -08:00
Kyle Bayes
3235f69afc
Make polytope2 and polytope4 more numerically robust in nativeccd.
...
PiperOrigin-RevId: 723412555
Change-Id: Id262a3c19bcd30b74b1495591bdc95f951bfca50
2025-02-05 01:40:41 -08:00
Alessio Quaglino
7cdf180641
Introduce trilinear flex parametrization.
...
These flexes use only 24 DOFs (3 per vertex of the bounding box), while colliding with the full high resolution mesh.
On an 8x8x8 cube, the performance using DOFs at all vertices is
```
Simulation time : 18.74 s
Steps per second : 533
Realtime factor : 0.53 x
Time per step : 1874.4 µs
Contacts per step : 114.88
Constraints per step : 3322.51
Degrees of freedom : 1536
```
With the new implementation, it is the following:
```
Simulation time : 1.82 s
Steps per second : 5507
Realtime factor : 5.51 x
Time per step : 181.6 µs
Contacts per step : 38.84
Constraints per step : 155.36
Degrees of freedom : 24
```
PiperOrigin-RevId: 721008829
Change-Id: I833df027527db578d86667cc4b24295bcf6f7d22
2025-01-29 09:38:22 -08:00
Yuval Tassa
6a23841aad
manually inline mju_combineSparse
...
PiperOrigin-RevId: 720326669
Change-Id: I03727291f133e3d481e73ad88735e54af8f62f1f
2025-01-27 15:22:18 -08:00
Yuval Tassa
9605990648
Replace custom sort of sparse fixed tendons with mju_combineSparse.
...
PiperOrigin-RevId: 720219887
Change-Id: I0491b3cb8987c119c3864fc0b5c38ca303d8f7f0
2025-01-27 10:24:58 -08:00
Yuval Tassa
d86900aac1
Speed up mju_cholUpdateSparse by not checking for varying sparsity pattern where it is guaranteed to not vary.
...
PiperOrigin-RevId: 720126576
Change-Id: I3a43bdd0259656fab462b1cd155cb422982e970d
2025-01-27 05:07:28 -08:00
Kyle Bayes
aa505a7872
Add support for NativeCCD multiple contacts for box-box collision.
...
PiperOrigin-RevId: 718352304
Change-Id: Icaa827e716a2d7aa7c0c644e0ccd2913b476e6fb
2025-01-22 06:02:58 -08:00
Yuval Tassa
67dd4827a6
Improve printing of inertia-like matrices, allow mj_printData to take const mjData*
...
PiperOrigin-RevId: 718176884
Change-Id: I057dabe6973e19db86e9ff9ce4430c6d17dfce2b
2025-01-21 19:59:45 -08:00
Kyle Bayes
bd1bbfe401
Fix bug where EPA horizon returns zero edges due to numerical inaccuracies in float32.
...
PiperOrigin-RevId: 717825833
Change-Id: I9fa440816765d4c3eaa0c6c26ec0bd90c774fa01
2025-01-21 02:50:53 -08:00
Yuval Tassa
2624d524ba
Switch mj_solveM_island to use CSR representation
...
PiperOrigin-RevId: 717684720
Change-Id: I7d74a5d4aef4aa5b0c0acddf88c5b8591d63e88d
2025-01-20 18:36:04 -08:00
Yuval Tassa
a5ab7a9515
Switch mj_solveM2 to use CSR representation.
...
PiperOrigin-RevId: 717639495
Change-Id: I59eee0f23606481480ec5acb8a3bba2c14b2ea2f
2025-01-20 15:16:26 -08:00
Kyle Bayes
600f4acb52
Change GJK and EPA return values.
...
PiperOrigin-RevId: 717549079
Change-Id: I42df5660bcc8336e2e9c8fce71385cbb06104848
2025-01-20 08:59:37 -08:00
Yuval Tassa
5c4c79cd6a
Refactor LD back-substitution (CSR version).
...
PiperOrigin-RevId: 717403904
Change-Id: Idcd5e71f03a960203c22cb737d399fac5a0ba59c
2025-01-19 22:47:25 -08:00
Yuval Tassa
240a7afdee
Add sensors for potential and kinetic energy.
...
PiperOrigin-RevId: 716775375
Change-Id: Ic8ab7f1a51df970ab551dabe7c797cde13cd97fd
2025-01-17 13:10:12 -08:00
Yuval Tassa
893a993bf6
Fix typos.
...
PiperOrigin-RevId: 716211176
Change-Id: Ibadfe13db89ed9047832b977e918faa3c5c6d9f1
2025-01-16 06:28:54 -08:00
Kyle Bayes
4da2ddce29
Only correct box-box collisions with the mjc_BoxBox function.
...
PiperOrigin-RevId: 716209565
Change-Id: I3419ce82f9934606bed80acd8372284fc7ac7ac8
2025-01-16 06:22:20 -08:00
Gabe Oppenheimer
6436055c6c
Update the version number to 3.2.8 following the 3.2.7 release.
...
PiperOrigin-RevId: 715870970
Change-Id: I9fc9a09d959043f3029faa7296a717ea56f75c89
2025-01-15 11:13:27 -08:00
Yuval Tassa
d4ca66a47b
Allocate dual-solver memory inside mj_projectConstraint, no more than required.
...
PiperOrigin-RevId: 714093658
Change-Id: Id7e710c5dffd24871019a72a7bf2aa6eb3f7a36e
2025-01-10 10:19:13 -08:00
Yuval Tassa
2409a6e537
Add mjData.nA the number of non-zeros in the constraint inverse inertia matrix.
...
PiperOrigin-RevId: 714076988
Change-Id: I4c323a6e81dfb23f7972b662719bbcb688bacf4a
2025-01-10 09:23:55 -08:00
Yuval Tassa
ca6162e6d0
Refactor mj_projectConstraint to use CSR representation, don't allocate quadratic memory inside the function.
...
PiperOrigin-RevId: 714062168
Change-Id: Ib6ddd0e751fabcded20911e3ced59672be0da8b5
2025-01-10 08:32:05 -08:00
Yuxuan Jiang
5fa6b43539
Fix contact frame inconsistency in visualization with mjContact.frame
2025-01-10 20:45:46 +08:00
Yuval Tassa
00010f5848
Compute diagonal indices in mj_sqrMatTDSparse
...
PiperOrigin-RevId: 713714087
Change-Id: Icc8eae74e6e47ba1d12a6e9aa0d774ab006cfe38
2025-01-09 10:17:31 -08:00
Kyle Bayes
daba00ca9d
Fix a box-box bad collision in NativeCCD.
...
PiperOrigin-RevId: 713683497
Change-Id: I0c4cfd55d00faa196d8759046c87ee4ef74f01ab
2025-01-09 08:35:50 -08:00
Saran Tunyasuvunakool
357ea024c0
Remove unconditional mj_markStack in mjv_addGeoms.
...
Prior to commit 3f855f32d9 , calling `mjv_updateScene` and `mjv_updateSceneFromState` on an "empty" `mjData` (one without a buffer but where all sizes are also zero) was a valid operation. The `mj_markStack` call requires free stack space, so a call to `mjv_addGeoms` on an empty `mjData` results in a stack overflow whenever `mjVIS_TENDON` is enabled.
Fixes #2305 .
PiperOrigin-RevId: 713418586
Change-Id: I99b5de23fe94ba9aa86eeef0700c891976c9aecc
2025-01-08 14:32:44 -08:00
Yuval Tassa
f912e8df16
Print sparsity structure of mjData.efc_AR
...
PiperOrigin-RevId: 713296073
Change-Id: Ifede6ea66dd1177f5e85c8498860decebaa65f06
2025-01-08 08:12:47 -08:00
Yuval Tassa
8a5f092081
Allow CSR back-substitution to handle multiple vectors.
...
PiperOrigin-RevId: 713229673
Change-Id: I7a5b43fe966cf9e482bd41e2eea6c30dd3ffa1d4
2025-01-08 03:32:16 -08:00
Yuval Tassa
4d82ab5762
Add function to merge chains of indices.
...
PiperOrigin-RevId: 712863690
Change-Id: I15652bec03dc9ce90e230788bd12b44b1a2b8217
2025-01-07 04:42:11 -08:00
Yuval Tassa
674d227050
Standardize names of sparse fill-in pre-counting functions
...
PiperOrigin-RevId: 712835830
Change-Id: I8e90dfa52af56ede917e1fd90b8d551898c244e5
2025-01-07 02:39:46 -08:00
Yuval Tassa
b5df2c10bf
Remove mjData.C_diag, no longer required as C is now lower triangular.
...
PiperOrigin-RevId: 712514204
Change-Id: I8293f65ebc09c6a8fed76b0e59d2e2a667e01a43
2025-01-06 06:58:19 -08:00
Yuval Tassa
ac11e5faa6
Add CSR implementation of mj_factorI
...
PiperOrigin-RevId: 712498431
Change-Id: I13b52e53482ed97da8788875d4d95e2beb5ca7c1
2025-01-06 05:48:14 -08:00
Yuval Tassa
7eb8231fda
Represent only the lower triangle in Newton solver's reduced dof-dof matrix.
...
PiperOrigin-RevId: 712488529
Change-Id: Iad91c72654376539791d7856765a0d0ac9088251
2025-01-06 04:58:55 -08:00
Yuval Tassa
daed8f46c8
Don't assume compressed input in mju_transposeSparse, allow NULL pointer for matrix values, to only transpose the structure.
...
PiperOrigin-RevId: 712472432
Change-Id: I6dd34583ab181f0c9677c55230cecdf0aed46f9e
2025-01-06 03:51:35 -08:00
Yuval Tassa
94230a8bee
Fix bad indent.
...
PiperOrigin-RevId: 712267512
Change-Id: I3463b0f53b808b726ff0fe5ea46ec8d30164eac4
2025-01-05 09:12:50 -08:00
Yuval Tassa
abe8ffdee7
Enable AVX for inlined mju_dotSparse.
...
PiperOrigin-RevId: 711858423
Change-Id: Id2d06a9e87085e9f810779fba4e8ed9c19a4cba9
2025-01-03 14:42:00 -08:00
Kyle Bayes
340c0d7c97
Fix a box-box bad collision in NativeCCD.
...
PiperOrigin-RevId: 711773153
Change-Id: I8a526ef5933be19d863e67f40edeb95b0b1249cd
2025-01-03 09:23:57 -08:00
Yuval Tassa
63e2836f63
Expose mj_printSparsity in engine_print.h.
...
This is useful for debugging sparse operations.
PiperOrigin-RevId: 711765082
Change-Id: I532a5218da0f921dd4b04730d0b12c5136e7ca65
2025-01-03 08:51:46 -08:00