Commit Graph

100 Commits

Author SHA1 Message Date
Nimrod Gileadi 33a2ce73d4 Update MuJoCo version to 2.3.3.
PiperOrigin-RevId: 517931617
Change-Id: I7c9960290f1b6e5d5f68a54df617a580f23c57e9
2023-03-20 04:36:09 -07:00
Kyle Bayes 8696247f9d Add mj_stackAllocInt to get correct size for allocating ints on mjData stack. Reducing stack memory usage by 10% - 15%.
PiperOrigin-RevId: 517672195
Change-Id: Ie14e6c9c99e8b9e1c5d3686b77631f2df0651c67
2023-03-18 13:04:14 -07:00
Alessio Quaglino 70959c1a2c Added a collision midphase on geom pairs using rotated AABBs static trees.
PiperOrigin-RevId: 517357695
Change-Id: I068fee714d9638be2fb6d042d5d86f8ff970635b
2023-03-17 02:37:29 -07:00
Yuval Tassa 8c7f6ce5a0 New implicitfast integrator and sparse RNE derivatives for implicit.
PiperOrigin-RevId: 516910733
Change-Id: I29a0465c0f0b1749a73e3d7e01925200d025ddd0
2023-03-15 13:17:41 -07:00
Kyle Bayes d3d789cf7d Convert mju_error and mju_warning to variadic functions, supporting printf-like arguments. The functions mju_error_i, mju_error_s, mju_warning_i, and mju_warning_s are now deprecated.
PiperOrigin-RevId: 515431052
Change-Id: I440de0cb417ce216b6d636a5d86dc9ef6cc1fc06
2023-03-09 13:51:27 -08:00
Kyle Bayes 50bebcb4ee Precount number of non-zeros for constraint Jacobian sparse matrix.
PiperOrigin-RevId: 512947632
Change-Id: I9605e81b4e51fbc90854c13153e4fee38ad48fb9
2023-02-28 08:57:56 -08:00
Copybara-Service 2729f9fcf8 Merge pull request #740 from hyarion:fix/unity-fluidshape
PiperOrigin-RevId: 511791324
Change-Id: I28e98e55efe43ba053b803838082646289e4f09e
2023-02-23 08:19:20 -08:00
Benjamin Nauck 42c3faa462 Add support for fluid coefficients to Unity plugin 2023-02-20 18:46:16 +01:00
Yuval Tassa 7542c90cd2 Improved behaviour of mouse-spring interactions.
Also:

- Renamed recently introduced `mjvPerturb` member `reflocalpos` -> `refselpos` and corrected docstring.
- Added `mjvPerturb.localmass`: body spatial inertia at selection point.
- Removed `const` qualifier to `mjData` argument of `mjv_initPerturb()`, to facilitate spatial inertia computation.
- Improved `mj_Object{Velocity, Acceleration}` docstrings, clarifying that rotational velocities precede linear velocities.
- Removed redundant const qualifiers from non pointer arguments to `mju_dot` and `mju_writeNumBytes`.

