Commit Graph

533 Commits

Author SHA1 Message Date
Erik Frey feb92bf535 MJX ray for planes, spheres, capsules, and boxes.
PiperOrigin-RevId: 596004453
Change-Id: I6c15268f7ec6afc1aadd370a78ef225ab9c5fd04
2024-01-05 08:42:17 -08:00
Yuval Tassa 7ce05f4957 Improve documentation of solver parameters.
PiperOrigin-RevId: 595723619
Change-Id: I00b67eaec02d2e85ce60fb44eb3e582ce036be3a
2024-01-04 09:17:31 -08:00
Alessio Quaglino 63ec34f9f8 Add plugins to flex parent body if there are pinned vertices.
Fixes #1270.

PiperOrigin-RevId: 595429578
Change-Id: Ifc61d4bde4dd3c6b4d4a09106152de1d24e71ef0
2024-01-03 09:53:22 -08:00
Yuval Tassa 6860e953ed Improve docstring of mju_eig3.
PiperOrigin-RevId: 595380013
Change-Id: Ia3663c11ff1cd50a35d5d72ba01e09ff3d9054d0
2024-01-03 06:04:08 -08: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
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
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 da211ddf29 Improve description of the collision detection pipeline.
PiperOrigin-RevId: 590742091
Change-Id: Idfcc37cece21dcf46401a147a43aa8ec4eeb05aa
2023-12-13 16:06:30 -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
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
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
Yuval Tassa 07e05b4c55 Fix typo. Fixes #1221
PiperOrigin-RevId: 589835888
Change-Id: Iacedbe642709d5fbd43b7f0f1f9daa6447ce6155
2023-12-11 08:42:06 -08: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 762371c3e4 Add kv damping attribute to position and intvelocity actuator shortcuts.
PiperOrigin-RevId: 588377097
Change-Id: I8ded2ff982e52ed8673019979e29b706ef65c743
2023-12-06 04:28:30 -08:00
Kevin Zakka 899ba4b7ec Add missing period in documentation.
PiperOrigin-RevId: 588127219
Change-Id: Ib39808f303cebb6c619d1119024e9a1352326473
2023-12-05 11:02:26 -08:00
Nimrod Gileadi 3c05f9fafc Add a note to future change log about releasing 10.16 macOS wheels.
This change relates to #1213, and should fix it when we push the next release.

PiperOrigin-RevId: 588099974
Change-Id: Ic1c4164f8a6400e92b5f509c3e03ff9fbc1c6033
2023-12-05 09:39:52 -08:00
Matthew Bennice c0b7b9873d Store paths for hfields, textures, and skins similar to meshes.
PiperOrigin-RevId: 587283093
Change-Id: Ie6d8d2ecb185697a27d1b6f7fca1312df006af12
2023-12-02 03:51:25 -08:00
Erik Frey 67fa7c1dc2 Add put_model, put_data, and get_data to MJX.
These io functions replace device_put, device_get_into. These new functions correctly copy intermediate fields such as efc_J, which the old functions could not.

PiperOrigin-RevId: 586712273
Change-Id: Ia3a4104af17db2ebd41b41a2ca501c5de9ac5d05
2023-11-30 10:14:46 -08:00
Yuval Tassa 822b03446c Improve pipeline documentation, expose mj_implicit function to public header.
PiperOrigin-RevId: 586380774
Change-Id: I3fafa563ebc852e17e1233288455b96f4499027b
2023-11-29 10:18:57 -08:00
Alessio Quaglino 7d8d4d398e Make elasticity plugins compatible with flex pins. Fixes #1235.
Before change:
poncho       18.20s
poncho_flex  44.60s
floppy       4.70s
floppy_flex  6.43s

After change:
poncho       18.23s
poncho_flex  44.62s
floppy       4.67s
floppy_flex  6.57s

