Commit Graph

933 Commits

Author SHA1 Message Date
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
Baruch Tabanpour 2067e2083a Add cameras to MJX. Fixes #1422
PiperOrigin-RevId: 610870732
Change-Id: Iaa39bd00f56046c595dc961281ac23446ca5bdf2
2024-02-27 14:17:21 -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
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
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
Erik Frey 6a346c42e8 Adds support for mjOption.impratio to MJX.
PiperOrigin-RevId: 607456034
Change-Id: I7f6549a4332fd2bc0331d76a8906b971ce28dbcf
2024-02-15 14:28:36 -08:00
Yuval Tassa bafe490ea8 Sort assets in schema according to order in docs.
PiperOrigin-RevId: 607272771
Change-Id: Ifd1220671a59effd0a841babbe746dd23d02eefd
2024-02-15 03:10:43 -08:00
Erik Frey 47bb4a828e Fixes to the MJX Euler integrator and Newton solver, and test improvements to catch future bugs like this.
PiperOrigin-RevId: 606389094
Change-Id: I50d0143f338fe29a823c930dba82995ce8a64ce2
2024-02-12 15:46:27 -08:00
Yuval Tassa b6873ec8a2 Move mjModel.mesh_{pos,quat} before mesh_pathadr so all attributes related to original asset data are next to each other.
PiperOrigin-RevId: 606277473
Change-Id: Ia4f6df552192c8a2847126975b6a1a31df63cf65
2024-02-12 09:37:48 -08:00
Yuval Tassa 72cf304e2b Improve documentation of mesh pre-processing.
PiperOrigin-RevId: 606268723
Change-Id: I1d939cbb214036ab477e12ae3fd266a25ff89399
2024-02-12 09:04:18 -08:00
Kevin Zakka 4b8363de6d Update docs with new Menagerie models.
PiperOrigin-RevId: 606126764
Change-Id: I677e7860798e60b2b65d7054f60ad2bc5c4c05b1
2024-02-11 20:42:59 -08:00
Yuval Tassa 4ad1dc4b84 Mention the roles of "center" and "extent" in visual/global/{azimuth,elevation}. Fixes #1407.
PiperOrigin-RevId: 605649532
Change-Id: I0ca0142a3c164a502fefb6b91d204c4bb3d25a95
2024-02-09 09:22:50 -08:00
Erik Frey e77c3cb258 Update MJX viewer to use mjx.get_data_into and fix bad function parameters.
PiperOrigin-RevId: 605461208
Change-Id: I7a4f6a1ed92382e522d50224e7b5cd73d8842750
2024-02-08 16:32:27 -08:00
Erik Frey 4933a2c7b6 Improve performance of getting and putting MJX device data by reducing cost of ncon.
PiperOrigin-RevId: 605454760
Change-Id: I5c52a84c12ab67d042fe43f6ada284b51a762294
2024-02-08 16:06:58 -08:00
Erik Frey 3e2d62c248 Improve performance of getting and putting MJX device data with large numpy arrays.
ndarray.tobytes() is faster than converting arrays to tuples by orders of magnitude.

PiperOrigin-RevId: 605437697
Change-Id: I7d42c10e178b1aec80ff38a82e863e0701c15e62
2024-02-08 15:02:21 -08:00
Erik Frey 38cbc9e543 Improve MJX performance on NVIDIA GPU by enabling Triton GEMM.
PiperOrigin-RevId: 604691509
Change-Id: Iba11a9e1b79848624a1ef6eb4e61e2093d36e662
2024-02-06 10:31:49 -08:00
Meghha Dhoke f763254a00 Updating Mujoco Release version number to v3.1.3
PiperOrigin-RevId: 604459311
Change-Id: I766f704c28740cf751cb935bb48fb6954fccf024
2024-02-05 15:59:20 -08:00
Meghha Dhoke 81adba763e Update title - Version number and date to Version 3.1.2 (February 05, 2024)
PiperOrigin-RevId: 604371807
Change-Id: I55638fea18e05a322a99332f020f255be218c763
2024-02-05 11:04:33 -08:00
Nimrod Gileadi 41ad07c4ff Fix numbering in changelog.rst
PiperOrigin-RevId: 604347513
Change-Id: Id9dda4d6de2dc0a6175a8c6137a4b99b1ebe947e
2024-02-05 09:50:19 -08:00
Copybara-Service 55cbbd00af Merge pull request #1381 from ryanwhite04:patch-1
PiperOrigin-RevId: 604293006
Change-Id: Ic81506e82c11c789df95e688ca590769aa88d964
2024-02-05 05:57:19 -08:00
Yuval Tassa 2bbf5424e4 Improve option/actuatorgroupdisable documentation.
PiperOrigin-RevId: 604266156
Change-Id: I7fd112085fc46214173628db8ebfd295e13df342
2024-02-05 03:26:52 -08:00
Tom Erez ced37ffbb2 Add refsite to list of non-defaultable attributes.
PiperOrigin-RevId: 604195547
Change-Id: Id14b5b571e320f995a38d2ad16f3325c70d37d78
2024-02-04 20:47:23 -08:00
Saran Tunyasuvunakool fe57ae498f Fix typo and improve code snippet in documentation for user_scn.flags.
PiperOrigin-RevId: 603685657
Change-Id: Ia6af7a62db3d8955048fae4cbc30209bb1f7efd7
2024-02-02 07:50:38 -08:00
Saran Tunyasuvunakool 7bb0ce4211 [Python Viewer] Allow users to override rendering flags via user_scn.
Fixes #1190