PiperOrigin-RevId: 511002168
Change-Id: I27400f497947f330072d4abb7c9bf7e71e6c5d49
2023-02-20 08:40:33 -08:00
Alessio Quaglino 9756ed0d80 Read normals and textures from OBJ, do not duplicate vertices.
PiperOrigin-RevId: 510461549
Change-Id: I19245d691e722a8371e61153383f275f599353d6
2023-02-17 10:15:25 -08:00
Yuval Tassa 2607e67f8d Add contact labels showing which geom pairs are in contact.
PiperOrigin-RevId: 510422404
Change-Id: Ia73570098752e7c7175e4b5a5f2a0f8b08a6c006
2023-02-17 07:03:19 -08:00
Benjamin Nauck 09bc934f25 Add support for fluid shapes to Unity plugin 2023-02-17 13:15:29 +01:00
Copybara-Service d26d7babe9 Merge pull request #734 from hyarion:fix/unity-load-balloons.xml
PiperOrigin-RevId: 509832074
Change-Id: Ia8505b4ea83d8903052e72a12b914a8fd94a13df
2023-02-15 07:51:34 -08:00
Saran Tunyasuvunakool ace5b74f83 Rename inteval attribute in mjLROpt to interval.
PiperOrigin-RevId: 509275105
Change-Id: I0ffb9cf485a504843ed255f0b4f24e9285a1c273
2023-02-13 10:54:25 -08:00
Benjamin Nauck 87bc8d0ed2 Fix spelling in MjcfImporter 2023-02-13 12:02:55 +01:00
Benjamin Nauck 8599d80b4d Apply tendon defaults on fixed and spatial tendons 2023-02-13 12:02:29 +01:00
Benjamin Nauck 7ed632cb9e Add support for arbitrary default node lookup name
Makes it possible to apply modifiers to elements even if the name doesn't match.
This is necessary to support default values for tendons.
2023-02-13 12:02:10 +01:00
Benjamin Nauck 5228ad1b2e Change default wind to the value from the doc 2023-02-13 10:21:30 +01:00
Benjamin Nauck e7a9447c03 Add gravcomp to body in unity plugin
The unity plugin is missing gravcomp which makes it impossible for buoyancy
2023-02-13 10:21:09 +01:00
Benjamin Nauck 9971993cdb Add support for implicit integrator type
The `implicit` option was added in the IntegratorType enum.
Using `@` prefix to avoid collision with reserved keyword.
2023-02-13 10:20:42 +01:00
Alessio Quaglino dd632b7ccc Bump MuJoCo version to 2.3.2.
PiperOrigin-RevId: 507720557
Change-Id: I7a5b577094ac1a7f468a84c484f62f61dc6b409f
2023-02-07 02:35:17 -08:00
Saran Tunyasuvunakool 9a7f4a768a Remove control plugin API.
This is a rollback of f937ffd93326b2964e33689b0dc6024124776a9e.

PiperOrigin-RevId: 507456400
Change-Id: I2026510e6065eb440c0c899fcc5a2cc8ff5afd49
2023-02-06 05:52:17 -08:00
Yuval Tassa 7feecf6e94 Improve behaviour of set-pose mouse interactions with free and mocap bodies.
PiperOrigin-RevId: 506051745
Change-Id: If666757deb743f7bf3af4113d10976c3294e0879
2023-01-31 10:57:19 -08:00
Tom Erez f3c966796f Allow models without numerical suffixes.
This is important for MJPC, where some element special names (e.g., a site called "trace0", or different custom numeric fields) are used.

PiperOrigin-RevId: 502338391
Change-Id: I632b5d633c92b82b60160daeeb169693225640a3
2023-01-16 02:59:11 -08:00
Saran Tunyasuvunakool 1215067f5c Add an option in mjrContext for mjr_readPixels output format.
PiperOrigin-RevId: 500342924
Change-Id: I43e8c6208db341e2bdbef10382b7293c35bdca65
2023-01-07 00:11:01 -08:00
Saran Tunyasuvunakool e40775fab3 Abstract out GLFW calls from Simulate.
PiperOrigin-RevId: 500129478
Change-Id: I7ba998e20439575ad9a3fe1a866c3db4c36b9328
2023-01-06 02:45:56 -08:00
Saran Tunyasuvunakool 6824cd50e2 Update MJBindings.cs to correctly reflect pointer-to-pointer types.
PiperOrigin-RevId: 499881915
Change-Id: Ibd25d8e38258c7d1372a066dadbffcf4c1dd2d6b
2023-01-05 08:10:54 -08:00
Kyle Bayes f1007df013 Implement hash map for mj_name2id using djb2 and linear probing.
PiperOrigin-RevId: 499485127
Change-Id: I5aed6549db18b92d7c8a3b7590e50a00ce13a439
2023-01-04 07:57:55 -08:00
Tom Erez eb8389fead Find MjScene at OnEnable: ensure MuJoCo compilation happens only once at startup.
PiperOrigin-RevId: 498655077
Change-Id: Ibed8f36a880426063b7729fc66b15c67adcc9a65
2022-12-30 18:37:59 -08:00
Tom Erez f78ebeab96 Add post-compile and pre-destroy events to MjScene.
PiperOrigin-RevId: 498516529
Change-Id: I52dbf135e3260ca2999069bcb9f9b9ad648595d2
2022-12-29 22:43:11 -08:00
Tom Erez 6a58fd1522 Clean-up test files.
Also, don't add a Global Settings component at import if the xml doesn't have any global settings (option/size/custom).

