Commit Graph

61 Commits

Author SHA1 Message Date
Alessio Quaglino 4862b9e765 Remove plugin support from Composite particles.
This functionality is replaced by FlexComp.

PiperOrigin-RevId: 672503965
Change-Id: I58953267de285f82e416f9f60576a336b7d0da4c
2024-09-09 04:58:26 -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 27b9ddda5b Add attach tag to MJCF.
PiperOrigin-RevId: 651117953
Change-Id: I57b0e53ed44607d479b3785d908e0837c0804cf3
2024-07-10 12:41:43 -07:00
Nimrod Gileadi 393895bb29 Explicitly specify actdim on PID plugin actuators, to allow them to be used with keyframes.
Support actdim attribute on plugin actuators.

Remove the actuator_actdim callback. This callback leads to crashes when loading keyframes for models that have a stateful plugin.

PiperOrigin-RevId: 650649505
Change-Id: I40d1994d02ae4e20ce631b2702a984766cf2628e
2024-07-09 09:08:48 -07:00
Yuval Tassa 19d505d847 Remove unused texture attribute in some models.
PiperOrigin-RevId: 648497401
Change-Id: I9f9a843abfb710afaf25798fa659efd92bcd7007
2024-07-01 15:05:02 -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
Alessio Quaglino 8f1ea05bef Add disc mesh generation to user_flexcomp.
PiperOrigin-RevId: 611462985
Change-Id: I0fc195d8733172f5f4347b04b5de0edfdd12613d
2024-02-29 07:24:47 -08:00
Yuval Tassa 7c534a066c Sort humanoid actuators in the same order as the joints.
PiperOrigin-RevId: 608558353
Change-Id: I84015a92c39c187f65d59623f2793c29bf24b8ef
2024-02-20 04:41:17 -08:00
Kevin Zakka 8d1b05bbd2 Fix markdown hyperlink.
PiperOrigin-RevId: 595383191
Change-Id: Ia11b962c68ed33cc0fd6c5279f571f4b21d81570
2024-01-03 06:19:32 -08:00
Kevin Zakka cd972bbeee Document humanoid model changes in changelog section of its README + minor cosmetic improvements.
PiperOrigin-RevId: 595367344
Change-Id: I17483de71c6cbcf6a66e2fad762cc32f8cbee8b5
2024-01-03 04:47:05 -08:00
Yuval Tassa e07ea625ac Add keyframes to humanoid model.
PiperOrigin-RevId: 595175659
Change-Id: I2aae405a5dfbd9b14253d6330cb12003bd4f6c08
2024-01-02 12:00:46 -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
Yuval Tassa 37bb03f435 Move humanoid geoms to group 1
PiperOrigin-RevId: 585632746
Change-Id: I832804b9c0d090506c3b4ed5c0eeeb5e4cae412a
2023-11-27 06:23:54 -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 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 40d927c9fa Move 2d and 3d plugin force computation to elasticity.h.
Change physical properties of `floppy_flex.xml` to resemble `floppy.xml`.

Make `Membrane` backward compatible with `Composite`.

PiperOrigin-RevId: 577190384
Change-Id: I5bc56ec62faa134156e839bec45d685c22eba5c4
2023-10-27 07:18:08 -07:00
Alessio Quaglino 643c1248b8 Skip flex edge Jacobian if not needed.
When equality constraints and built-in passive forces are not present, edge Jacobians are unused. This gives a 3x speedup in `mj_kinematics` in `floppy_flex` (from 0.2ms/step to 0.06ms/step).

Changed the default options of `floppy_flex` to match those of `floppy` for a fair comparison.

PiperOrigin-RevId: 575850622
Change-Id: I4c618536fd17ef930153bbd1f1da7d9e0e44abbe
2023-10-23 10:02:00 -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 d67b8c6251 Add membrane plugin (2D Flex elastic stiffness).
PiperOrigin-RevId: 574109411
Change-Id: I4a701d8189cecf540cd200bd30cb4582f3c7dd43
2023-10-17 04:55:33 -07:00
Alessio Quaglino 110ade1435 Update Solid and Shell plugins to use FlexComp.
PiperOrigin-RevId: 573755821
Change-Id: I3b8d7fb27f0e940038fa9fd2b26ecc746df4f7ac
2023-10-16 03:03:06 -07:00
Alessio Quaglino f0608648cb Stricter swapping condition in mju_eig3.
This solves the texture rendering issue with the Rubik's cube. The texture were specified with respect to the incorrect frame, so a default rotation of (0, 0, pi/2) is now applied to the model file.

