Commit Graph

2536 Commits

Author SHA1 Message Date
Yuval Tassa 4c066a26b5 Change mjVISSTRING of connect and weld equality constraints from "Constraint" to "Equality". This is more consistent with the 'E' shortcut key and with mjDISABLESTRING ("constraint" means all constraints, "equality" means bilateral constraints).
Also remove unused ampersands from `mjVISSTRING` names, these are a remnant from a very old version of the UI framework.

PiperOrigin-RevId: 593469811
Change-Id: I0f6f73c9f5d2c61b2280f395f76434b0710ce4f3
2023-12-24 12:06:59 -08:00
Bálint Hodossy 2c024164ea Edit hfield_data in Unity 2023-12-21 16:04:25 +00:00
Bálint Hodossy 1028051d1a Merge branch 'main' of https://github.com/google-deepmind/mujoco into feature/unity-hmap-dyn
Merge with main to keep branch up to date
2023-12-21 11:45:49 +00:00
Nimrod Gileadi 2a46ca3787 Update the documentation on the maximum number of contacts from hfield collisions.
The docs were incorrectly asserting that the limit is 9 contacts, which hasn't been true since version 1.5.

This fixes #1285.

PiperOrigin-RevId: 592526249
Change-Id: Id45d73666fec8dcfd18d11605975e787f2cfeba2
2023-12-20 05:03:35 -08:00
Baruch Tabanpour 77b4132c47 Add site transmission to MJX.
PiperOrigin-RevId: 592373042
Change-Id: I54d941f4ee6f74404fe2aea7253f5b426d097e23
2023-12-19 16:19:17 -08:00
Bálint Hodossy d0b505c67b Reformat scripts to better follow guidelines 2023-12-19 13:54:49 +00:00
Baruch Tabanpour 80f50c943c Add filterexact to MJX.
PiperOrigin-RevId: 592026712
Change-Id: Ia73d67f36db5a4a1786a2532b5daa9e9a36f714c
2023-12-18 15:29:18 -08:00
Google DeepMind 7fb448613f Post release version update: Update to V3.1.2
PiperOrigin-RevId: 592019826
Change-Id: I64fd7da628bf3312ede4970b9b10ef5d0cc75b45
2023-12-18 15:03:37 -08:00
Baruch Tabanpour 1c31676e2d Fix formatting error.
PiperOrigin-RevId: 592018049
Change-Id: If0b59d18c380997c4c94795e275b56d2f6293c22
2023-12-18 14:57:15 -08:00
Google DeepMind 3ed81f864c Update version number in third_party/mujoco/doc/changelog.rst for v3.1.1
PiperOrigin-RevId: 591962782
Change-Id: I7c498e1339013e9207ef8c21e793c1d80f55d16d
2023-12-18 11:35:28 -08:00
Yuval Tassa d39ed1d3c8 Update changelog.
PiperOrigin-RevId: 591932297
Change-Id: I9131400fee6839e9311baf28a069fc1e7237ee86
2023-12-18 10:05:27 -08:00
Nimrod Gileadi 7cb7c87f70 Fix a few issues with the passive viewer.
1. Create an arena for the mjData instance used by the passive viewer visualization.

When using the passive viewer, stuff gets copied from the real mjData into a minimal struct.
That struct didn't have a stack, and now visualization for Flex does stack allocs.

2. Add missing a missing field in scene state for flex visualization.

3. Fix a memory leak where mjvScene wasn't released on exit in the passive viewer.

4. Add some locks in places where the render thread and Simulate::Sync collide.

This fixes #1280.

PiperOrigin-RevId: 591891676
Change-Id: I592f286cab9719c8d9af84e42f9756ea1f9f1971
2023-12-18 07:33:19 -08:00
Nimrod Gileadi 8ecb16abfa Don't run particle.xml in testspeed_test under ASAN.
Reduce the number of steps for a couple of other slow tests.

PiperOrigin-RevId: 591844569
Change-Id: If722567b91163f1f3c451302f9543a43d05872a1
2023-12-18 03:33:59 -08:00
Yuval Tassa dc0d0c59d4 Fix bug in simulate where the "LOADING..." label was not properly showing.
PiperOrigin-RevId: 591257979
Change-Id: Id09754b1e5a87decfb68b9fe305388aa8f0f5ed3
2023-12-15 08:12:28 -08:00
Yuval Tassa 38fa756a20 Add mjGEOM_LINEBOX, used in visualization of collision trees.
PiperOrigin-RevId: 591224734
Change-Id: I09ad8c4b711021ff4dd5548ba5381d25d5a3d7f8
2023-12-15 05:36:35 -08:00
Yuval Tassa f2a967348c Fix bug introduced in 7942fe957e
That change removed some spurious contacts returned by mjc_BoxBox, but also removed some desirable contacts that occur during very deep penetration of two boxes (when one box is completely inside another box). This is now fixed.

