Commit Graph

62 Commits

Author SHA1 Message Date
Taylor Howell 96dda6ea75 Add tendon actuator force limits and tendon actuator force sensor.
PiperOrigin-RevId: 745096883
Change-Id: Ib9acb727fbbfc6b0b0323ee6a889053a7a878056
2025-04-08 05:16:35 -07:00
Alessio Quaglino b3aa5df68a Improve composite docs and changelog.
PiperOrigin-RevId: 730394496
Change-Id: Ie993214deb82b526a96510e02f6ecff103c58607
2025-02-24 04:26:35 -08:00
Alessio Quaglino c52d1b3941 Remove the particle composite (replaced by replicate).
PiperOrigin-RevId: 730089997
Change-Id: If8d18fb56ae01241e76f84dbf7951e034026d829
2025-02-23 03:14:11 -08:00
Alessio Quaglino 0fcd20f0da Remove grid from composite types.
Replaced it with flexcomp in the models.

PiperOrigin-RevId: 730070619
Change-Id: Icbc69e4c6784c6252743f689a1eafb6482d0c393
2025-02-23 01:31:41 -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
Alessio Quaglino 7cdf180641 Introduce trilinear flex parametrization.
These flexes use only 24 DOFs (3 per vertex of the bounding box), while colliding with the full high resolution mesh.

On an 8x8x8 cube, the performance using DOFs at all vertices is

```
 Simulation time      : 18.74 s
 Steps per second     : 533
 Realtime factor      : 0.53 x
 Time per step        : 1874.4 µs

 Contacts per step    : 114.88
 Constraints per step : 3322.51
 Degrees of freedom   : 1536
```

With the new implementation, it is the following:

```
 Simulation time      : 1.82 s
 Steps per second     : 5507
 Realtime factor      : 5.51 x
 Time per step        : 181.6 µs

 Contacts per step    : 38.84
 Constraints per step : 155.36
 Degrees of freedom   : 24
```

PiperOrigin-RevId: 721008829
Change-Id: I833df027527db578d86667cc4b24295bcf6f7d22
2025-01-29 09:38:22 -08:00
Yuval Tassa 8c22181156 Fix documentation typos.
PiperOrigin-RevId: 720232771
Change-Id: I176db4d4168c37b2819df14b439c4cde838e2025
2025-01-27 10:58:22 -08:00
Yuxuan Jiang df1d15fa38 Fix typo in modeling.rst 2025-01-08 09:53:36 +08:00
Alessio Quaglino f909d63cdf Enable to attach a spec to a frame.
PiperOrigin-RevId: 699703988
Change-Id: Idbddcbce1e68286248458eb0bd24d5080451a58a
2024-11-24 07:35:14 -08:00
Yuval Tassa 298ce31e39 Update docs to highlight nativeccd
PiperOrigin-RevId: 692918061
Change-Id: I9e44bc3123fe6b8a41b769c7de01b20e3c56d758
2024-11-04 04:34:53 -08:00
Alessio Quaglino 831d9881d3 Remove box, cylinder and ellipsoid composite types.
Also, fix a bug with Flex textures that was causing an incorrect allocation of the textures in mjModel. Fixes #2013.

PiperOrigin-RevId: 692510858
Change-Id: If781716216974e085244da27bc3aa57d91c3458c
2024-11-02 11:14:13 -07: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 be00fafc43 Various documentation improvements.
- Replace two "below" instances in `XMLreference.rst` with proper links (there are many more that need fixing).
- Discuss friction cones and 32-bit floats in Performance Tuning.
- Delete Damping subsection in Tips and Tricks, no longer relevant after the introduction of the implicit/fast integrators.
- Simplify discussion of free bodies, mention free joint alignment.
- Clarify frame used by kinematic Jacobians.

PiperOrigin-RevId: 672615057
Change-Id: Ib59b71e3c09cdd13415519fc4a964131b155718f
2024-09-09 11:36:07 -07:00
Yuval Tassa 2cb601c98d Improve documentation w.r.t smoothness, differentiability and finite-differencing.
PiperOrigin-RevId: 662848709
Change-Id: Icb7dc03a2c53d43d0d3a9e4ac95d963e5bc6853c
2024-08-14 03:11:38 -07:00
Google DeepMind 70d70bc3b7 Fix typos in MuJoCo documentation.
PiperOrigin-RevId: 656068822
Change-Id: I5ebbb3701148ea4d978a6a1ad3f762ffcc7e57cb
2024-07-25 13:31:13 -07:00
Yuval Tassa b483ce608e Use std::thread in compiler on all platforms.
PiperOrigin-RevId: 651005412
Change-Id: I8dfb142dc2d87ab0af79583f2df168c105b50138
2024-07-10 07:10:45 -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 b8a8d811e1 Update documentation for URDF parsing, noting different default values for compiler attributes.
PiperOrigin-RevId: 633556582
Change-Id: Ibf99b034706afc14f54bfc34e082465d025719d2
2024-05-14 06:01:38 -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
Nimrod Gileadi 827b7a2792 Solver parameter docs improvements.
- Correct the equation for penetration depth. The equation is tested in engine_core_constraint_test.cc.
- Add a tip on scaling damping with stiffness.

