Yuval Tassa
0ffaeb4d56
Improve comments in mju_cholFactorNNZ, clarify that this function reads from the upper triangle of the source matrix.
...
PiperOrigin-RevId: 686113654
Change-Id: I029f9279d177f4cb9ff60396a26d64821aee3a6c
2024-10-15 08:26:07 -07:00
Kyle Bayes
8d84b5f693
Disable hfields for collision sensors.
...
PiperOrigin-RevId: 685730321
Change-Id: Ib1d4a90b7b31ca388e018076a274e25c40409080
2024-10-14 09:19:11 -07:00
Yuval Tassa
7ec94f46d4
Refactor Newton solver: move Hessian from arena back to the stack.
...
The changes in 9a0dc20821 , moving the Hessian from the stack to the arena, should be rolled back: they prevent future threading over islands. Unlike the stack, arena allocations are not thread-friendly. The reason for the original move was to save memory, but the savings are small: `O(ctx->nH)` and only linear in `nv`. The significant reduction of the Cholesky factor, from quadratic in `nv` to quadratic in the largest dof island — the reduction afforded by 2dd518734f — remains in place.
Also refactor and improve readability.
PiperOrigin-RevId: 685717356
Change-Id: Ia9ec3e44a62d459a3b9cffb578cf6479d5aa1d7f
2024-10-14 08:34:16 -07:00
Kyle Bayes
70d6655434
Add faster support functions for NativeCCD.
...
PiperOrigin-RevId: 684809392
Change-Id: I5125d4bb74c167d370aa919befba9d356c7162da
2024-10-11 05:59:30 -07:00
Yuval Tassa
3f3fe92860
Remove unused argument in mju_sqrMatTDSparseInit
...
PiperOrigin-RevId: 682375566
Change-Id: If05f5d15a2f8925eee9dd0ebc5d485164d90d787
2024-10-04 10:45:33 -07:00
Taylor Howell
6a6e10d779
Add mju_cholFactorNNZ to compute the number of non-zeros per row for sparse Cholesky factorization.
...
PiperOrigin-RevId: 679553197
Change-Id: I6f92deec347dae97d2e219cfb5376f92e777da1a
2024-09-27 05:39:08 -07:00
Kyle Bayes
04f8403d8e
Add unit tests for NativeCCD to produce better test coverage.
...
PiperOrigin-RevId: 677793306
Change-Id: I435865f00553c74d1d0c0fa86d9c41fb1e5497ff
2024-09-23 07:55:39 -07:00
Kyle Bayes
7a92423cf2
Add height fields to list of discrete objects in NativeCCD.
...
PiperOrigin-RevId: 676452215
Change-Id: I5d6a0d1e26ee852c774b44f550c1d0531b7a269b
2024-09-19 09:48:41 -07:00
Alessio Quaglino
4998e7b392
Move flex damping to the engine and remove membrane and solid plugins.
...
PiperOrigin-RevId: 676434954
Change-Id: I24e8dbaa90afcffd613a9cf106ef8b7262195328
2024-09-19 09:01:30 -07:00
Kyle Bayes
bd811a44e7
Remove redundant copying in NativeCCD and refactor code for readability.
...
PiperOrigin-RevId: 675573079
Change-Id: If9f7bc21d9ee7806997f05a8985ebe6b1b3c8332
2024-09-17 08:14:10 -07:00
Yuval Tassa
fb56d70dee
Add model with mixed geoms for CCD performance testing.
...
PiperOrigin-RevId: 675567065
Change-Id: I9629b0757270ca541a96bb64384b5c41e7a9b728
2024-09-17 07:56:35 -07:00
Taylor Howell
60a1921b34
Add site semantics to weld constraint. Fixes #1896
...
PiperOrigin-RevId: 675112981
Change-Id: Ie4c01440d54116075df89f480591700762892cbd
2024-09-16 05:46:01 -07:00
Kyle Bayes
5144be2baa
Add unit tests for NativeCCD.
...
PiperOrigin-RevId: 673849092
Change-Id: Ie703c9f461bb483fd3335d1ba589211205c73c8c
2024-09-12 08:03:18 -07:00
Kyle Bayes
8d165d5cc7
Fix early termination in GJK. It's possible for x_k to be the origin, so we should run the previous test to conclude that the objects are colliding.
...
PiperOrigin-RevId: 673834101
Change-Id: I596b30d2847670261f8067840b34dc13de401ecb
2024-09-12 07:17:53 -07:00
Yuval Tassa
4e3dc14f8e
Remove model/humanoid100/humanoid100.xml (used <include>), replace with model/humanoid/humanoid100.xml (uses <attach>)
...
PiperOrigin-RevId: 673123895
Change-Id: I0c3c6dac69d9fc12a6ea76d586c34503fc167bad
2024-09-10 15:14:04 -07:00
Kyle Bayes
44145742a7
Exit GJK early if geom distance doesn't need to be recovered.
...
PiperOrigin-RevId: 672334991
Change-Id: I4af582c799140ccf3ac4d51952e547b08ab5d55e
2024-09-08 14:57:50 -07:00
Kyle Bayes
4fc6fb179b
Remove libccd compatibility layer from native ccd.
...
PiperOrigin-RevId: 671740643
Change-Id: If3c1097df5c505f70c2dc0c090a7f5a93a43c683
2024-09-06 06:56:01 -07:00
Yuval Tassa
8954a088ce
Add automatic free-joint alignment.
...
PiperOrigin-RevId: 671010083
Change-Id: Ib7d60f75c7f545b1886703715663db8de77feeef
2024-09-04 10:07:33 -07:00
Yuval Tassa
2d3d5415b7
Add mj_jacDot: Time derivative of kinematic Jacobian.
...
PiperOrigin-RevId: 670505417
Change-Id: Icf30cff5dc955e002bd2f5d5fb3a04f8388d0780
2024-09-03 04:49:47 -07:00
Yuval Tassa
a1036b86d3
Allow connect constraints to be specified using sites.
...
PiperOrigin-RevId: 668925419
Change-Id: I10cb71e6706e617c830cd90d6d0836b94a5a8cfa
2024-08-29 07:10:51 -07:00
Taylor Howell
646455406c
Fix changelog by moving bug fix to proper section.
...
PiperOrigin-RevId: 668435872
Change-Id: I9042eb3f119cc778675944e7cfb8f6be0e9379b2
2024-08-28 07:07:11 -07:00
Taylor Howell
3e701b2125
Fix tendon sphere wrapping when using external sidesite.
...
PiperOrigin-RevId: 668391942
Change-Id: I78b44e1f90bb26fa6f5544eeb884c8ea22e41d33
2024-08-28 04:30:07 -07:00
Yuval Tassa
72a0ab145d
Refactor frustum drawing to use a local makeTriangle function.
...
PiperOrigin-RevId: 668168658
Change-Id: I0ee9038c36eb28e2c4a0a8c94bea7430f68c6b77
2024-08-27 15:42:31 -07:00
Kyle Bayes
d360ea1ce6
Minor GJK + EPA improvements:
...
1. Correct stopping criteria for GJK.
2. Store witness points from EPA in mjCCDObj,
3. Get dir directly from EPA instead of computing dir from witness points.
PiperOrigin-RevId: 666791852
Change-Id: I6a168f635b57c17692d31da6f6076b48c32ff2e3
2024-08-23 07:44:30 -07:00
Kyle Bayes
f986a52e1e
Compute witness points from EPA, and use witness points to determine pos and dir for contact.
...
PiperOrigin-RevId: 665791337
Change-Id: If33ca1f455804c4cda534508803f5c3e99c3c52a
2024-08-21 03:06:17 -07:00
Yuval Tassa
0bcaa85650
Fixed a bug wherein, for models that have both muscles and stateless actuators and used one of the implicit integrators, wrong derivatives would be computed.
...
PiperOrigin-RevId: 663680592
Change-Id: I5d72888cab19dd5e51f552f63fe0968db93f5dcd
2024-08-16 04:07:23 -07:00
Kyle Bayes
64575f399b
Add heightfield collision support for GJK + EPA implementation.
...
PiperOrigin-RevId: 663321119
Change-Id: I01a85ae15386c997bff4e9c6d71555a4380dfffe
2024-08-15 08:50:09 -07:00
Kyle Bayes
7f09a7d8c6
Fix bug in S2D and improve readability of GJK + EPA code.
...
PiperOrigin-RevId: 663261102
Change-Id: Ibb1d801078cc02bc7ccec246be6dc50fa4f2be18
2024-08-15 04:35:15 -07:00
Kyle Bayes
ebd8615554
Internal change.
...
PiperOrigin-RevId: 661267364
Change-Id: If2249eb1658c5b877a43a4d3c29ebf88d2a42d5a
2024-08-09 08:16:41 -07:00
Kyle Bayes
1c9d609b5b
Make mj_gjkPenetration have the same signature as LibCCD penetration functions.
...
PiperOrigin-RevId: 661256774
Change-Id: If0ae95e27900a9d7b9c63f189837f1315fbbb987
2024-08-09 07:40:17 -07:00
Erik Frey
35a834f0ba
Fix engine_sort_test compile error.
...
PiperOrigin-RevId: 660975517
Change-Id: I6e3d1b041fe60b1ec202391903eff340f787b46d
2024-08-08 14:11:35 -07:00
Taylor Howell
82c27165f2
mjQUICKSORT uses std::sort with C++.
...
fixes #1638
PiperOrigin-RevId: 660887790
Change-Id: Ia3b493feda98b246d963aa749bc81b96c42fddaa
2024-08-08 10:24:34 -07:00
Kyle Bayes
a1d9b47e2f
Initial (unoptimized) implementation of EPA.
...
PiperOrigin-RevId: 659938320
Change-Id: I72c6c6bd7504bce36e4788d90b06b2cb3849b4db
2024-08-06 06:53:55 -07:00
Google DeepMind
881b777ffd
Fix a build error in engine_util_solve_test.cc.
...
PiperOrigin-RevId: 659668840
Change-Id: I56b0604628d54e149092201ff19c3318b75429a6
2024-08-05 13:47:28 -07:00
Yuval Tassa
a29f67c850
Add test models for tendon wrapping.
...
PiperOrigin-RevId: 657208035
Change-Id: Ib82bd2b31a15d1386f8096b280def9e7325c8e46
2024-07-29 08:24:37 -07:00
Yuval Tassa
a4bd2bec0a
Skip disabled actuators in mjd_actuator_vel.
...
Fixes a bug where the derivative of the actuator force with respect to the generalized velocities (used in implicit and implicitfast integrators) was failing to take into account disabled actuators.
Fixes #1838
PiperOrigin-RevId: 657193960
Change-Id: Id8c0ab863a39e2a01cd2703774f460e9731b4807
2024-07-29 07:31:58 -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
Kyle Bayes
c6fd002f87
Move engine/engine_resource.{c,h} to user/user_resource.{c,h}.
...
PiperOrigin-RevId: 649628768
Change-Id: Id90c983cf70c0f92c3b033ac1b1654c53696955d
2024-07-05 05:41:55 -07:00
Kyle Bayes
57e6760ec9
Re-implement VFS internals in C++, removing the constraints of the previous implementation.
...
PiperOrigin-RevId: 649433087
Change-Id: Icaa3e6b7f2ef14f56b04fef2f4360b46d8b5f022
2024-07-04 09:22:23 -07:00
Yuval Tassa
19d505d847
Remove unused texture attribute in some models.
...
PiperOrigin-RevId: 648497401
Change-Id: I9f9a843abfb710afaf25798fa659efd92bcd7007
2024-07-01 15:05:02 -07:00
Yuval Tassa
c1ade85490
Add tests for mju_normalize4.
...
PiperOrigin-RevId: 648422309
Change-Id: Ie363b396cd854588dc59994ae76059f42f2a54b0
2024-07-01 10:58:35 -07:00
Yuval Tassa
0c3698f278
Don't normalize mocap quaternions in-place.
...
PiperOrigin-RevId: 648394295
Change-Id: I348a0a045c1697f6ef782280d92c90a30759eb33
2024-07-01 09:29:50 -07:00
Yuval Tassa
4d4b0bb2c3
Don't normalize mjData->qpos quaternions in-place.
...
PiperOrigin-RevId: 647927542
Change-Id: I13b0be55498d1da3af2cdc414cfed4c3908a6fe1
2024-06-29 03:07:10 -07:00
Kyle Bayes
5e39fc0564
Improvements to GJK implementation:
...
- Fix various bugs
- Improve readability
- Add support for recovering witness points.
PiperOrigin-RevId: 646515019
Change-Id: I295cf90d885e32013e595ea7aad07ed6c1869239
2024-06-25 10:00:58 -07:00
Kyle Bayes
1e8454820d
Implement initial GJK algorithm.
...
PiperOrigin-RevId: 645368315
Change-Id: I40a1e1023fd9f14a59e11a9dcc6ac22df241b6ae
2024-06-21 06:17:43 -07:00
Nimrod Gileadi
73cd15344e
Fix a couple of mjtNum build errors.
...
PiperOrigin-RevId: 645024056
Change-Id: Id283f550a4e2d927c214a86e77d42b90fb02824e
2024-06-20 07:31:28 -07:00
Yuval Tassa
6067048537
Deprecate mju_rotVecMat and mju_rotVecMatT in favor of mju_mulMatVec3 and mju_mulMatTVec3.
...
These functions names and argument ordering are more consistent with the rest of the API.
PiperOrigin-RevId: 643788290
Change-Id: I783eda8021b80b82098e23ed95669b102bb82508
2024-06-16 10:02:36 -07:00
Yuval Tassa
86ef1746b0
Add convex collision test models.
...
PiperOrigin-RevId: 643567019
Change-Id: I233553f04ea7d67216a2440f834362965d9e8c58
2024-06-15 01:38:13 -07:00
Yuval Tassa
c9bcf8371e
Add mj_setKeyframe function to save current state in k-th model keyframe.
...
Fixes #1719 .
Also improve documentation of `mju_sigmoid`, was previously only documented in changelog.
PiperOrigin-RevId: 642637458
Change-Id: I811a0bf8f881c8b76c9a62d2faec8fdec4e7585b
2024-06-12 09:22:52 -07:00
Yuval Tassa
07fc95ca9a
Add orthographic cameras.
...
Orthographic cameras are specified by setting the `orthographic` attribute of the `<camera>` element. The `fovy` attribute is still used to specify the field-of-view, but its semantic is different for orthographic cameras. For orthographic cameras, the field-of-view is expressed in units of length, rather than degrees.
Other related changes:
* Fix bug in the ordering of `cam_xxx` elements in `mjModel`.
* Make camera visualization translucent only when the frustum is visualized.
* Added a button to `simulate` to toggle between perspective and orthographic free cameras.
https://youtu.be/ZXBTEIDWHhs
PiperOrigin-RevId: 642293435
Change-Id: Id090a421ad88ab404b5b27ddbbd6bfc81ad49bc5
2024-06-11 09:23:18 -07:00