PiperOrigin-RevId: 591036252
Change-Id: I84b51f2179fd6fe29618a4e908e86934c6fc6941
2023-12-14 13:30:38 -08:00
Kyle Bayes 9f6be3135e Modify mjListKeyMap to be a fixed-size array, and add internal object_lists variable to mjCModel to remove redundant code.
PiperOrigin-RevId: 590997348
Change-Id: I5f4d7de605f44d40a75eb1e9ceec208325fa3be5
2023-12-14 11:12:01 -08:00
Erik Frey 0915d69c3f Correctly transform site_xmat in MJX get_data/put_data.
PiperOrigin-RevId: 590750273
Change-Id: I836e1f5d20725ed9b93bf86fe3e8e61954a56b47
2023-12-13 16:34:42 -08:00
Yuval Tassa da211ddf29 Improve description of the collision detection pipeline.
PiperOrigin-RevId: 590742091
Change-Id: Idfcc37cece21dcf46401a147a43aa8ec4eeb05aa
2023-12-13 16:06:30 -08:00
Copybara-Service 11dae6e3a9 Merge pull request #1206 from Balint-H:feature/mouse-spring-qol
PiperOrigin-RevId: 590741248
Change-Id: I0228a2e6a27fd869f34f3e96163cd29e5ac99f35
2023-12-13 16:04:24 -08:00
Google DeepMind c2c76195dd Updating Mujoco Release version number to v3.1.1
PiperOrigin-RevId: 590712172
Change-Id: Ibf32322222212c1bf098e75bbb2e145344c57b93
2023-12-13 14:26:08 -08:00
Yuval Tassa 537d649e95 Improvements to transmission documentation.
PiperOrigin-RevId: 590694542
Change-Id: I9dc25655116c9300061095c2a2b701530bbbbeca
2023-12-13 13:22:40 -08:00
Copybara-Service 4bbb19144e Merge pull request #1275 from TyLindberg:patch-1
PiperOrigin-RevId: 590693053
Change-Id: Ie1ec8edc2681050f089f150a775612fc8449d948
2023-12-13 13:17:12 -08:00
Yuval Tassa 1c34553631 Add shortcuts for power function in impedance computation.
PiperOrigin-RevId: 590692245
Change-Id: I1a49475c9a8299f4845e4ec33c9a7ce21a9c5d2b
2023-12-13 13:14:27 -08:00
Yuval Tassa 5b2c98f8f1 When saving XMLs, don't round floats that are bigger than INT_MAX. Fixes #1278
PiperOrigin-RevId: 590692020
Change-Id: Icd11d20f47bc4163eb4378f4cb031b8fd9d13612
2023-12-13 13:13:15 -08:00
Tyler Lindberg b82c382c53 Use positional arguments with jp.where 2023-12-12 16:28:36 -08:00
Baruch Tabanpour 0d37670698 Fix eigen3 commit hash.
PiperOrigin-RevId: 590335535
Change-Id: I90819d420e5ef54dfc5b202ce0407e1ea833a8a4
2023-12-12 14:22:45 -08:00
Google DeepMind 0df1c9c733 Updated version number in cmakelist, mujcodepencies.cmake for v 3.1.0
PiperOrigin-RevId: 590312529
Change-Id: Ie4fb2a76f88d5032c53365995a2bb7b691485e96
2023-12-12 13:17:35 -08:00
Google DeepMind 89d15c48e8 Update version number in third_party/mujoco/doc/changelog.rst for v3.1.0
PiperOrigin-RevId: 590258202
Change-Id: I1220eb48e7c3871fdf785cf74819aca12d0c75c0
2023-12-12 10:42:22 -08:00
Google DeepMind fcebdf4d09 Update MuJoCo to v3.1.0 for release.
PiperOrigin-RevId: 590256664
Change-Id: I42ad788d609dde0ff00b13a2e456b2a8d3d9e952
2023-12-12 10:37:47 -08:00
Kevin Zakka 53883ce86a Add a close() method to mujoco.Renderer which explicitly frees the gl context.
PiperOrigin-RevId: 590221484
Change-Id: I07392f9c53f662a37a57ab23acfef9aa5a98a49b
2023-12-12 08:59:46 -08:00
Nimrod Gileadi e3df84ec3f Include the size limit in error message from mjr_addAux.
This is to help debug #1274.

PiperOrigin-RevId: 590215990
Change-Id: I356675be84f9cb2892d31d4dc7639adf49fe4a0f
2023-12-12 08:41:10 -08:00
Yuval Tassa 35f095d7c5 When paused in simulate, add index of history scrubber if not 0.
PiperOrigin-RevId: 590184966
Change-Id: Id0914c41a1339cf71ebdea02ec486c52c3d37179
2023-12-12 06:43:37 -08:00
Yuval Tassa 28a9e6d9a2 Add mjNOBJECT value to mjtObj enum.
PiperOrigin-RevId: 590164716
Change-Id: I500741aa4fb97fe2c4f5d2086188bb2c9fdfd1a0
2023-12-12 05:15:00 -08:00
Yuval Tassa 64c33cefcf Correct formula for solref direct stiffness. Fixes #732.
PiperOrigin-RevId: 590144795
Change-Id: I94def777c7456243509374caecea2a335859f1f2
2023-12-12 03:56:18 -08:00
Nimrod Gileadi aed4254d65 Fix the table formatting in plugin/actuator/README.md.
The line continuation format that was used is not supported on GitHub.