PiperOrigin-RevId: 621111712
Change-Id: I8fcc133cbc638ffef2d0ddf4e298ae402dda7b6a
2024-04-02 03:03:02 -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 b97110967f Add Performance Tuning section.
Fixes #1471.

PiperOrigin-RevId: 613867065
Change-Id: I947284300709e0fd6633068d9690a4b19812141f
2024-03-08 02:31:07 -08:00
Yuval Tassa 8247ddea0b Recommend fTetWild for tetrahedral meshing in the docs.
PiperOrigin-RevId: 596918194
Change-Id: I0357739c8741a7b9fc4614c5ed7ea7fefc0fb42c
2024-01-09 06:50:10 -08:00
Yuval Tassa c79e1e5d01 Add documentation image variants compatible with dark mode. Fixes #587
PiperOrigin-RevId: 596265596
Change-Id: Iedd076fbb7a6dca77a91e52e538be1c764d1f8fb
2024-01-06 14:02:34 -08:00
Yuval Tassa 7ce05f4957 Improve documentation of solver parameters.
PiperOrigin-RevId: 595723619
Change-Id: I00b67eaec02d2e85ce60fb44eb3e582ce036be3a
2024-01-04 09:17:31 -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
Alessio Quaglino eb9568a48b Add frame element to MJCF.
PiperOrigin-RevId: 585598244
Change-Id: I4c06be3dd586dab5a4458f05faaf1e7f2b615458
2023-11-27 03:32:18 -08:00
Alessio Quaglino 7a7cfc0f60 Improve flex docs.
Fixes #1141 and #1152.

PiperOrigin-RevId: 578855375
Change-Id: I44746c3ae331edcb22b7e16744fb38369039e888
2023-11-02 08:05:12 -07: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
Yuval Tassa 893c404230 Runtime disabling of actuators according to group.
Added `option-actuatorgroupdisable` attribute and associated `mjOption.disableactuator` integer bitfield, used to disable sets of actuators at runtime according to their group.

- The first 6 actuator groups are toggleable in the `simulate` viewer.
- Minor refactor and cleanup of actuator documentation.

https://youtu.be/H9qG9Zf2W44

Fixes #1092.

PiperOrigin-RevId: 578335600
Change-Id: I4cf663b90ea768e4380acfa2fe3b8c15c7cbb568
2023-10-31 16:24:38 -07:00
Yuval Tassa 0f94b4a5ad Documentation improvements.
PiperOrigin-RevId: 577620389
Change-Id: Ib104a57a2b2b35c334855782d548ff064e74e9d2
2023-10-29 06:56:59 -07:00
Yuval Tassa 190bfac2d6 Rephrase documentation in places where "parent body" creates ambiguity between "the body which contains the element" and "the parent body of the body which contains the element".
Fixes #1127