PiperOrigin-RevId: 495950899
Change-Id: I6599e8ea3f3a82729fc5c974fd7ced8eb93b277e
2022-12-16 13:39:28 -08:00
Copybara-Service 4d91866e98 Merge pull request #652 from Balint-H:fix/unity-scene-tranisition
PiperOrigin-RevId: 495876985
Change-Id: I9880aa6bd2fc696509e518449a35a69457d92ba4
2022-12-16 08:13:03 -08:00
Tom Erez 189349f421 Don't add an empty "user" attribute to user sensors.
This fixes the broken TAP tests.

PiperOrigin-RevId: 495867491
Change-Id: I740651ed0dd8d1c84053a48f3fca577b6024bf95
2022-12-16 07:17:42 -08:00
Tom Erez f70403d00a Add support for global custom numeric fields.
PiperOrigin-RevId: 495865065
Change-Id: I59ed65e84a0bcaa90220b938ed34fdc26165aa09
2022-12-16 07:03:31 -08:00
Bálint Hodossy a0ab1940bf Fix ignored units of springref 2022-12-15 15:36:14 +00:00
Tom Erez e95b0c0eaf Add anchor support for connect constraint components.
Fixes #647

PiperOrigin-RevId: 495587232
Change-Id: I528a69dabbc1ac9a12f9ab7c16716e3d69c635e2
2022-12-15 07:25:59 -08:00
Bálint Hodossy aec125fb4e Check whether MjScene exists in components' OnDisable() 2022-12-14 13:38:36 +00:00
Tom Erez 21f10ce1b6 Add user sensor bindings.
Stop force-setting nusersensor, instead allow MuJoCo to infer the size.

PiperOrigin-RevId: 494783883
Change-Id: Ia2a1b1803b2904f2dded7b790d01eb6f1920dbaf
2022-12-12 11:43:00 -08:00
Tom Erez 7a248a8bde Rename bindings file for consistency.
PiperOrigin-RevId: 494779230
Change-Id: I693a0e389febc51276bde565bbbfc87c241f15e0
2022-12-12 11:24:12 -08:00
Copybara-Service bebfcad685 Merge pull request #628 from Balint-H:feature/unity-mesh-import
PiperOrigin-RevId: 493556582
Change-Id: I26bac07a8fc996043ec478d0ec0c5b56fe447e50
2022-12-07 03:18:38 -08:00
Saran Tunyasuvunakool e4f1d584ad Add control plugin API.
PiperOrigin-RevId: 493311715
Change-Id: Iccd99fb26004f39832818e378f01f9149a0e3e3b
2022-12-06 08:23:49 -08:00
Bálint Hodossy 8312f37e7e Reuse existing mesh assets in MjMeshFilter 2022-12-06 16:11:03 +00:00
Kyle Bayes 73fb61e3e2 Bump version number to 2.3.1.
PiperOrigin-RevId: 493076656
Change-Id: I48c7a45b503c4a7363ea1455a4a3788262d007f7
2022-12-05 12:13:55 -08:00
Copybara-Service 170a060a50 Merge pull request #601 from Balint-H:fix/mesh-filter-disappear
PiperOrigin-RevId: 490719489
Change-Id: I04bdd2f302197a06acaf922e9d10a0bbf00ee89a
2022-11-24 05:46:49 -08:00
Bálint Hodossy dc927b367d Remove unnecessary unit conversion 2022-11-23 16:26:42 +00:00
Bálint Hodossy 12d3e0ae09 Create separate mesh when MjMeshfilter is first instantiated, to support duplicating in Editor 2022-11-23 15:02:35 +00:00
Copybara-Service 6f2092bef2 Merge pull request #593 from Balint-H:feature/unity-ccd
PiperOrigin-RevId: 489551476
Change-Id: I751d2faa95d82f201614e8a3f08a9629492bfbe7
2022-11-18 13:38:51 -08:00
Bálint Hodossy 5c79a9a8fe Add multiccd option in Unity MJCF parser and writer 2022-11-18 13:10:06 +00:00
Bálint Hodossy 1fdbfa7061 Add MjScene property to check if scene has initialized 2022-11-18 11:25:08 +00:00
Bálint Hodossy 2328316d7d Add synchronisation events to MjScene 2022-11-18 11:23:41 +00:00