Commit Graph

1514 Commits

Author SHA1 Message Date
Alessio Quaglino edc4db6898 Update sdflib version.
PiperOrigin-RevId: 612389341
Change-Id: Id3e7a4fb51e63b7fef7e9ca7f94a0bc7e54e8413
2024-03-04 03:41:58 -08:00
Yuval Tassa 3d24bdb217 Small improvements to MJX performance tuning section.
PiperOrigin-RevId: 612377295
Change-Id: I542aba7a33372556b62e3cdb4bf0c1c4d97dc98a
2024-03-04 02:49:11 -08:00
Copybara-Service 73f65ec408 Merge pull request #1428 from Balint-H:feature/unity-plugins
PiperOrigin-RevId: 612144507
Change-Id: Ie355c0da2b4a51331aadcfce865a1edd720381b5
2024-03-03 02:16:08 -08:00
Alessio Quaglino 1bd44e73bb Replace mjCModel with mjmModel in mjXBase.
PiperOrigin-RevId: 611762880
Change-Id: I22254689b6cbf10fe7b61f9742b6ffd6c2074477
2024-03-01 03:38:28 -08:00
Baruch Tabanpour 419be4c605 Add crude broadphase impl.
PiperOrigin-RevId: 611643683
Change-Id: Id7816dadd7e9f1b8855268b815353c61540c4e0c
2024-02-29 17:12:58 -08:00
Alessio Quaglino 8f1ea05bef Add disc mesh generation to user_flexcomp.
PiperOrigin-RevId: 611462985
Change-Id: I0fc195d8733172f5f4347b04b5de0edfdd12613d
2024-02-29 07:24:47 -08:00
Copybara-Service f9c46e2abb Merge pull request #1447 from jaro-sevcik:mjx-factor-m-parallel
PiperOrigin-RevId: 611348280
Change-Id: I19ef25c732d43bba0b0a8c296b197948c69d5b52
2024-02-28 22:31:01 -08:00
Alessio Quaglino 9e1d7d6ab8 Fix typo in flex and composite error message.
PiperOrigin-RevId: 611115238
Change-Id: Iadb9b4b078e60bca15184f3435380eb67b2da8a9
2024-02-28 08:45:11 -08:00
Kyle Bayes b2bd377bad Clean up mjCModel definition.
PiperOrigin-RevId: 611102699
Change-Id: I64a3927c30f16764742966f4c5e1e0e579af5f50
2024-02-28 07:58:31 -08:00
Copybara-Service 789188d51d Merge pull request #1434 from traversaro:patch-32
PiperOrigin-RevId: 611046247
Change-Id: I05fa95c13c9c0a9bf5b6b50bb3d201ffbc556dd6
2024-02-28 03:30:02 -08:00
Jaroslav Sevcik 803f0cb0d9 Clean up factor_m 2024-02-28 01:19:12 -08:00
Yuval Tassa 982760a63b Improve bindings for mjd_subQuat.
- Accept `None` for optional arguments.
- Accept 3x3 matrices for matrix arguments.

PiperOrigin-RevId: 611000820
Change-Id: Id28cdb2ae574f372ff251f94ab4557d9d2eaa80b
2024-02-27 23:55:19 -08:00
Copybara-Service a5ea87b0e6 Merge pull request #1446 from jaro-sevcik:mjx-solve-m-parallel
PiperOrigin-RevId: 610984251
Change-Id: Ifd69480643df236fe2d6b9f77d1b029d2650acff
2024-02-27 22:21:11 -08:00
Baruch Tabanpour 2e43f18bee Update barkour notebook.
PiperOrigin-RevId: 610906071
Change-Id: Ie67b86888e195bbd8a8e879547e65fbc2c864534
2024-02-27 16:09:20 -08:00
Baruch Tabanpour 2067e2083a Add cameras to MJX. Fixes #1422
PiperOrigin-RevId: 610870732
Change-Id: Iaa39bd00f56046c595dc961281ac23446ca5bdf2
2024-02-27 14:17:21 -08:00
Alessio Quaglino 478ce0c8d8 Use previous edge length when setting the position of a cable body.
Fixes #1440.