PiperOrigin-RevId: 590141362
Change-Id: I0ab0dabfb8977bdf79682476376dda435787eba0
2023-12-12 03:42:45 -08:00
Copybara-Service 5c8f22609a Merge pull request #1263 from limymy:main
PiperOrigin-RevId: 589857317
Change-Id: I5f241f5c798811b0d082ba4bed9ca8c8233e4052
2023-12-11 09:59:59 -08:00
Yuval Tassa 07e05b4c55 Fix typo. Fixes #1221
PiperOrigin-RevId: 589835888
Change-Id: Iacedbe642709d5fbd43b7f0f1f9daa6447ce6155
2023-12-11 08:42:06 -08:00
Bálint Hodossy 315a2f334f Fix whitespace in reformatted code from GitHub 2023-12-11 14:57:40 +00:00
Bálint Hodossy 28f19fbe7c Merge branch 'feature/unity-hmap-dyn' of https://github.com/Balint-H/mujoco into feature/unity-hmap-dyn
Merge in format from GitHub
2023-12-11 14:56:19 +00:00
Bálint Hodossy af133f4022 Fix whitespace placements 2023-12-11 14:54:55 +00:00
Yuval Tassa 1885d518eb Use the string (rot:lin) in mjdata.h to clarify where 6D motion vectors use the Featherstone convention. Also add clarifying text to the appropriate note in the documentation.
Fixes #982.

PiperOrigin-RevId: 589556339
Change-Id: I3e7ff185a089715a386694321d4b89d09d481cf9
2023-12-10 03:27:44 -08:00
Yuval Tassa b22919543d Fix bugs related to saving of <statistics> values.
Before this change:
- User-modified values of `mjModel.stat.{meanmass, meaninertia}` would not be saved to XML.
- Non-user-modified values of `mjModel.stat.{meansize, extent, center}` would always get saved to XML.

After this change values are saved to XML only if provided by the user, either in the XML or by changing values in `mjModel` before saving.

PiperOrigin-RevId: 589473351
Change-Id: I4dcf4892ef61c35edf424226e731232d861bad8d
2023-12-09 16:06:39 -08:00
Baruch Tabanpour e7d637f375 Fix issue with foot vel in MJX notebook
PiperOrigin-RevId: 589276253
Change-Id: I2c8c24e42d037d8c59667364a298f8b669d779b6
2023-12-08 16:44:36 -08:00
Copybara-Service 263451a3f2 Merge pull request #1267 from JamieMair:updated-3rd-party-mujoco-bindings
PiperOrigin-RevId: 589268337
Change-Id: Ia3f3c392f6df5a6d778b2e0b1f9278195b0a42c3
2023-12-08 16:11:49 -08:00
Yuval Tassa 7942fe957e Circumvent bug in mjc_BoxBox.
The box-box collider sometimes outputs bad contact points which are far outside one of the two boxes. This happens at configurations which are very rare numerically, but rare configurations (e.g. perfect box alignment) are often induced by the designer and the physics, making them actually not-so-rare.

Since the box collision functions are very difficult to understand, we circumvent the issue by extending the post processing code to detect and remove such contacts.

PiperOrigin-RevId: 589178197
Change-Id: I82b8a888ef04f9196111c960757e3314d0ab6d8e
2023-12-08 10:39:27 -08:00
Alessio Quaglino a006b15958 Add map from objects names to their index.
Also some minor cleanup of repeated code in user_model.

PiperOrigin-RevId: 589135294
Change-Id: I16f22c4dbdde961cedc042af3bdc9d3577d33459
2023-12-08 08:14:16 -08:00
Alessio Quaglino 623201ec76 Throw error if scale attribute is used with an SDF.
Fixes #1210.

PiperOrigin-RevId: 589101807
Change-Id: I3f2796de3438fbcdaf9221bddc5c9bd82aedb7cb
2023-12-08 05:41:22 -08:00
Yuval Tassa b1a912e9e2 Improve readability of test.
PiperOrigin-RevId: 589048504
Change-Id: I5087cfd67481df90103da2d7f5f06e421fc28e11
2023-12-08 01:18:59 -08:00
Alessio Quaglino 1db0a9946f Fix frame accumulation order for <frame> meta-element.
PiperOrigin-RevId: 588803425
Change-Id: Id0289c34d1a6cfb6007540a29cc1f32d879e43ed
2023-12-07 08:37:20 -08:00