Commit Graph

32 Commits

Author SHA1 Message Date
Google DeepMind e6dc5ed176 Add inner radius as a parameter for the sdf gear plugin.
PiperOrigin-RevId: 578789045
Change-Id: Id69418d6b1adcce404927de4ed68c94a5ec1f66f
2023-11-02 03:02:32 -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
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 50b4f0277d Add elasticity plugin README.
PiperOrigin-RevId: 574195554
Change-Id: Ib57614aaef66cdb26e3667c66df2426e63dacac4
2023-10-17 10:36:34 -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 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
Saran Tunyasuvunakool 4929077211 Remove mjMARKSTACK and mjFREESTACK macros.
PiperOrigin-RevId: 562844184
Change-Id: Id2f57f5d132c47094dad75c6dab7297d7aa73458
2023-09-05 11:41:43 -07:00
Alessio Quaglino 273c23038c MakeParticle and elasticity plugin refactoring.
- Removed the explicit dependency on a plugin name.
- Creation of particles from user-defined vertices (if a plugin is present).
- Add skin support for an irregular mesh
- Fixes #642 and #674.

PiperOrigin-RevId: 561313771
Change-Id: I450f91f0d3b578cc18d97ed7180a0a8944b7dd41
2023-08-30 05:40:27 -07:00
Saran Tunyasuvunakool b979a26b10 Rename mj_stackAlloc to mj_stackAllocNum.
PiperOrigin-RevId: 561040193
Change-Id: I49ea21ffb5b596471d2aacefb1961c11c5c905d0
2023-08-29 08:43:03 -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 15d74ba939 Add missing include to sdf.cc.
PiperOrigin-RevId: 557529739
Change-Id: Iff85d95b35977f7c329baf9a938f4580efd4b606
2023-08-16 10:30:09 -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 b36c611745 Fixes to touch_grid config parsing.
PiperOrigin-RevId: 530561729
Change-Id: I67f6dfd137aa54ce2141e5d5c30b5b888665c4a2
2023-05-09 03:42:06 -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
Kevin Zakka 4d2bf636ea Improve touch_grid sensor documentation.
PiperOrigin-RevId: 528473107
Change-Id: I2fecc10667b1b94a4b2b32653685f0a6d9da4ba9
2023-05-01 08:01:52 -07:00
Yuval Tassa b397b3123e Added touch grid sensor plugin.
PiperOrigin-RevId: 527512624
Change-Id: I0f316eb6eb2c52472abbec484e5538b66ba2e82e
2023-04-27 02:03:03 -07:00
Yuval Tassa a2a1ac9fc2 Pass mjvOption to plugin visualize callback.
PiperOrigin-RevId: 526047180
Change-Id: Ia63f02184f5c6a7e3b588298639fa0ab4a6da649
2023-04-21 08:44:20 -07:00
Yuval Tassa 27742da9d7 Fix formatting in cable.cc
PiperOrigin-RevId: 524846500
Change-Id: I4e07a68b443a78ea1c46812f64ecf99804b26020
2023-04-17 07:56:42 -07:00
Yuval Tassa 01b84089dd Document engine plugins.
Rename `mjPLUGIN_DYNAMIC_LIBRARY_INIT` -> `mjPLUGIN_LIB_INIT`.

PiperOrigin-RevId: 521458377
Change-Id: I42aaec923e4f392899dfe53ab6ce1dddc75a83b3
2023-04-03 07:55:21 -07:00
Saran Tunyasuvunakool 5e989d18c3 Enable compiler errors for implicit switch case fallthroughs.
Also unify warning options across Clang and GCC and fix minor issues that was surfaced by this.

PiperOrigin-RevId: 508619655
Change-Id: I59b777bf2dfea4422485670e2427c7d3f5cf6405
2023-02-10 03:49:00 -08:00
Kyle Bayes 048bd43724 Fix various typos.
PiperOrigin-RevId: 499888205
Change-Id: I38ccf9edb2a745fe8087f14b67ecccca872f7743
2023-01-05 08:29:49 -08:00
Yuval Tassa 30b4309af9 Rename mjpPlugin.capabilities -> mjpPlugin.capabilityflags
PiperOrigin-RevId: 495080532
Change-Id: I81743472b816a331890a7cb05bfb7a89ebf07ff9
2022-12-13 11:33:27 -08:00
Alessio Quaglino b712e0757e Define kNumEdges and kNumVerts constants in Solid plugin.
PiperOrigin-RevId: 493587525
Change-Id: Ifa82211a4dfc3b288825b0961c48fc679aae204c
2022-12-07 06:30:40 -08:00
Saran Tunyasuvunakool e4f1d584ad Add control plugin API.
PiperOrigin-RevId: 493311715
Change-Id: Iccd99fb26004f39832818e378f01f9149a0e3e3b
2022-12-06 08:23:49 -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 b14d9bf75b Fix duplicate symbols in plugin DLL.
PiperOrigin-RevId: 491340247
Change-Id: If559d60371ad604b94b92efd01ed6de9ecf6f2b0
2022-11-28 07:39:01 -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
Alessio Quaglino 9833f912c1 Renamed Elasticity to Cable and libcable to libelasticity for consistency.
PiperOrigin-RevId: 485642970
Change-Id: I279df4233963a6e514459e55a9c2d36d975da92c
2022-11-02 11:08:44 -07:00
Alessio Quaglino 95fe2fbc40 Add plugin support to Python bindings.
PiperOrigin-RevId: 480675078
Change-Id: I2967654b6662efced8ae62cae9b03c6c8e65c67c
2022-10-12 11:30:15 -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