PiperOrigin-RevId: 585952587
Change-Id: I0e7c1513f64c7ab1e6ad71e2168b4467c042b46f
2023-11-28 06:13:43 -08:00
Baruch Tabanpour 35c90844ae Add sites to MJX.
PiperOrigin-RevId: 585691582
Change-Id: I6cc594daf436231f91534f137ff259e7b39811d9
2023-11-27 10:28:50 -08:00
Yuval Tassa ca046cbf64 Fix rendering bug in changelog.
PiperOrigin-RevId: 585627863
Change-Id: I238b9d7eb13dbc8660f15f45efe6a84ccbb84c66
2023-11-27 05:59:53 -08:00
Alessio Quaglino eb9568a48b Add frame element to MJCF.
PiperOrigin-RevId: 585598244
Change-Id: I4c06be3dd586dab5a4458f05faaf1e7f2b615458
2023-11-27 03:32:18 -08:00
Alessio Quaglino 8010aad7be Add flex_elemlayer to mjvSceneState. Fixes #1193 and #1219.
PiperOrigin-RevId: 585581657
Change-Id: Iec4da74437544184c19765a2feee1cca4c368d34
2023-11-27 02:25:05 -08:00
Kevin Zakka e33adaca9c Fix typos in mju_boxQP documentation.
PiperOrigin-RevId: 585462325
Change-Id: Ib1c15c3d5af8475ec1a62b50c66b729579a23e60
2023-11-26 11:23:52 -08:00
Nimrod Gileadi 002b427a32 PID Controller as an actuator plugin.
Implement a configurable PID controller.

PiperOrigin-RevId: 585282014
Change-Id: I2d884554629101a0a25b5e0979ffb1ff8ed9cab4
2023-11-25 08:41:01 -08:00
Alessio Quaglino d070b1893e Improved SDF objective function.
For two colliding SDFs `A` and `B`, the function is `(A+B)+abs(max(A,B))`. This can also be written as `clearance + abs(intersection)`. This function has the following properties:

- On the penetrating surface, it is equal to `A+B`, i.e. the clearance field which is the penetration depth.
- The object boundary is a set of local minima in 3D space, since `abs(max(A, B))>0` away from the surface.
- Along the penetrating surface, the maximum penetration is a local minimum of the clearance since this field is orthogonal to the midsurface field `A-B`, which acts as a support plane for the contact.

