Commit Graph

88 Commits

Author SHA1 Message Date
Alessio Quaglino 019e0a806c Throw an error if a child attached by reference to a parent is compiled.
Fixes #2482.

PiperOrigin-RevId: 735665098
Change-Id: Ia3436fdd2ff572f8f0c1ded434742a4a9186f2f7
2025-03-11 01:24:17 -07:00
Kyle Bayes ed16f2daf2 Set nativeccd as default.
PiperOrigin-RevId: 731343200
Change-Id: I315779017b676f3d118e0d38ee53a515272f50b8
2025-02-26 09:15:15 -08:00
Yuval Tassa f554b38c36 Fix syntax bug in simulation.rst
PiperOrigin-RevId: 729710215
Change-Id: I49899ed50d5e97a2c5ad35e5de2e93186b7c64ec
2025-02-21 17:28:59 -08:00
Yuval Tassa fb07e0d1f7 Convert qLD to CSR format.
PiperOrigin-RevId: 728196818
Change-Id: I31bdf32e251293284426ed345019f27fd051a0e1
2025-02-18 07:14:45 -08:00
Yuval Tassa f73f0e1d0d Fix aspect ratios of embedded videos in docs.
Note that small videos, for some reason, need an aspect ratio that is different  from the actual aspect ratio.

PiperOrigin-RevId: 724879307
Change-Id: I681f071baf4eb09cfda41edeca0d1ee16be4181a
2025-02-09 03:33:10 -08:00
Yuval Tassa 8c22181156 Fix documentation typos.
PiperOrigin-RevId: 720232771
Change-Id: I176db4d4168c37b2819df14b439c4cde838e2025
2025-01-27 10:58:22 -08:00
Google DeepMind 4ab274aea9 Fix missing arg for mj_compile in model-editing doc example code.
PiperOrigin-RevId: 720005405
Change-Id: Idf71a1a12fe4cfcc450cd80c91b13ee8a75e1636
2025-01-26 20:25:50 -08:00
Alessio Quaglino c2138c3fb0 Do not copy the spec during attach.
Use a reference count for managing the memory.

PiperOrigin-RevId: 716169486
Change-Id: Id270c4858c17b9250115e9544d5ea143584e2d5f
2025-01-16 03:53:17 -08:00
Copybara-Service 6f7fba794b Merge pull request #2336 from xela-95:patch-2
PiperOrigin-RevId: 713991183
Change-Id: I0869a068f463513e89fe2f88bca4b82177cfffa3
2025-01-10 03:46:20 -08:00
Yuval Tassa b0f885ead0 Minor edits to the Programming/Simulation docs page.
PiperOrigin-RevId: 713952376
Change-Id: I5b7230a001bd49954d401846f40cd122ee4e748c
2025-01-10 01:11:27 -08:00
Alessio Quaglino 6654d63438 Add spec lookup in the attached spec array using the compiler option pointer.
This enables to find the spec associated with the compiler option stored in the objects, which do not necessarily belong to the model that owns them.

PiperOrigin-RevId: 713259419
Change-Id: I579c770147ff07ed2a5edd20e7a795ee7cc27147
2025-01-08 05:44:00 -08:00
Alessandro Croci 7a6bf06706 Update simulation.rst
Add missing backticks to `mjData.xfrc_applied`
2025-01-08 14:27:46 +01:00
Alessandro Croci 661c3e01dc Update simulation.rst
Add missing backticks to `mjData.mocap_quat` in simulation.rst
2025-01-08 14:21:24 +01:00
Yuval Tassa b6037d1759 Improve mjSpec documentation. Fixes #2074.
PiperOrigin-RevId: 692251710
Change-Id: Ia46bbbe5b7eaa890433b38fed66824f716cc9ea0
2024-11-01 12:06:14 -07:00
Yuval Tassa 32df8a515a Fix typos. fixes #2139
PiperOrigin-RevId: 691429879
Change-Id: I929b7a387ec41f68b8d85fe20de83083216da36a
2024-10-30 08:34:39 -07:00
Yuval Tassa 6703a40fcf Improve plugin documentation.
PiperOrigin-RevId: 690974299
Change-Id: Iadaabafb7434ada9579d6e2f64aae435cdfedbd8
2024-10-29 05:07:31 -07:00
Yuval Tassa 3d920e6a70 Update build documentation to include instructions on how to build the docs locally.
PiperOrigin-RevId: 690616910
Change-Id: I717988e3adc67cb6d65488d39bc804c3d4f0e3b5
2024-10-28 08:17:16 -07:00
Yuxuan Jiang 55962538c4 Fix typo in programming documentation 2024-09-24 15:33:27 +08:00
Alessio Quaglino 4998e7b392 Move flex damping to the engine and remove membrane and solid plugins.
PiperOrigin-RevId: 676434954
Change-Id: I24e8dbaa90afcffd613a9cf106ef8b7262195328
2024-09-19 09:01:30 -07:00
Yuval Tassa e4d4153352 Move sanitizer instrumentation to a separate header file. Fixes #2049.
PiperOrigin-RevId: 672986547
Change-Id: I42522f4925237a73168e965364a2dd65c0f067cb
2024-09-10 09:05:35 -07:00
Nimrod Gileadi f75ead2203 Improve the build instructions for mac.
The app bundle doesn't include mujoco.framework, so the instructions were a bit stale. I verified that with these new instructions I'm able to build the Python bindings from source with a prebuilt MuJoCo binary.

Fixes #313.

