Commit Graph

69 Commits

Author SHA1 Message Date
Alessio Quaglino 300450f8b8 Add circle to flexcomp and remove rope and loop from composite.
Add pulley example to show a circle use case.

Switch on flex edge rendering by default (no effect when flex skin is rendered).

PiperOrigin-RevId: 700738379
Change-Id: I8469bbf194de01c8dab66c9a51c49879013df141
2024-11-27 10:14:25 -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 d646ba8de1 Update MuJoCo changelog with a video of the 100_humanoids model.
Improve the model's rendering FPS by reducing the number of shadow-casting lights from 7 to 2.

https://youtu.be/e8lUuykQPGs

PiperOrigin-RevId: 686118052
Change-Id: If376564fdc23ad8d754dac1e5825079c0b806063
2024-10-15 08:40:06 -07:00
Yuval Tassa 2dd518734f Stop over-allocating memory in Newton solver.
PiperOrigin-RevId: 684797464
Change-Id: I3389416cb69a8564b5119f6e3944b579893ea511
2024-10-11 05:09:33 -07:00
Yuval Tassa 395129bbd3 Improvements to lighting and replication logic in humanoid.xml and 22_humanoids.xml.
Minor fix to memory usage printing in simulate.

PiperOrigin-RevId: 683787943
Change-Id: I0a42dacc8af0e659c3817df57bceb76d9e4d5ae3
2024-10-08 15:36:22 -07: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
Alessio Quaglino b15de2c951 Add elasticity parameters to the schema.
PiperOrigin-RevId: 675115200
Change-Id: Ic6608ce61cbb857dca71b3d9cbdac057e8f1ac7a
2024-09-16 05:56:36 -07:00
Yuval Tassa 4e3dc14f8e Remove model/humanoid100/humanoid100.xml (used <include>), replace with model/humanoid/humanoid100.xml (uses <attach>)
PiperOrigin-RevId: 673123895
Change-Id: I0c3c6dac69d9fc12a6ea76d586c34503fc167bad
2024-09-10 15:14:04 -07:00
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