Commit Graph

8 Commits

Author SHA1 Message Date
Yuval Tassa 0becf8fd98 Remove unused headers in test files.
PiperOrigin-RevId: 520610859
Change-Id: I5ac906b422a7c02737af85f6a2aea46206f0cb28
2023-03-30 05:26:33 -07:00
Saran Tunyasuvunakool db28c31f05 Rename <required> tag to <plugin>.
PiperOrigin-RevId: 509237786
Change-Id: I35e812830b479004ac5025cbd9477888f51fb43e
2023-02-13 08:41:52 -08:00
Yuval Tassa 30b4309af9 Rename mjpPlugin.capabilities -> mjpPlugin.capabilityflags
PiperOrigin-RevId: 495080532
Change-Id: I81743472b816a331890a7cb05bfb7a89ebf07ff9
2022-12-13 11:33:27 -08:00
Saran Tunyasuvunakool 5c021d042b Modify signature of plugin reset callback.
The `reset` function is called inside `mj_resetData`, before any physics forwarding call has been made. It is therefore an error to read anything from mjData at this stage.

The only valid operation on mjData during `reset` is for a plugin to write into its own state variable slots and data struct. We modify the function signature to only provide access to these.

PiperOrigin-RevId: 495032492
Change-Id: Ic6d2967d2571a9083cbca1ba239ca70a8a51f474
2022-12-13 08:41:35 -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 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
Saran Tunyasuvunakool 26bdb7c8b8 Replace __attribute__((constructor)) with C++ constructor.
The use of __attribute__((constructor)) made the previous commit fail to build in MSVC.

PiperOrigin-RevId: 474891117
Change-Id: I86a71bb8f3226ee49a8b5e8c07adc613623042b3
2022-09-16 13:39:39 -07:00
Saran Tunyasuvunakool 1e2a9a53bc Implement plugin mechanism for actuators and sensors.
PiperOrigin-RevId: 474874088
Change-Id: I65a8ffdf845f4fa0f8266c165883a747ab5812d8
2022-09-16 12:21:29 -07:00