PiperOrigin-RevId: 666272041
Change-Id: I8bcf14c8ab6268cdaa617a8b5940b155ef64a8c5
2024-08-22 03:22:17 -07:00
Nimrod Gileadi c486f62cb7 Fix some broken links in documentation.
Remove references to deleted sample Makefiles.

PiperOrigin-RevId: 660753375
Change-Id: Iaed2d893e1c03b1c6d348a54e7d7f834db7f6089
2024-08-08 02:41:08 -07:00
Nimrod Gileadi 157040f743 Refer to tex_data in docs instead of tex_rgb.
PiperOrigin-RevId: 660412293
Change-Id: I164099ecc36833e20d5adc2c7345aff351fc4561
2024-08-07 09:07:20 -07:00
Google DeepMind 70d70bc3b7 Fix typos in MuJoCo documentation.
PiperOrigin-RevId: 656068822
Change-Id: I5ebbb3701148ea4d978a6a1ad3f762ffcc7e57cb
2024-07-25 13:31:13 -07:00
Alessio Quaglino 8e827d0d50 Add missing changelog item.
PiperOrigin-RevId: 652830666
Change-Id: Iba41871a4e92081dde6428f12abe93c58ea9b02a
2024-07-16 07:21:37 -07:00
Yuval Tassa 3d28a1d8c7 Fix formatting in documentation code samples.
PiperOrigin-RevId: 652237833
Change-Id: Ia90fadccba39881748a7ead15db3285e00feb08f
2024-07-14 07:08:18 -07:00
Yuval Tassa e13ddfa2ab Improve compiler-related documentation.
PiperOrigin-RevId: 651827545
Change-Id: I85c12dc12967e49087c342445dbfa049c5cdbcdf
2024-07-12 11:05:16 -07:00
Yuval Tassa 1eb708646d Update the simulate tutorial video.
The new video is more comprehensive and covers more features of MuJoCo.

PiperOrigin-RevId: 644758072
Change-Id: I1f114746833e00cd61b27659c816316c0e72c46c
2024-06-19 08:41:53 -07:00
Alessio Quaglino 7a06bcfdaf Make model editing API public, fixes #364
Still missing:

- Detailed documentation.
- Python bindings.

PiperOrigin-RevId: 641445626
Change-Id: I20e67b707cf1bebae7e0cc94d17f7b76a89171f0
2024-06-07 22:28:01 -07:00
Yuval Tassa 0d1c92b20a Add documentation on pipeline stages and mjData self-consistency. Fixes #1667
PiperOrigin-RevId: 638619787
Change-Id: Ic8dd0fbd178c4946757a07d74fca3b2c905f9080
2024-05-30 05:38:05 -07:00
Copybara-Service 2ba80206ab Merge pull request #1479 from jmargeta:fix-record-command-docs
PiperOrigin-RevId: 613927858
Change-Id: I8fe30db8677811c98ed4f881b51a0f430d93dd3b
2024-03-08 07:29:57 -08:00
Jan Margeta 32dc89b425 Rename depthoverlay to adddepth 2024-03-06 21:17:43 +01:00
Jan Margeta f287372467 Add url to relevant offscreen buffer attributes 2024-03-06 19:46:51 +01:00
Jan Margeta 548177d46c Rename depthoverlay argument 2024-03-06 19:14:32 +01:00
Jan Margeta 39edea3a6c Add an explicit note on recording resolution 2024-03-06 19:01:25 +01:00
Jan Margeta be68f90190 Make depth overlay in video recording optional
Add docs for the record arguments
2024-03-06 18:47:14 +01:00
Jan Margeta fe2215384b Update docs on the video recordings's resolution
This fixes the the ffmpeg command to correspond to the default humanoid.xml resolution (2560x1440).
2024-03-06 18:47:14 +01:00
Jan Margeta b475337e02 Update docs of ffmpeg raw video conversion
Makes it work well with the given humanoid example
2024-03-06 14:34:15 +01:00
Jan Margeta 8e0998dcbd Fix docs for the record command
Renames the non-existent "render" command to "record"
2024-03-06 01:36:13 +01:00
Silvio Traversaro 8c63a8b8c7 Fix mjpResourceProvider example 2024-02-20 23:56:43 +01: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
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 1881c2d881 Improve sorting of samples in documentation.
PiperOrigin-RevId: 579847239
Change-Id: I392cd87b9a3e5616fcb10657db4ac81a38e430ed
2023-11-06 08:12:24 -08:00
Yuval Tassa e82cb9f420 Delete mentions of MuJoCo 2.0 in the docs.
PiperOrigin-RevId: 578501679
Change-Id: Ie1fdd1d11d2e1e12b3f9f1e59bd4da705b3a7c7e
2023-11-01 06:44:20 -07:00
Alessio Quaglino 50843cad30 Add defaults to SDF plugin attributes.
Expose diameter and number of teeth for the gear SDF.

PiperOrigin-RevId: 577779297
Change-Id: Iec5890ab7f39080b395cf06a76f9c2216f4f39ed
2023-10-30 03:09:25 -07:00
Yuval Tassa 2bb8652bf6 Add User Interface documentation.
PiperOrigin-RevId: 575800982
Change-Id: I9b2e03932d0d3b1844b90e5da7c32a640d999e69
2023-10-23 06:35:34 -07:00
Alessio Quaglino 139a8ae298 Add flex and elasticity documentation. Fixes #873.
PiperOrigin-RevId: 574179040
Change-Id: Iaf90bbf2b2c3fe075c940c2b66b7b841f256e653
2023-10-17 09:46:07 -07:00