[Level sets of the improved function for two colliding circles](https://www.wolframalpha.com/input?i=plot+sqrt%28x%5E2%2By%5E2%29-1+%2B+sqrt%28%28x-1%29%5E2%2B%28y-1%29%5E2%29-1+%2B+max%28max%28sqrt%28x%5E2%2By%5E2%29-1%2C+sqrt%28%28x-1%29%5E2%2B%28y-1%29%5E2%29-1%29%2C+0%29+-+min%28max%28sqrt%28x%5E2%2By%5E2%29-1%2C+sqrt%28%28x-1%29%5E2%2B%28y-1%29%5E2%29-1%29%2C+0%29+).

PiperOrigin-RevId: 585106580
Change-Id: I5b18a1ef262ceb0a1ab8abcad8acfd6dc1992e2c
2023-11-24 09:07:17 -08:00
Yuval Tassa 6a83b86553 Update M1 Pro with M3 Max benchmarks in MJX docs
PiperOrigin-RevId: 584918133
Change-Id: I442972cdc1f19020e6b5bbc7ff3e98fd556cf125
2023-11-23 10:46:54 -08:00
Nimrod Gileadi f2025c6abf Allow plugin actuators to have activation state.
Accept new attributes on the plugin/actuator tag:
  - dyntype
  - dynprm
  - actlimited
  - actrange
  - actearly

This addresses some of the requests in #1098.

PiperOrigin-RevId: 584866281
Change-Id: I4f7559e446888216093efba4ced9119cfc0528a4
2023-11-23 05:14:03 -08:00
Yuval Tassa b41f6d0942 Correct documentation of eulerseq attribute w.r.t URDF conventions.
PiperOrigin-RevId: 584394256
Change-Id: I0afcb6ced81b98898988cc66f46742175a9a55c5
2023-11-21 12:11:05 -08:00
Yuval Tassa 2bc2bc902f Clarify that the contact disable flag also disables collision detection.
PiperOrigin-RevId: 584300974
Change-Id: I740fd6833b2ea1b77bdb70dc210a1bd1f7eb6f17
2023-11-21 05:57:51 -08:00
Yuval Tassa cd56a41f83 Fix bug in Cartesian actuation with movable refsite.
PiperOrigin-RevId: 584035818
Change-Id: I005f6bbbe02f8b36d287ecada0406a6ae4d720ba
2023-11-20 08:37:29 -08:00
Alessio Quaglino 8ca51b5318 Backtracking line search for SDF collisions.
Increased tolerance above zero in nutbolt.xml since now the two parts lock otherwise. Measured speedup of 2x in this example.

This solves the issue of scale-dependent step sizes. Tested on gears with 10cm diameter and 2cm thickness.

PiperOrigin-RevId: 584009449
Change-Id: Ied2f62dbbbc592470b91cf910f3553802a57c752
2023-11-20 06:33:01 -08:00
Alessio Quaglino dbf44fe2b4 New SDF objective function.
This solves the jittery behavior observed with the gear example in the case of small applied torques (~0.5).

The new quadratic option has the form max(A, 0)^2/2 + max(B, 0)^2/2 - min(A, 0)*min(B, 0). This function has a minimum in the intersections of two SDFs A and B, while avoiding the flat areas which would be generated if only the clearance field A+B were employed. See for example [the function resulting from two colliding circles](https://www.wolframalpha.com/input?i=minimize+max%28sqrt%28x%5E2%2By%5E2%29-1%2C0%29%5E2+%2B+max%28sqrt%28%28x-1%29%5E2%2B%28y-1%29%5E2%29-1%2C0%29%5E2+-+2*min%28sqrt%28x%5E2%2By%5E2%29-1%2C0%29*min%28sqrt%28%28x-1%29%5E2%2B%28y-1%29%5E2%29-1%2C0%29)

PiperOrigin-RevId: 583992855
Change-Id: I135a1b5931cd136d7d33cc275f8d361a8b7e290c
2023-11-20 05:06:33 -08:00
Yuval Tassa 98082ae7f9 Add description of eq_active state variable to documentation. Fixes #1208.
PiperOrigin-RevId: 583712793
Change-Id: I6f4adca5692fd181bb8f6c0f34ae09a756a84fc1
2023-11-18 20:06:33 -08:00
Yuval Tassa 530058cadb Clarify support for muscles/tendons in future MJX. Add details to the large scene benchmark.
PiperOrigin-RevId: 583018058
Change-Id: I3d93a73b4bd71ade1ecf28b8cff9a114259e71e1
2023-11-16 06:10:34 -08:00
Baruch Tabanpour 1554048856 Bump dev version number to 3.0.2.
PiperOrigin-RevId: 582773849
Change-Id: I07a70911578fabb556eec1a4d8aa6fcb6557513f
2023-11-15 12:51:04 -08:00
Yuval Tassa 8d5966eec9 Update changelog for 3.0.1 release.
PiperOrigin-RevId: 582705280
Change-Id: I6d2a8df7bccfa2ecb76b7ef3ef8d5a7377927589
2023-11-15 09:30:35 -08:00
Yuval Tassa 2d2b6ecf93 Fix formatting bugs in XMLreference doc page.
PiperOrigin-RevId: 582661350
Change-Id: I85a67b1286e9d70dc253e541d95fdfc58ce8f451
2023-11-15 07:00:37 -08:00
Alessio Quaglino e3b3f96373 Add flex_texcoordadr to mjvSceneState. Fixes #1193.
PiperOrigin-RevId: 582630943
Change-Id: I113b135752268773e0afafe004b8f27c1e96ffc7
2023-11-15 05:02:05 -08:00
Alessio Quaglino f5285e0b23 Add flex to dm_control schema.
PiperOrigin-RevId: 582323853
Change-Id: I4ce25bf29d0a883bca286954a14c4a07a500f145
2023-11-14 08:05:29 -08:00