PiperOrigin-RevId: 603672602
Change-Id: I3ff1bb0dca7e913b36f1b241aaea8b8bb95cadff
2024-02-02 06:39:08 -08:00
Yuval Tassa 58e9fb0baa Docs: fix link to slider-crank example model.
PiperOrigin-RevId: 603400948
Change-Id: I49e4a58ba0cd450950a35cccb749f04d34190cfc
2024-02-01 09:56:37 -08:00
Ryan White 38b441b777 Update XMLreference.rst
eq_active is a member of mjData, not mjModel
2024-01-31 19:45:19 +08:00
Baruch Tabanpour 508669a9f2 Raise not implemented for frictionloss for now. #1344
PiperOrigin-RevId: 602453907
Change-Id: I0ea506b54f96c4fadc0f29f9ed0a21b0b6a7e5d9
2024-01-29 11:45:36 -08:00
Yuval Tassa e143b3dbc0 Allow height-field elevation data to be specified in XML.
PiperOrigin-RevId: 602374498
Change-Id: I2d3364d68876a35799b24aca1051e2f5aebdda75
2024-01-29 06:59:28 -08:00
josephrocca e6847f843d Copybara import of the project:
--
18821cb87ded727ef38e1bac8ba8561b19632899 by josephrocca <1167575+josephrocca@users.noreply.github.com>:

Ellipsoid has 3 sizes rather than one

COPYBARA_INTEGRATE_REVIEW=https://github.com/google-deepmind/mujoco/pull/1374 from josephrocca:patch-1 18821cb87ded727ef38e1bac8ba8561b19632899
PiperOrigin-RevId: 602370557
Change-Id: I014226a1cbae926c8ad02f27b706fa0b3e8f2c8e
2024-01-29 06:39:53 -08:00
Yuval Tassa 70021a7236 Improve ordering of asset documentation, sort by category and usefulness.
- Old: texture, hfield, mesh, skin, material.
- New: mesh, hfield, skin, texture, material.

Rationale: First 3D assets, then surface assets. Mesh is the most common asset type. Materials reference textures so should come right after.
PiperOrigin-RevId: 602075615
Change-Id: I13e4404640184fb0717a442827cd76da31705648
2024-01-27 17:24:31 -08:00
Yuval Tassa 669ee0ee48 Fix migration instructions for option/collision.
Fixes #1367.

PiperOrigin-RevId: 601754379
Change-Id: Ifb0b8fab4da44e161e463a71eec050c6635f3340
2024-01-26 07:03:00 -08:00
Erik Frey 0a7be1732c Adds support for explicit dense/sparse mass matrices to MJX.
This increases performance, particularly for the Newton solver on TPU.

PiperOrigin-RevId: 600696483
Change-Id: If69bb9a2e21ba8dad6ca23f093ce7b7ceae644ff
2024-01-23 00:32:07 -08:00
Yuval Tassa aceb52bd09 Improvements to mujoco.rollout:
- `mjSTATE_FULLPHYSICS` as state spec, enabling divergence detection by inspecting time.
- User-defined control spec.
- Stop squeezing: outputs always have dim=3.

