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
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
Yuval Tassa
923f75fd23
Use only lower triangle in CSR back-substitution.
...
PiperOrigin-RevId: 711686157
Change-Id: I4fc98cdfb927e5608ce3a99ea34890ce556fcfd7
2025-01-03 02:33:59 -08:00
Yuval Tassa
6c880eb0fa
Clean up mju_sqrMatTDSparse
...
PiperOrigin-RevId: 711486739
Change-Id: I5f9145dcd8522a9cb372cbdf60611d7d05cb524e
2025-01-02 12:02:10 -08:00
Yuval Tassa
4510c6d290
Further speedup to CSR back-substitution using dof_simplenum.
...
PiperOrigin-RevId: 711440268
Change-Id: I81cd9a6a8b8ec78d08cfbc34f60a9216ea753833
2025-01-02 09:04:51 -08:00
Yuval Tassa
69c9ac074a
Remove mjData.qLDiagSqrtInv, add corresponding argument to mj_solveM2.
...
- `qLDiagSqrtInv` is only required for the dual solvers. It is now computed as-needed rather than unconditionally.
- `mj_solveM2` now requires a new input array `sqrtInvD` which contains the square root of the inverse diagonal D (formerly saved in `qLDiagSqrtInv`).
PiperOrigin-RevId: 710805133
Change-Id: I0622d6a8da3882916824e9c10bad9223c122c321
2024-12-30 15:24:36 -08:00
Yuval Tassa
ec322641b7
Fix bug in mj_mulM2.
...
PiperOrigin-RevId: 710756899
Change-Id: I30c0725859ba0f1a59750dc89eebb9eba84fa71b
2024-12-30 11:14:56 -08:00
Yuval Tassa
e42370c982
Avoid allocation and copying in implicit solver's addJTBJSparse
...
PiperOrigin-RevId: 710679558
Change-Id: Ie75fdcd1127ff619c2668f568ab6a8a11e079dda
2024-12-30 04:19:10 -08:00
Yuval Tassa
8cb253b6ca
Fix typos.
...
PiperOrigin-RevId: 710678815
Change-Id: Iab6f603f8f4d782ac7f34140add39e1f37625167
2024-12-30 04:15:29 -08:00
Yuval Tassa
0336114a88
Add restrict to output variable in mj_solveLDs.
...
PiperOrigin-RevId: 710358020
Change-Id: Ia63048161d7622f21954e98346b7ff4e37ecb342
2024-12-28 16:05:18 -08:00
Yuval Tassa
a8a9607712
Inline mju_dotSparse in engine_util_sparse.h
...
PiperOrigin-RevId: 709577108
Change-Id: I76547122b5780bec76a12384effcb66315f84e13
2024-12-25 08:09:42 -08:00
Yuval Tassa
3f855f32d9
Fix stack allocation leak in mjv_addGeoms()
...
PiperOrigin-RevId: 708356387
Change-Id: If3d227028ea8f809390911b578878d985d9d7b1a
2024-12-20 10:11:18 -08:00
Yuval Tassa
b26d6f0466
Disable tendon catenary visualization when tendon is actuated. Add note about catenary visualization.
...
PiperOrigin-RevId: 706161179
Change-Id: Ifaf571e039306309869078d1a0bcf9a69f1fe9de
2024-12-14 01:54:40 -08:00
Kyle Bayes
ec230fa4b6
Prune face linear map in EPA.
...
PiperOrigin-RevId: 705138358
Change-Id: I835ce7094d066b19ee39af48e0b83b51f7a0954e
2024-12-11 09:44:19 -08:00
Yuval Tassa
2691887500
Add engine-internal convenience macro for allocating typed arrays, improve error message.
...
PiperOrigin-RevId: 705126655
Change-Id: I2bd8fada6d33a919d2fb82297f93ac57958355a4
2024-12-11 09:04:44 -08:00
Kyle Bayes
a364308d5a
Use GJK to recover contact points for sphere and capsule geoms in nativeccd.
...
PiperOrigin-RevId: 704727907
Change-Id: Iff641b6a32637c48e9892dbaa60826617c54ed06
2024-12-10 08:53:27 -08:00
Yuval Tassa
1c4c7b012c
CSR implementation of mj_solveLD.
...
PiperOrigin-RevId: 704316200
Change-Id: Ibaff0284e40b3ebbe43bb489b6211ce739270e27
2024-12-09 09:34:17 -08:00
Yuval Tassa
537fc2ff45
Use diagonal index to speed up mju_solveLUSparse.
...
PiperOrigin-RevId: 704303282
Change-Id: I72c3fbcd31a5564fc792b73efe9d12a151b4d60f
2024-12-09 08:53:25 -08:00
Yuval Tassa
3a14ada308
Store index of diagonal element for C and D in mjData.
...
PiperOrigin-RevId: 704287869
Change-Id: I15d1faa0b5c3ff54721f692ec6329726456ec318
2024-12-09 08:01:30 -08:00
Yuval Tassa
0ba717a653
Print supernode values in mj_printData
...
PiperOrigin-RevId: 702677257
Change-Id: Icecc5dd8604fcadc02bba5fc69c9fd5fd4fbd825
2024-12-04 04:41:10 -08:00
Yuval Tassa
0e7d2ef6df
Fix bug in box-sphere collider. Fixes #2206
...
PiperOrigin-RevId: 702627603
Change-Id: Ie6015b7fa6f8507459325d692581b0f5f83aa159
2024-12-04 01:19:27 -08:00
Gabe Oppenheimer
c90a63a926
Update the version number to 3.2.7 following the 3.2.6 release.
...
PiperOrigin-RevId: 702103729
Change-Id: Id5581cc823a17360e7bb98ac0aa4342020c1aefa
2024-12-02 15:30:52 -08:00
Alessio Quaglino
300450f8b8
Add circle to flexcomp and remove rope and loop from composite.
...
Add pulley example to show a circle use case.
Switch on flex edge rendering by default (no effect when flex skin is rendered).
PiperOrigin-RevId: 700738379
Change-Id: I8469bbf194de01c8dab66c9a51c49879013df141
2024-11-27 10:14:25 -08:00
Alessio Quaglino
203602b01f
Move computation of flex_vert0 to user_mesh.cc.
...
This removes the dependency of flex_vert0 from mj_flex and mjData.
PiperOrigin-RevId: 700382297
Change-Id: I0b6d023c2e1ba14fa92417b65bfc288f37c223ae
2024-11-26 10:17:16 -08:00
Alessio Quaglino
7e46e21ef3
Add mju_mat2Rot.
...
This function extracts the 3D rotation from an arbitrary 3x3 matrix by refining the input quaternion. It is based on the paper "A robust method to extract the rotational part of deformations" by Müller, Matthias, Jan Bender, Nuttapong Chentanez, and Miles Macklin.
PiperOrigin-RevId: 700006006
Change-Id: I77550993233dea9cdf68601762a3ae7ded749bdf
2024-11-25 09:19:10 -08:00
Yuval Tassa
1d64362adc
Add mjv_copyModel to copy mjModel, skipping large arrays not required for abstract visualization.
...
This functionality is meant for fast copying of `mjModel` when synchronizing the visualization state, as in the Python passive viewer.
PiperOrigin-RevId: 699199743
Change-Id: I13a5160063eb09139ec1aee9c4969bc1c6f547f1
2024-11-22 09:38:08 -08:00
Yuval Tassa
cedd602bc1
Compress dense rows in mjData.actuator_moment
...
PiperOrigin-RevId: 698516133
Change-Id: Idd861c2b63d77748a6282d72f8241eaeeb88006c
2024-11-20 14:10:28 -08:00
Yuval Tassa
1767c11d46
Direct assignment of mjData.moment_rownnz
...
This allows for better sanitizer coverage, errors will be caught upon read rather than upon use.
PiperOrigin-RevId: 698458735
Change-Id: I3003f3a122b83bbf42a6510260abbb8353c56a40
2024-11-20 11:24:36 -08:00
Taylor Howell
a1b18e707a
Compress actuator_moment memory using nJmom <= nu x nv.
...
PiperOrigin-RevId: 698446692
Change-Id: I49c9633e12129a1e690724db82d1f11204e41d9c
2024-11-20 10:53:07 -08:00
Kyle Bayes
0cb35a0fe1
Populate missing fields in mjCCDStatus in GJK code.
...
PiperOrigin-RevId: 696965759
Change-Id: Idf0799a44876e95fc8d688dd39663a34f1808b27
2024-11-15 12:24:37 -08:00
Kyle Bayes
f91588a171
Fallback to polytope3 if tetrahedron from GJK has the origin on a face (most likely due to a numerical issue).
...
PiperOrigin-RevId: 696872633
Change-Id: I58edb0fdc30ad472c8f1338df728e8d42c25fc39
2024-11-15 06:53:00 -08:00
Kyle Bayes
0a0de6615d
Back out of gjkIntersect when convergence fails due to algorithm oscillating between two support points. Also, fix related bug in box support function.
...
PiperOrigin-RevId: 696482893
Change-Id: Icedaf5489b761b8bf03ec30558b5d1128668a647
2024-11-14 05:12:32 -08:00