PiperOrigin-RevId: 571715153
Change-Id: I3efae3b1fc8f64e6c9e4db90a7609506e3cbed86
2023-10-08 04:04:34 -07:00
Yuval Tassa 7b7cf5e86c Add cards.xml model.
PiperOrigin-RevId: 571341445
Change-Id: I3a02bb01099cacb62e0c599e6198ed90b48baad0
2023-10-06 08:13:33 -07:00
Alessio Quaglino d3d46e16a4 Remove cloth and rope composites and deprecate loop.
PiperOrigin-RevId: 568168329
Change-Id: Ida4a5236bef74828c7bf59affdc28adea3db53b1
2023-09-25 03:38:43 -07:00
Alessio Quaglino dd5a7115cf Add shell plugin.
- Add bending passive force
- Add two examples (plate and poncho)
- Add stretching constraints for particles using tendons on mesh edges

PiperOrigin-RevId: 566980584
Change-Id: Id0cd8e1084c05560f1008518a8afbd5311d563e2
2023-09-20 09:00:20 -07:00
Alessio Quaglino 1afd98ec4b Add [SdfLib](https://github.com/UPC-ViRVIG/SdfLib) plugin to first-party SDFs.
The following dependencies are disabled with a cmake patch file.
- Enoki
- OpenMP
- Assimp
- FCPW

PiperOrigin-RevId: 565352386
Change-Id: Icff9de68408e0afa2032bb83b24491fc4e41d181
2023-09-14 06:42:42 -07:00
Alessio Quaglino 8421544add Added elasticity and sensor subfolders in model/plugin.
PiperOrigin-RevId: 558751363
Change-Id: I15acefc88e5fead1069b58ffb722ea4dc5d53c9b
2023-08-21 04:48:45 -07:00
Alessio Quaglino fdb041580c Add Signed Distance Field to collision geometries.
PiperOrigin-RevId: 557507088
Change-Id: I358a642407aee1ba8dfc9d405eb9a4f609435fe9
2023-08-16 09:15:23 -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 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 eca0df4c6c Improve formatting of cubelet vertices.
PiperOrigin-RevId: 533031494
Change-Id: I27b6e9eb17c3ebb1382d0e3d5ccb2402f00fbddc
2023-05-17 23:32:07 -07:00
Kevin Zakka dee9a958b4 Tweak cube XML.
PiperOrigin-RevId: 532851091
Change-Id: Icb089b914874e940985a08f6587c390732431f92
2023-05-17 11:26:57 -07:00
Kevin Zakka 3d71b160e6 Add 3x3x3 cube to model collection.
PiperOrigin-RevId: 531224451
Change-Id: Ibdfe5b89a5b2895500265199906a364768d606f0
2023-05-11 09:28:18 -07:00
Alessio Quaglino e59720833e Add ReadVector function to touch_grid plugin, use it for size and field-of-view attributes.
PiperOrigin-RevId: 528783871
Change-Id: Icf3d060116826b01f68c9818a5153be4ce9511b0
2023-05-02 08:01:10 -07:00
Yuval Tassa b397b3123e Added touch grid sensor plugin.
PiperOrigin-RevId: 527512624
Change-Id: I0f316eb6eb2c52472abbec484e5538b66ba2e82e
2023-04-27 02:03:03 -07:00
Saran Tunyasuvunakool 55cc9d1e95 Fix what appears to be a typo in humanoid texture size.
Note that for builtin cube textures, MuJoCo ignores the height setting anyway.

PiperOrigin-RevId: 522000719
Change-Id: Ida34b1b2d25a59ac3f4f111aa44218aa9cd9da30
2023-04-05 03:07:22 -07:00
Yuval Tassa 2607e67f8d Add contact labels showing which geom pairs are in contact.
PiperOrigin-RevId: 510422404
Change-Id: Ia73570098752e7c7175e4b5a5f2a0f8b08a6c006
2023-02-17 07:03:19 -08:00
Saran Tunyasuvunakool db28c31f05 Rename <required> tag to <plugin>.
PiperOrigin-RevId: 509237786
Change-Id: I35e812830b479004ac5025cbd9477888f51fb43e
2023-02-13 08:41:52 -08:00
Saran Tunyasuvunakool df87a85b84 De-duplicate vertices in mug.obj.
PiperOrigin-RevId: 508334141
Change-Id: If63e0923392b1ad11d4c9c295a511f929fc4be6d
2023-02-09 04:12:06 -08:00
Alessio Quaglino 2f10a7cb3b Update legacy memory specification in some example models.
PiperOrigin-RevId: 508330060
Change-Id: I16a5e70c5950178826a2a52a7a2005ef7f39ccfb
2023-02-09 03:47:43 -08:00
Alessio Quaglino 3de2873883 Add deprecation warning for the Rope Composite type.
PiperOrigin-RevId: 494985209
Change-Id: I6ce7ca2aeae6f1e798bd4bda9b755852add26a36
2022-12-13 04:35:48 -08:00
Alessio Quaglino 0d52feaa94 Add updateScene callback for plugins.
PiperOrigin-RevId: 492497689
Change-Id: I4a15cc5fa39dc7c9b85d132727f82033d4aec2c8
2022-12-02 10:11:32 -08:00
Alessio Quaglino d0b1a97338 Deformable solid plugin for particles.
Using coordinate-free formula equivalent to linear finite elements.

PiperOrigin-RevId: 491317615
Change-Id: I096b9a56075bbb630f64bfffac8a8d66457e5e2d
2022-11-28 05:32:30 -08:00
Yuval Tassa 5004a4c8c5 Better memory setting and reporting, updated example models.
- Memory heuristic rounds up to the nearest MB.
- `simulate` reports total memory currently allocated in the info box.
- All example models use `<size memory/>` rather than legacy attributes.
- Regenerated `example_saved.xml` and reformatted original model in [overview chapter](https://mujoco.readthedocs.io/en/latest/overview.html?#examples).
- `<size>` top-level section does not get written if empty.

PiperOrigin-RevId: 486702670
Change-Id: I0306e335f32344c59562ba606664ec9d2101f8a8
2022-11-07 10:36:37 -08:00
Alessio Quaglino 3b89b0fd30 Particles with arbitrary geoms and joints.
Fixes #553

PiperOrigin-RevId: 486614769
Change-Id: I9a09bf73da97b6b9746800a72ac6c97cce2efa92
2022-11-07 03:22:25 -08:00
Kyle Bayes 23092a11d7 Add per-body gravity compensation (buoyancy) passive force.
PiperOrigin-RevId: 485342531
Change-Id: Icb3e6bb5080b6ef17a3d3b1cc67e0503cfeaeffb
2022-11-01 09:48:06 -07:00
Alessio Quaglino e250ff0d5a - Added passive forces plugins
- Added new `cable` composite type:
  * The `initial` parameter specifies the joint at the starting boundary: `free`, `ball`, or `none`.
  * The boundary bodies are exposed with the names:`B_left` and `B_right`.
  * The vertex initial positions can be specified directly in the XML with the parameter `vertex`.
  * The orientation of the body frame **is** the orientation of the material frame of the curve.

- Added new `cable` passive force plugin:
  * Twist and bending stiffness can be set separately with the parameters `twist` and `bend`.
  * The stress-free configuration can be set to be the initial one or flat with the flag `flat`.
  * New cable example showing the formation of plectoneme.
  * New coil example.
  * New belt example showing interaction between twist and anisotropy.
  * Added test using cantilever exact solution.

PiperOrigin-RevId: 480033694
Change-Id: I491271bce8fccb185961477e903e5a72d172c8a3
2022-10-10 02:46:51 -07:00
Rohan P. Singh d1027eff75 Minor fix to Humanoid model
Use default class for left_upper_arm geom.
2022-09-20 18:20:45 +09:00
Yuval Tassa 8774f903ec Fix broken link.
PiperOrigin-RevId: 475159831
Change-Id: I5fb397f751aa1a3d5b5a3f3c141e0545780d9f00
2022-09-18 14:38:22 -07:00
Yuval Tassa a86fc66f1a Increase offscreen render buffer resolution of the humanoid to 2560x1440
PiperOrigin-RevId: 475005167
Change-Id: I8cdc2af8e73dc1491b317e5b587333f450f96e87
2022-09-17 05:04:40 -07:00
Yuval Tassa 04d44e1e0b Modifications to humanoid model.
- Increased hip flexion maximum.
- Symmetrised shoulder and ankle joints.
- Added hamstring tendons which couple the hip and knee at large flexion values.
- Moved duplicated values into defaults.
- Added two keyframes.
- Improved lighting.
- Changed naming convention.
- Moved description into README.md

PiperOrigin-RevId: 473745371
Change-Id: I95bf915c4caf3d5cf06c325cd73284d78a3d836e
2022-09-12 07:41:17 -07:00