PiperOrigin-RevId: 610690343
Change-Id: I0d5288e68069d1117c0c674530e0644960bab06c
2024-02-27 02:55:14 -08:00
Jaroslav Sevcik 7688e03eea Remove unnecessary parens 2024-02-27 00:10:21 -08:00
Alessio Quaglino 1f2d673c7b Add missing global fields to mjmModel.
PiperOrigin-RevId: 610415124
Change-Id: I07f284804bf73cb67703597973b50b8c00ea8deb
2024-02-26 08:25:08 -08:00
Yuval Tassa 8679c9fc59 Fix null pointer deref for unknown class names.
PiperOrigin-RevId: 610391077
Change-Id: I5abd62ff46e31e788f06fe111adb3c25287d4fdc
2024-02-26 06:38:52 -08:00
Kyle Bayes b47d97652e Load from VFS in parsing benchmark.
PiperOrigin-RevId: 610384849
Change-Id: Id226c30f1629d6b4bbc2231c1e998e733c27772e
2024-02-26 06:08:11 -08:00
Jaroslav Sevcik 29d6e10375 Update independent elements in solve_m in parallel 2024-02-25 20:27:28 +00:00
Jaroslav Sevcik 13f256dd19 Parallel factor_m 2024-02-25 20:24:54 +00:00
Yuval Tassa 03a8fa9ca9 Improvements to minimize.least_squares:
- Added central differencing option.
- Changed `mu` semantics from log10 to actual values.
- `mu` control is now more aggressive, saves a few iterations.
- Use Armijo sufficient reduction criterion.
- Added some checks for float64 and NaNs.
- Added log of final result to trace.
- Removed unhelpful QP timing.

PiperOrigin-RevId: 610096950
Change-Id: Idf1a7c3155ce8e82fc2d5fe0f2da2f16636ff63d
2024-02-24 20:42:45 -08:00
Alessio Quaglino c6a41fbfe6 Copy default spec before assigning defaults.
PiperOrigin-RevId: 609766747
Change-Id: I79ebff62928ac2ffa5133020ee8bd001b68cdcd3
2024-02-23 10:24:13 -08:00
Alessio Quaglino ce52047c6f Remove column = -1 from error messages.
PiperOrigin-RevId: 609664538
Change-Id: I1cf27cbd0812d1d88d53724ae416a0b618140acc
2024-02-23 02:40:23 -08:00
Alessio Quaglino c248beb7e2 Remove name and classname from mjmWrap.
PiperOrigin-RevId: 609563968
Change-Id: Ic69b95412ec5914fb5a8dcd134c7e6e733bc05b0
2024-02-22 18:14:33 -08:00
Kyle Bayes 109f2d7119 Replace mj_makeEmptyFileVFS in Python bindings with mj_addBufferVFS.
PiperOrigin-RevId: 609383859
Change-Id: Ib23ee49e803630a2895a471e9a3ed8b33551cbb9
2024-02-22 08:36:42 -08:00
Alessio Quaglino 0ae9ba37f9 Replace PointToLocal with operator overload in mjCDef.
PiperOrigin-RevId: 609376948
Change-Id: Id69909d06ab48824a9cbe0d5a305e8f8b72a193d
2024-02-22 08:12:52 -08:00
Alessio Quaglino cf7bd77cd3 Fix refpos typo in xml_native_reader.
PiperOrigin-RevId: 609376004
Change-Id: I2c722b03aaee63c4dcd8ac34f3e7c834bf15052d
2024-02-22 08:09:57 -08:00
Saran Tunyasuvunakool b04de39e4e Fix false positives from mjData stack leakage detection.
When built and run under address sanitizer (asan), `mj_markStack` and `mj_freeStack` are instrumented to detect leakage of mjData stack frames. When the compiler inlines several callees that call into mark/free in the same function, this instrumentation requires that the compiler retains separate mark/free calls for each original callee.

This change adds necessary optimization barriers to ensure that this is the case.

PiperOrigin-RevId: 609373993
Change-Id: I30dfd998fb66530735348e9715d92ee713f28210
2024-02-22 08:03:51 -08:00
Alessio Quaglino 34d4a69027 Remove user_objetcs and user_model includes from xml_urdf.
PiperOrigin-RevId: 609330384
Change-Id: I19b330e4063d3be4401dcf1b2b957b55e0616037
2024-02-22 04:54:49 -08:00
Alessio Quaglino 5fe3e169ab Remove mjm_finalize.
PiperOrigin-RevId: 609284351
Change-Id: I066332784d8210de6fec5aa718e097c9ef67903c
2024-02-22 01:27:06 -08:00
Alessio Quaglino 7edacd39cd Add engine settings to mjmModel.
PiperOrigin-RevId: 608915453
Change-Id: Ic58566d7a9cdb57e25954caec69f595c8c9ee88a
2024-02-21 02:26:57 -08:00
Kyle Bayes a4a621f6e3 Add checksums (used as a timestamp) to VFS.
Deprecate mj_makeEmptyFileVFS in favor of mj_addBufferVFS.

