Commit Graph

323 Commits

Author SHA1 Message Date
Baruch Tabanpour e9709900b4 Add gravcomp.
PiperOrigin-RevId: 627791303
Change-Id: I87c9254967eb492d0c38153ff41d7458ffb69136
2024-04-24 11:19:34 -07:00
Baruch Tabanpour d15db54537 Add support functions for id2name and name2id.
PiperOrigin-RevId: 627525330
Change-Id: Ic8069f64c94ef4b8f96f62b88ece62a8b296d870
2024-04-23 15:35:59 -07:00
Erik Frey 71333938ec Add support for condim to MJX.
PiperOrigin-RevId: 627136131
Change-Id: Ia62eb20cb80395b569c7fc7f4d4ef87e12eaaf40
2024-04-22 13:20:57 -07:00
Yuval Tassa 546a27ca72 Fix memory allocation error when memory size is larger than 2G. Fixes #1606
PiperOrigin-RevId: 627058355
Change-Id: Iebef647a0107d1f112a876d705f5b3ea888b4a41
2024-04-22 09:15:46 -07:00
Yuval Tassa caf215e342 Add metallic and roughness scalar attributes to materials.
Rename `light_radius` -> `light_bulbradius`, make the default value 0.02.

PiperOrigin-RevId: 627032170
Change-Id: I1e01e2eca028c0aefc2e7dc384e8b34abac184aa
2024-04-22 07:39:06 -07:00
Alessio Quaglino c2d0c5dd1b Add cylinder collisions using SDFs.
PiperOrigin-RevId: 626998709
Change-Id: I669a639b1cabf5ed522c73a07e54684d675fa396
2024-04-22 05:07:43 -07:00
Erik Frey 718e079cba Fix bad changelog formatting.
PiperOrigin-RevId: 626497821
Change-Id: I705b691b5ad985889a9b05da8c775df42b3811d6
2024-04-19 16:28:43 -07:00
Erik Frey 3b64217b96 Remove deprecated mjx.device_* functions. They are not suited to upcoming condim support.
PiperOrigin-RevId: 626486447
Change-Id: Ibd41874bb3903123567168ebbac563399788d2f2
2024-04-19 15:34:28 -07:00
Erik Frey a4df912018 Prepare MJX for condim.
This is a refactor of collision_driver and some of its surrounding code in order to prepare for condim in MJX.  In this change we reify types that are needed for condim: dim, efc_address, efc_type.  We make explicit the way contacts are organized and grouped to guarantee that dim and efc_type are statically defined.

This change simplifies the way meshes are organized on device and slightly speeds up mesh collisions for cases where a single mesh is instanced across many geoms.

PiperOrigin-RevId: 626119500
Change-Id: Ic0c8599bcda2326f2e19cd3246a673e56097886b
2024-04-18 12:43:36 -07:00
Yuval Tassa 2b4975811b Fix bug in Python binding of mj_saveModel
PiperOrigin-RevId: 625655183
Change-Id: I80d3390d739a8d6e280343087b79c15b543ff50a
2024-04-17 05:58:50 -07:00
Alessio Quaglino 4b6c07cd7d Prevent bodies from overwriting the frame names in xml_native_writer.
PiperOrigin-RevId: 625632369
Change-Id: If3bd048ac40e116fcb97beb3dca3d99826fe4ad0
2024-04-17 04:07:50 -07:00
Yuval Tassa 6481a838c8 Fix monospace rendering in changelog.
PiperOrigin-RevId: 625388305
Change-Id: I82c7cd0e221627a14f6a2b2d9285099f488b1dcb
2024-04-16 11:00:57 -07:00
Google DeepMind f086dc9b4b Better parsing for GMSH2.2
PiperOrigin-RevId: 625267106
Change-Id: Iecf767c43cee1067fdab3859df28050f8a365e2b
2024-04-16 03:23:52 -07:00
Yuval Tassa 0cd28d2423 Add light radius attribute.
Also fix bug: light defaults were not being saved.

