Balint-H
b3274bb91d
Fix formatting
2025-01-21 15:21:51 +00:00
Balint-H
a58f8d0033
Add OBJ mesh support to Unity plugin
2025-01-21 15:11:27 +00:00
Bálint Hodossy
36cbef50b7
Allow loading obj meshes
2025-01-20 11:09:18 +00:00
Gabe Oppenheimer
61973a33c9
Update eigen3 and the changelog ahead of the 3.2.7 release.
...
PiperOrigin-RevId: 715467319
Change-Id: I4a6a168bc981c976890c46b784e94805afc86323
2025-01-14 11:51:12 -08:00
Alessio Quaglino
ba183adb67
Add assets to MjSpec wrapper.
...
This enables associating assets with a spec object.
Also, remove `spec.compile(assets)` and replace it with the `spec.assets` attribute, which must be be set before compile if assets are present.
PiperOrigin-RevId: 714981385
Change-Id: Ic3a33c3b75d3a7e14868622aadb57b2a8461a649
2025-01-13 08:41:51 -08:00
Taylor Howell
64d0f57c50
Fixes for MJX tendons and muscle actuators. Fixes #2317 .
...
PiperOrigin-RevId: 714951834
Change-Id: I823b3a01b2b76cb4707cb313afd1a187f9bdb333
2025-01-13 06:58:12 -08:00
Andrea Gesmundo
1c32b5d2dd
Fix attach logic.
...
Replace .attach() with .attach_body() where a body is passed as a first argument instead of a spec that is expected by .attach().
+Fix typo.
PiperOrigin-RevId: 714933134
Change-Id: Idb242fbef0fe164075826c01d4e1995c7d4ae565
2025-01-13 05:41:49 -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
Alessio Quaglino
da32b0db30
Handle ctrl special case explicitly in bind().
...
PiperOrigin-RevId: 714055763
Change-Id: I020008723af4a590926268a2ea615af54e20aa0b
2025-01-10 08:08:03 -08:00
Alessio Quaglino
3f32cc2479
Add mjSpec binding to MJX.
...
PiperOrigin-RevId: 714026500
Change-Id: I5cb3fe6cc975b3aa43d44185e3bc186b45845cf3
2025-01-10 06:16:32 -08:00
Copybara-Service
6f7fba794b
Merge pull request #2336 from xela-95:patch-2
...
PiperOrigin-RevId: 713991183
Change-Id: I0869a068f463513e89fe2f88bca4b82177cfffa3
2025-01-10 03:46:20 -08:00
Copybara-Service
d3a0c28457
Merge pull request #2334 from jjyyxx:patch-3
...
PiperOrigin-RevId: 713952754
Change-Id: Ic388f4dc05389fbe3e5a20b365b27f800d4147ab
2025-01-10 01:12:43 -08:00
Yuval Tassa
b0f885ead0
Minor edits to the Programming/Simulation docs page.
...
PiperOrigin-RevId: 713952376
Change-Id: I5b7230a001bd49954d401846f40cd122ee4e748c
2025-01-10 01:11:27 -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
Alessio Quaglino
90049343b9
Fix texture indexing bug in bindings.
...
Fixes #2341 .
PiperOrigin-RevId: 713667648
Change-Id: I7fa5da1506306c5374febf762ce54aff9146079b
2025-01-09 07:38:22 -08:00
Andrea Gesmundo
419da17395
Fix plot label.
...
PiperOrigin-RevId: 713635908
Change-Id: Icbeef26053b10747024ea65b23ca86816f4fdb2e
2025-01-09 05:23:32 -08:00
Alessio Quaglino
f7d38dac62
Add recursive call to FindSpec for handling nested attachments.
...
PiperOrigin-RevId: 713629578
Change-Id: I23efa5a86bac187fc42eb955d29cc03cbacfd9e0
2025-01-09 04:56:12 -08:00
Saran Tunyasuvunakool
40ef08c8ed
Don't pollute the global namespace when using mjpython.
...
Fixes #2265
PiperOrigin-RevId: 713442833
Change-Id: If155d9f57d4deef8b848478ebd8077a00417d5c5
2025-01-08 15:48:20 -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
Alessio Quaglino
6654d63438
Add spec lookup in the attached spec array using the compiler option pointer.
...
This enables to find the spec associated with the compiler option stored in the objects, which do not necessarily belong to the model that owns them.
PiperOrigin-RevId: 713259419
Change-Id: I579c770147ff07ed2a5edd20e7a795ee7cc27147
2025-01-08 05:44:00 -08:00
Alessandro Croci
7a6bf06706
Update simulation.rst
...
Add missing backticks to `mjData.xfrc_applied`
2025-01-08 14:27:46 +01:00
Alessandro Croci
661c3e01dc
Update simulation.rst
...
Add missing backticks to `mjData.mocap_quat` in simulation.rst
2025-01-08 14:21:24 +01: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
Yuxuan Jiang
df1d15fa38
Fix typo in modeling.rst
2025-01-08 09:53:36 +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
1c69e64e6e
Extend test comparing dense and sparse pipelines to all solvers.
...
PiperOrigin-RevId: 712862658
Change-Id: Ieb8515d32a225a098ab96055598a5d56bad7e476
2025-01-07 04:37:04 -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
Baruch Tabanpour
0be7e6a1f6
Fix #2306 .
...
PiperOrigin-RevId: 712575320
Change-Id: Ia74ef0b31b4e7098647340760572a1f6368eab64
2025-01-06 10:28:12 -08:00
Alessio Quaglino
f607d9554e
Check that there are no pending keyframes while writing a spec.
...
This can happen when a body is detached without compiling or recompiling.
Also added error catching when trying to delete a body instead of detaching it.
Fixes #2327
PiperOrigin-RevId: 712526730
Change-Id: I4b48df83120fca12d475c85b3a54893841449653
2025-01-06 07:50:30 -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
Alessio Quaglino
ee6f4837f3
Auto-generate 3D mesh from convex OBJ if dim=3 in flex.
...
This requires the user to explicitly specify an origin.
PiperOrigin-RevId: 712483526
Change-Id: Ie316a5eccb676bb918d4bb746795019145c10f5b
2025-01-06 04:35:59 -08:00
Alessio Quaglino
65048d6b8f
Do not use fast lookup for frames.
...
Fast lookup is not possible since mjOBJ_FRAME > mjNOBJECT, which is the size of the objects maps used for the search.
Fixes #2328 .
PiperOrigin-RevId: 712479460
Change-Id: I7bcfa75ff8a1e288183d60ed4a44cab5bc6f4173
2025-01-06 04:17:41 -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