Commit Graph

165 Commits

Author SHA1 Message Date
Yuval Tassa 3d63c873aa Improve 2D texture documentation.
PiperOrigin-RevId: 643347176
Change-Id: Ice83a723776092c762dac6e6bc440ef1b1d673b5
2024-06-14 08:04:09 -07:00
Yuval Tassa 07fc95ca9a Add orthographic cameras.
Orthographic cameras are specified by setting the `orthographic` attribute of the `<camera>` element. The `fovy` attribute is still used to specify the field-of-view, but its semantic is different for orthographic cameras. For orthographic cameras, the field-of-view is expressed in units of length, rather than degrees.

Other related changes:

* Fix bug in the ordering of `cam_xxx` elements in `mjModel`.
* Make camera visualization translucent only when the frustum is visualized.
* Added a button to `simulate` to toggle between perspective and orthographic free cameras.

https://youtu.be/ZXBTEIDWHhs

PiperOrigin-RevId: 642293435
Change-Id: Id090a421ad88ab404b5b27ddbbd6bfc81ad49bc5
2024-06-11 09:23:18 -07:00
Baruch Tabanpour ace0c8f0a3 Add maxhullvert.
PiperOrigin-RevId: 641092710
Change-Id: Ib4fa828a9c82531614f0a67de9990340dbb25406
2024-06-06 19:05:16 -07:00
Yuval Tassa 2830a4071f Add dampratio attribute to position and intvelocity actuators.
PiperOrigin-RevId: 639745135
Change-Id: I94ba4c346d2750c6c454a60a568f2e6f6bce19d4
2024-06-03 05:28:35 -07:00
Yuval Tassa 8fa0fea02d Allow partial specification of polycoef attribute of equality constraints.
- Usually the user only wants to tweak `polycoef[1]`, after this change `"0 2"` is equivalent to `"0 2 0 0 0"`.
- Also improve documentation of this attribute.
- Tighten margins of documentation display equations.

PiperOrigin-RevId: 639720742
Change-Id: Ibafa0e093cebe1c1c75bf2e47ff3bd2ad7619414
2024-06-03 03:43:13 -07:00
Tom Erez 727893f0f2 Add timeconst attribute to position actuator.
PiperOrigin-RevId: 635018979
Change-Id: I919573f4241ecb4a4c61c3b8b6641b31aa79eca4
2024-05-18 03:38:20 -07:00
Kyle Bayes 6e58cedb47 Fix typo in sensor documentation.
PiperOrigin-RevId: 633872551
Change-Id: I033a8227c19da2feebf286f4b3c24635f5625372
2024-05-15 03:03:40 -07:00
Yuval Tassa 3809951172 Add sensor to replicate example model. Fixes #1654
PiperOrigin-RevId: 633213086
Change-Id: I1672cf31871637497bcb0f26880e0a41a9f510bc
2024-05-13 08:06:44 -07:00
Yuval Tassa 02d015458c Add mj_geomDistance API function and sensors for geometric distance, normal direction and segment between between two geoms. Fixes #51
PiperOrigin-RevId: 632458301
Change-Id: I65b7e5bb0df59008028114cf4a07e0d6365ff3d3
2024-05-10 04:52:43 -07:00
Yuval Tassa 93b57c1421 Update Python documentation.
PiperOrigin-RevId: 631189628
Change-Id: I17d0fbe476fc14bbad525a302f588bf773a2244b
2024-05-06 14:40:59 -07:00
Yuval Tassa 3e35eebbb9 Documentation updates:
- Added a section on preventing slip in the modeling chapter.
- Added more intuitive descriptions of friction coefficients in the Computation chapter.
- Fixed some en-dashes and em-dashes.

PiperOrigin-RevId: 630856003
Change-Id: I8e767e6c5a95affdeb72ef9bc424bdd18f58e4df
2024-05-05 12:10:06 -07:00
Mohammad Hamid 131b1745db Added support for GMSH22 surface loading
PiperOrigin-RevId: 629734063
Change-Id: I6a250b81de4e7c8f7520795bfe74a81d719dfb50
2024-05-01 08:44:05 -07:00
Alessio Quaglino 26f23066d1 Add replicate element to MJCF. Fixes #553
PiperOrigin-RevId: 629393578
Change-Id: Ia1db1b9e47eba8868117b0f7b85edcd0cc1b6d79
2024-04-30 06:29:18 -07:00
Yuval Tassa 6540289eb1 Change schema order in the docs: move option to the top, move visual down.
PiperOrigin-RevId: 627036617
Change-Id: Icb18a4afab7d549baee8ed0df89e98dfac4d6e6c
2024-04-22 07:56:26 -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
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
Yuval Tassa 366041756d Add note about segmentation images to offsamples documentation.
PiperOrigin-RevId: 622830327
Change-Id: I8e15ce65babc86086335b0f9010db5be581460fc
2024-04-08 06:51:22 -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 adc4b92c1b Document nonlinear least-squares tutorial.
PiperOrigin-RevId: 615496587
Change-Id: I97975a4dc99a599afd1eb6964d0ca0cf3d9fcc0e
2024-03-13 11:56:42 -07:00
Alessio Quaglino bda03af49a Add childclass support to frames.
PiperOrigin-RevId: 615487831
Change-Id: I0e4d2efd52211701b4286a0b0de84424470a3a47
2024-03-13 11:31:22 -07:00
Kevin Zakka c4562ac61b Cleanup asset/mesh in XML doc.
PiperOrigin-RevId: 615156721
Change-Id: Ia2a6051506f9b3f4f2d7919893381f40f3e037df
2024-03-12 13:40:40 -07: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
Yuval Tassa 72cf304e2b Improve documentation of mesh pre-processing.
PiperOrigin-RevId: 606268723
Change-Id: I1d939cbb214036ab477e12ae3fd266a25ff89399
2024-02-12 09:04:18 -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
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
Ryan White 38b441b777 Update XMLreference.rst
eq_active is a member of mjData, not mjModel
2024-01-31 19:45:19 +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 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 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
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
Yuval Tassa 07e05b4c55 Fix typo. Fixes #1221
PiperOrigin-RevId: 589835888
Change-Id: Iacedbe642709d5fbd43b7f0f1f9daa6447ce6155
2023-12-11 08:42:06 -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
Alessio Quaglino eb9568a48b Add frame element to MJCF.
PiperOrigin-RevId: 585598244
Change-Id: I4c06be3dd586dab5a4458f05faaf1e7f2b615458
2023-11-27 03:32:18 -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
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 2d2b6ecf93 Fix formatting bugs in XMLreference doc page.
PiperOrigin-RevId: 582661350
Change-Id: I85a67b1286e9d70dc253e541d95fdfc58ce8f451
2023-11-15 07:00:37 -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
Nimrod Gileadi f1bf394415 Add missing commas in attribute lists in XML reference.
PiperOrigin-RevId: 581984255
Change-Id: Ie834a9578357bba68839d5172892cd9d6329122e
2023-11-13 09:08:43 -08:00
Yuval Tassa dafd041ad8 Minor documentation improvements.
PiperOrigin-RevId: 579825348
Change-Id: Iba81616fe9fc7d57a640775efd46afb5fc2f27bf
2023-11-06 06:36:13 -08:00