PiperOrigin-RevId: 600445256
Change-Id: I4466e88929cb7081e1c94968a5cfe10485bb7475
2024-01-22 07:01:53 -08:00
Yuval Tassa e0864ab7f2 Fix formatting bugs in changelog.
PiperOrigin-RevId: 599815807
Change-Id: I67d3eb2fd30c94a9d498ba605243e0b87b1d4ca8
2024-01-19 06:29:26 -08:00
Yuval Tassa fea7c10b95 Add bvhactive flag to visual/global. Fixes #1279.
PiperOrigin-RevId: 599778272
Change-Id: If5530629035cc68b198447503388f59a04041b13
2024-01-19 02:59:56 -08:00
Yuval Tassa 2feefbc5d2 Remove fine-grained timing from narrow-phase collision functions, delete mjTIMER_COL_MID.
PiperOrigin-RevId: 599225419
Change-Id: Ieca166753c20a0abf660e2821b2844dda8758951
2024-01-17 10:54:23 -08:00
Baruch Tabanpour edc254b213 Update MJX doc for #1344.
PiperOrigin-RevId: 599220357
Change-Id: I532f42ed086da59632eeaac0dcd3de6ffcf93cd4
2024-01-17 10:38:53 -08:00
Yuval Tassa a14a584f1d Fix bug in muscle length-gain curve. Fixes #1342
PiperOrigin-RevId: 599165049
Change-Id: Ic5ef77b4349a8a9c343eacfd781195bfebea9aca
2024-01-17 07:20:01 -08:00
Yuval Tassa 67a00a3a51 Rename mjMAXTHREADS -> mjMAXTHREAD (consistency).
PiperOrigin-RevId: 599130235
Change-Id: Ia80379b8ae0574a7cd8fbc668657f806e90d6c5c
2024-01-17 04:33:44 -08:00
Baruch Tabanpour a02fc405af Add naive ray mesh implementation.
PiperOrigin-RevId: 598993152
Change-Id: I708505bf20a89d5a4840451a11b99771195003e6
2024-01-16 16:29:11 -08:00
Yuval Tassa 45208a5fe0 Update Sphinx from 4.5.0 to 5.3.0 fixing broken docs build.
PiperOrigin-RevId: 598875231
Change-Id: I3295e9aa94087d44a695c7d380bbf9691a3d82b3
2024-01-16 10:04:16 -08:00
Yuval Tassa 3c1907e678 Fix rendering of links in documentation.
PiperOrigin-RevId: 598855374
Change-Id: I19c1ef73d23f0c2fedb8f0a6754bb9edd91f4c20
2024-01-16 08:54:38 -08:00
Alessio Quaglino 1e2e0b3053 Remove all visual-only assets if discardvisual is selected, not only the geoms.
PiperOrigin-RevId: 598598250
Change-Id: I12e60ce41ad436d037b4877d197decf6bdce0fc8
2024-01-15 06:39:25 -08:00
Baruch Tabanpour d4e8070a3f Update doc about MJX meshes, fixes #1325.
PiperOrigin-RevId: 597342387
Change-Id: Iccb47b4b57adf2392fa5c5a38b2a28e87ace1e3d
2024-01-10 13:36:45 -08:00
Yuval Tassa 8247ddea0b Recommend fTetWild for tetrahedral meshing in the docs.
PiperOrigin-RevId: 596918194
Change-Id: I0357739c8741a7b9fc4614c5ed7ea7fefc0fb42c
2024-01-09 06:50:10 -08:00
Yuval Tassa b643c08c0d Recommend CoACD for convex mesh decomposition in the docs.
PiperOrigin-RevId: 596917392
Change-Id: I3fa6d22b879bf6b4d16e037bb2b8896df8d682a2
2024-01-09 06:45:37 -08:00
Yuval Tassa 5308b485dc Improve dark mode behavior of arrowhead matrix image.
PiperOrigin-RevId: 596341192
Change-Id: Id1f8cb500c6042d699dd5fd8ec55b61b17443e20
2024-01-07 01:23:03 -08:00
Yuval Tassa c79e1e5d01 Add documentation image variants compatible with dark mode. Fixes #587
PiperOrigin-RevId: 596265596
Change-Id: Iedd076fbb7a6dca77a91e52e538be1c764d1f8fb
2024-01-06 14:02:34 -08:00