PiperOrigin-RevId: 608915388
Change-Id: Id9e9b042799bc1bf547f0795ae6f386447d53cdd
2024-02-21 02:25:36 -08:00
Alessio Quaglino 042760eba8 Add compiler settings to mjmModel.
PiperOrigin-RevId: 608908314
Change-Id: Id3b0d8c62ca710b5b6d6e423abbbddcb7e7079a1
2024-02-21 01:58:22 -08:00
Silvio Traversaro 8c63a8b8c7 Fix mjpResourceProvider example 2024-02-20 23:56:43 +01:00
Saran Tunyasuvunakool abf6d41b7f Fix incorrect data types in Python bindings of certain arrays.
The mismatch between the `py::array_t` template argument and the type of the MuJoCo struct member being wrapped caused the `py::array_t` to be constructed via an unintended constructor overload, which in turn triggered `use-after-poison` under asan.

This bug affected the `geom`, `flex`, `elem`, and `vert` arrays in `mjContact`, and all array members in `mjrContext`.

PiperOrigin-RevId: 608632860
Change-Id: Ic227f691041b004a0fcf0cb6fa3d62c44861d9aa
2024-02-20 09:26:19 -08:00
Yuval Tassa 7c534a066c Sort humanoid actuators in the same order as the joints.
PiperOrigin-RevId: 608558353
Change-Id: I84015a92c39c187f65d59623f2793c29bf24b8ef
2024-02-20 04:41:17 -08:00
Alessio Quaglino 78dc5aee9f Remove mjCPlugin from xml_native_reader.
PiperOrigin-RevId: 608546883
Change-Id: Ib529c2756102e4e2185d1d8e9585187c30049011
2024-02-20 03:46:42 -08:00
Yuval Tassa b56d4bf8a5 Add mujoco.minimize module.
PiperOrigin-RevId: 608443678
Change-Id: Ib5dc78fe4523488b6c4e824f226591cf6a8a6216
2024-02-19 18:58:42 -08:00
Kyle Bayes 24eb4c9f09 Improve include meta-element to load included resourced from the directory relative to the included XML file, fully backwards compatible.
PiperOrigin-RevId: 608312069
Change-Id: I80eadb32d7d78fb35bd24975f2e514021c2aa009
2024-02-19 05:40:31 -08:00
Alessio Quaglino b77dfc683a Use OnePlugin for parsing Composite and Flexcomp plugins.
PiperOrigin-RevId: 608265172
Change-Id: I053441a9e534d81c4847ad60fe4a3f7dce87350c
2024-02-19 02:02:29 -08:00
Yuval Tassa 55e2c76c01 Use mj_resetDataKeyframe when loading key frames in simulate.
PiperOrigin-RevId: 608209431
Change-Id: I1ee78c837cbc098144143b90e8c0b4618568c9cf
2024-02-18 20:49:09 -08:00
Bálint Hodossy c65410a92d Preliminary support for plugins. Load all plugins in plugin folder. 2024-02-18 14:45:54 +00:00
Matthew Bennice c146bb4003 BEGIN PUBLIC
Remove incorrectly added test files.
END PUBLIC

Correct typo in copy.bara.sky

PiperOrigin-RevId: 607930101
Change-Id: Ib2c75d00e65f11c30be2ea0b3fdbb0c24bd3a164
2024-02-17 02:57:02 -08:00
Matthew Bennice dbf7afaeaa Canonical USD example for MuJoCo Physics. This contains three items:
floor - a static floor centered at origin of sides 100m x 100m

two_cubes - a standard example where 2 cubes have a hinge joint between them.

two_cubes_scene - a scene made up of the floor at (0, 0, 0) and two_cubes at (0, 0, 30).

PiperOrigin-RevId: 607809323
Change-Id: I9931d89441653ce7aaf5145ee42c71c0c8f9ffcb
2024-02-16 14:56:39 -08:00
Erik Frey 1b93226fb0 To save memory, avoid loading meshes that will never be used for collisions.
PiperOrigin-RevId: 607770456
Change-Id: I34c4a34d1820a9fd88d2ebeaffec9a64637d2614
2024-02-16 12:40:35 -08:00
Alessio Quaglino d7c47de353 Add mjStatistic to mjmModel.
PiperOrigin-RevId: 607657424
Change-Id: I17f6ef37570651e002258ee2a509fc52d213c0f5
2024-02-16 05:17:35 -08:00
Nimrod Gileadi f1d4f8f0a1 Test that mj_resetDataKeyframe treats negative keyframe IDs as a normal reset.
PiperOrigin-RevId: 607655812
Change-Id: Ia9bb1031468f04e8f9563b9228a46983356dafef
2024-02-16 05:09:05 -08:00
Yuval Tassa 05150546e3 Add inheritrange attribute to position and intvelocity actuators.
PiperOrigin-RevId: 607650147
Change-Id: Ibc1846f89179786d4f93435c3924687b4c5d1432
2024-02-16 04:42:44 -08:00