PiperOrigin-RevId: 576486971
Change-Id: I54d0c351e95101c5f7907a3c5bb6be18904c03ad
2023-10-25 04:32:09 -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
Alessio Quaglino 36d2ffe4f2 Specify camera parameters using standard robotics conventions.
PiperOrigin-RevId: 569147555
Change-Id: I3443f95e5de56a17024f5e5c03f33888dd583edb
2023-09-28 05:19:19 -07:00
Saran Tunyasuvunakool 7e5a7b76fc Change GitHub org name to google-deepmind.
PiperOrigin-RevId: 563512242
Change-Id: Ife98501e95bb3459d96c7c73e5fb53be5513dd4b
2023-09-07 12:34:20 -07:00
Yuval Tassa a276c49c30 Rename `actuatorforcerange and actuatorforcelimited, to actuatorfrcrange and actuatorfrclimited`, respectively.
PiperOrigin-RevId: 556780590
Change-Id: Ide12cf390920f9efe6f79cc9f864a480ce5f256d
2023-08-14 07:18:57 -07:00
Yuval Tassa bbbf30ee47 Fix typo in docs.
PiperOrigin-RevId: 549594904
Change-Id: I96c3964367081a8da0324c9989c9eb5414fa411f
2023-07-20 04:46:23 -07:00
Yuval Tassa 51aa375af0 Improvements related to models where joint-actuator relationship is not one-to-one:
- Add `joint-actuatorforcerange` for clamping total actuator force at joints. Add `sensor-jointactuatorfrc` for sensing total actuator forces on a single joint.
See [documentation](https://mujoco.readthedocs.io/en/latest//modeling.html#actuator-force-clamping) for justification and use cases.
- Add simple car model to `model/`.
- Move actuation-related test models into `engine/testdata/actuation/`.

PiperOrigin-RevId: 549355941
Change-Id: I27f6c1f80426d73a2811ef5ae74684a228b2fbd1
2023-07-19 10:29:32 -07:00
Yuval Tassa 83e70954d7 Improve documentation of solver parameters.
PiperOrigin-RevId: 538098136
Change-Id: I6a25fd066d5a1a7ef7b28c73accbd15c497fcba4
2023-06-06 00:30:15 -07:00
Beanpow 39b744b231 Fix the effective time constant function of muscle 2023-06-02 16:53:32 +08:00
Yuval Tassa 770b4b363a Added optional smoothing to muscle dynamics:
- `muscle` actuators take a new `tausmooth` attribute (defaults to 0) which when positive, smooths the transition between activation and deactivation timescales.
- `mju_muscleDynamics` takes 3 parameters, adding width of smoothing sigmoid.

PiperOrigin-RevId: 531473354
Change-Id: I8ab6c0289ff04437e798c3ca6edda132a30fcc31
2023-05-12 04:58:53 -07:00
Yuval Tassa ff1fa84d32 Cosmetic documentation improvements
PiperOrigin-RevId: 530074671
Change-Id: I07e000c9c506ae8532ade10fb731b4e1fc0970ea
2023-05-07 02:10:18 -07:00
Yuval Tassa c69e0b97fb Improve documentation of the internal stack.
PiperOrigin-RevId: 525119946
Change-Id: I49c757506f4af2b588dc07f978c8a72acad1b5bc
2023-04-18 05:40:44 -07:00
Yuval Tassa 7cc42ecf2a Remove "global" option from [compiler/coordinate](https://mujoco.readthedocs.io/en/latest/XMLreference.html#compiler-coordinate) attribute.
Keeping this rarely-used setting complicates the compiler logic and is blocking future improvements. In order to convert older models which used this option, load and save them in MuJoCo 2.3.3 or older.

PiperOrigin-RevId: 521739137
Change-Id: If0cb40d5db4879a4db9318cc2be258a7923e6e85
2023-04-04 05:59:38 -07:00
Yuval Tassa eac04ce5e9 Reflow all documentation source files to 120 chars.
PiperOrigin-RevId: 479552166
Change-Id: I777df18cf96d35d5260b4003452b7a6da6707a26
2022-10-07 05:02:21 -07:00
Yuval Tassa 6da125ea37 Standardise tags of MJCF elements in XMLreference.rst
PiperOrigin-RevId: 479541059
Change-Id: I98cb7933469f7010870d04608fbb931539769c2e
2022-10-07 03:45:53 -07:00
Saran Tunyasuvunakool 58fd72f53d Dynamically allocate contact and efc_ arrays on a new memory arena.
- Add private function `mj_arenaAlloc`. This is used internally to allocate memory from the arena.

- Add private function `mj_nefc` to count constraints. This function returns a tight upper bound on `d->nefc`. The number of counted constraints can be slightly bigger than exact `d->nefc` in the case of constraints with empty Jacobian, as when placing a frictional tendon between two world sites.

- Add new `memory` attribute to the `size` XML element for specification of arena memory size. This attribute is mutually exclusive with `nstack` and `njmax` specifications, which are now deprecated (but left around for the time being for legacy compatibility).

- Move `d->stack` to the end of the new arena space. The stack now grows in reverse from the end.

PiperOrigin-RevId: 479341539
Change-Id: Ie019c202e0908577ffc6f833a37920858116f667
2022-10-06 10:03:05 -07:00
Kevin Zakka f85cfb8ed2 Fix broken simulate links.
PiperOrigin-RevId: 478775551
Change-Id: I1c4f43c7cbe01f267948f5915a7511744eb0d158
2022-10-04 07:07:57 -07:00
DeepMind 366e1c53d4 Clarify docs on MJCF format comparison to inline CSS.
PiperOrigin-RevId: 471009039
Change-Id: I79704fd7939daef50918e5093b092f144436a47d
2022-08-30 09:11:01 -07:00
Yuval Tassa 29535a8eca Fix typos.
PiperOrigin-RevId: 467656092
Change-Id: If908b58129c975a042c920ca2242f320876e4f54
2022-08-15 06:38:20 -07:00