PiperOrigin-RevId: 625142278
Change-Id: I8ec3a5a06e9f314e98b7c34346db3c24b34d7e0b
2024-04-15 17:55:15 -07:00
Baruch Tabanpour 0fa0437313 Add cylinder plane.
PiperOrigin-RevId: 625099227
Change-Id: I02cb86c3e8c7fd5914a082f1e8a3bae6274b3c8e
2024-04-15 15:18:04 -07:00
Yuval Tassa 7b3f1a0261 Add mjModel.mesh_scale: scaling applied to asset vertices.
PiperOrigin-RevId: 625083195
Change-Id: I36290282379e57ad23ec771d65d1bd6bf2a75b07
2024-04-15 14:26:06 -07:00
Yuval Tassa 6d1f0a3ec6 Fix rendering bug in changelog
PiperOrigin-RevId: 623553343
Change-Id: Ice48c450de19065069c50242a26396ee7bf1b363
2024-04-10 11:23:26 -07:00
Gabe Oppenheimer 32fa61731e Update the MuJoCo changelog for the 3.1.4 release
PiperOrigin-RevId: 623527462
Change-Id: I45f76d57198f4906e932463d76287b0e394b9273
2024-04-10 10:01:24 -07:00
Yuval Tassa 5a365603f8 Add mju_euler2Quat.
PiperOrigin-RevId: 623469398
Change-Id: Ia86b29a764018cd4c3bc57d23616bed7393081f5
2024-04-10 06:02:50 -07:00
Alessio Quaglino 2b3f336bd3 Add ellipsoid sdf collisions to MJX.
Co-authored-by: Baruch Tabanpour <btaba@google.com>
PiperOrigin-RevId: 623415479
Change-Id: Id061c8e083357d063f1ccddf0989f2fafe415eed
2024-04-10 01:41:10 -07:00
Tom Erez 725630c95d Add insertion task.
PiperOrigin-RevId: 622962761
Change-Id: I960fc9c2a13a6216da03a8fa9b29ce7a55b6da4a
2024-04-08 15:08:06 -07:00
Tom Erez b441923598 Add userdata support to MJX.
PiperOrigin-RevId: 622948369
Change-Id: I5eca0afcb8cd50f53eacc57a78bfdf68ccde12e7
2024-04-08 14:14:12 -07:00
Gabe Oppenheimer bb4389eb43 Update MuJoCo changelog.rst for the v3.1.4 release
PiperOrigin-RevId: 622870642
Change-Id: Ie45077659520cdae14604842ec8b0cc715e18fd6
2024-04-08 09:33:57 -07:00
Yuval Tassa b85f419fcb Add video with clips from least-squares tutorial to docs.
PiperOrigin-RevId: 620144313
Change-Id: I79faa6a1446e9e6c88e16a238029f45c518c16d1
2024-03-28 21:00:14 -07:00
Yuval Tassa 5d26b50fce Remove native sensor noise sampling.
PiperOrigin-RevId: 620075316
Change-Id: I6a0a1d63834e7c8bfd290f89d86fea791d794739
2024-03-28 15:33:03 -07:00
Yuval Tassa 47ba72ea59 Add actuatorgravcomp joint attribute, to treat gravity compensation forces as applied by actuators, rather than passive buoyancy.
PiperOrigin-RevId: 620049593
Change-Id: I2c8a9dc152c087b408e4f904838034271a7dd910
2024-03-28 14:01:52 -07:00
Google DeepMind 4f0293c6cb Added support for msh2.2
Now we can load flex with format 2.2 binary and ASCII.
There are two different parsing strategies. One for gmsh app and the other is for ftetwild.

Used the shark model from Scanned Objects by Google Research:
https://app.gazebosim.org/GoogleResearch/fuel/models/Weisshai_Great_White_Shark

PiperOrigin-RevId: 619229499
Change-Id: I6eb876afcbc8a00631914b093c45bde10c0caaf6
2024-03-26 10:12:13 -07:00
Yuval Tassa bb42ff1657 Fix order of enable flag strings. Before this change, using the UI to toggle the "InvDiscrete" and "Sensornoise" flags would toggle the opposite flag.
PiperOrigin-RevId: 618658133
Change-Id: I35d4b9da2fdf68fed24efd518a30af60d3a806eb
2024-03-24 13:13:21 -07:00
Baruch Tabanpour 2386353b02 Throw an error for margin/gap with meshes.
PiperOrigin-RevId: 615937263
Change-Id: I3289cf1b1fec93385cc78a01e53866427453db59
2024-03-14 16:21:05 -07:00
Erik Frey 02c62c118c Fix bug where treedef for mjx.make_data doesn't match mjx.put_data.
PiperOrigin-RevId: 615928973
Change-Id: I08af97ac0300b9d51c1f4b46d48dde98d24197fa
2024-03-14 15:51:15 -07:00
Baruch Tabanpour f2e107f7aa Fix deep penetration for sphere/capsule-convex.
PiperOrigin-RevId: 615539264
Change-Id: I6a5aac0574ddcb39bae8aafaf63f9561ca69288b
2024-03-13 14:12:42 -07:00
Yuval Tassa adc4b92c1b Document nonlinear least-squares tutorial.
PiperOrigin-RevId: 615496587
Change-Id: I97975a4dc99a599afd1eb6964d0ca0cf3d9fcc0e
2024-03-13 11:56:42 -07:00
Baruch Tabanpour 22cd96fbbc Speed up convex-convex collisions.
PiperOrigin-RevId: 613450874
Change-Id: Ie66e0a078e2ff51a136b949dd9459847e1fe957d
2024-03-06 21:48:51 -08:00
Meghha Dhoke eb2e064915 Updated version number to match the latest release v3.1.3 and date for mujoco release v3.1.3
PiperOrigin-RevId: 612899279
Change-Id: I891a2a86a3d03491210e1dc259549d6484041928
2024-03-05 10:55:21 -08:00
Copybara-Service 6b7d714291 Merge pull request #1450 from v-r-a:angmomMat
PiperOrigin-RevId: 612835207
Change-Id: I8e7b01cc433563556a3ae4bbdd0c53612cc15e97
2024-03-05 07:35:15 -08:00
Alessio Quaglino 49ddb7ca2e Update changelog for 3.1.0.
Fixes #1472.

PiperOrigin-RevId: 612787350
Change-Id: Ia5609266462b5d537ce0c03efa764f1f32bc9389
2024-03-05 04:13:52 -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
Baruch Tabanpour 419be4c605 Add crude broadphase impl.
PiperOrigin-RevId: 611643683
Change-Id: Id7816dadd7e9f1b8855268b815353c61540c4e0c
2024-02-29 17:12:58 -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
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 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
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
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
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
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