Commit Graph

338 Commits

Author SHA1 Message Date
Alessio Quaglino 23e4c03efc Add plugin subdirectory to the tests.
PiperOrigin-RevId: 480631088
Change-Id: I7e80f942efed56d47f503c773f3e9ed5295c4917
2022-10-12 08:33:40 -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
Saran Tunyasuvunakool 794ef0b771 Reset arena pointer if memory cannot be allocated for all efc_ arrays.
Startblock:
   diffbase is submitted
PiperOrigin-RevId: 479922015
Change-Id: If60d89628e033ff253509f109b2c4d28912a3903
2022-10-09 08:06:39 -07:00
Saran Tunyasuvunakool 5af11ca083 Add XML parsing test case for large memory specification without suffix.
Startblock:
   diffbase is submitted
PiperOrigin-RevId: 479914967
Change-Id: I574612bf875c929803cf5abc3b1885e9855dee29
2022-10-09 06:39:50 -07:00
Saran Tunyasuvunakool b2159a8e35 Don't cast memory XML attribute to int prematurely.
PiperOrigin-RevId: 479910328
Change-Id: I40a210852eeced75871361eb6531169ad0f79b6a
2022-10-09 06:02:29 -07:00
Saran Tunyasuvunakool 1a393429ef Fix formatting of large unsigned numbers in mju_warningText.
PiperOrigin-RevId: 479902611
Change-Id: Ia7187478a246b8b068684e75d6f3851d749844c9
2022-10-09 04:55:26 -07:00
Saran Tunyasuvunakool c2f1381f31 Update dependency versions.
PiperOrigin-RevId: 479839325
Change-Id: I44f51ed9fd756cf8c3397489f045492cca0bf54a
2022-10-08 16:55:29 -07:00
Copybara-Service 2a8acf77ed Merge pull request #491 from Balint-H:weld
PiperOrigin-RevId: 479802394
Change-Id: Ieefec4e1ca29fb137947d458837d8ff3c3ee97f3
2022-10-08 09:24:29 -07:00
Bálint Hodossy 0ae8b966e7 Remove stray space in MjEngineTool 2022-10-08 14:04:37 +01:00
Saran Tunyasuvunakool 16c11b9e83 Add metadata to mujoco.dll when building on Windows.
PiperOrigin-RevId: 479695549
Change-Id: I5398e851fd9e5a841c7cc1567dee209e4824ab7c
2022-10-07 16:46:17 -07:00
Alessio Quaglino d55e70b576 Add links automatically to all sections of XMLschema.
PiperOrigin-RevId: 479556475
Change-Id: Ie188ecc5c0801bd6bbe27554afcb5436c19f5fa6
2022-10-07 05:33:52 -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 077acb1c8f Revert test fixture name in user_{model,objects}_test.cc.
These were inadvertently renamed to XMLReaderTest by an overzealous auto-renamer in 58fd72f53d.

PiperOrigin-RevId: 479520906
Change-Id: Ia50ec659f21a92cbcd4b953cde54dd98f0adb67a
2022-10-07 01:42:55 -07:00
Saran Tunyasuvunakool f0343ff3ed Fix documentation for nstack to more accurately describe what it does now.
PiperOrigin-RevId: 479409986
Change-Id: Ic7cfadb610e6938bdea58cc01b381fd2bbc21a7c
2022-10-06 14:14:50 -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
Copybara-Service 4d85a464cc Merge pull request #515 from stonfute:main
PiperOrigin-RevId: 479296643
Change-Id: Id510d76892d59c8d819c4115610fb7ea8a0efe27
2022-10-06 06:16:11 -07:00
Alessio Quaglino 3e378e2c37 Autogeneration of XML schema in documentation.
BEGIN_PUBLIC

Add script for the autogeneration of the XML schema in the documentation.

ENG_PUBLIC

PiperOrigin-RevId: 479289884
Change-Id: I49423195fbd1067d4a4d7be78018d446575bc7e1
2022-10-06 05:43:36 -07:00
stonfute 401e5daf82 Update float parsing
Update float parsing using InvariantCulture to not depend on OS language to parse float value.
Usefull for French, German, ... users where comma is default notations for the decimal point parsing.
2022-10-06 12:14:18 +02:00
Tom Erez d995787cb7 Use angle brackets for standard-library imports.
PiperOrigin-RevId: 479168997
Change-Id: Ib6820f159c35fff4be9169679cde344855a9cd53
2022-10-05 16:16:58 -07:00
Kevin Zakka af7f48d9e6 Fix video embedding in simulate README.
PiperOrigin-RevId: 478823401
Change-Id: Ie3c6b94621dcfdcf4a27b7d6ddb1c2be08353d0a
2022-10-04 10:24:17 -07:00
Saran Tunyasuvunakool 5ef8cb6bbc Disable contact in the temporary mjData created during mjCModel::TryCompile.
PiperOrigin-RevId: 478793238
Change-Id: I28ed324b70931eb416ca57574570bf02c977f337
2022-10-04 08:21:11 -07:00
Alessio Quaglino bc1490b7a8 Add realtime parameter to visual global.
PiperOrigin-RevId: 478775714
Change-Id: Ic2d178a5c57d298d005215219ce8470392c4651b
2022-10-04 07:09:15 -07:00
Kevin Zakka f85cfb8ed2 Fix broken simulate links.
PiperOrigin-RevId: 478775551
Change-Id: I1c4f43c7cbe01f267948f5915a7511744eb0d158
2022-10-04 07:07:57 -07:00
Saran Tunyasuvunakool f9b4593d11 Add macro for dynamic library plugin initializer definition.
PiperOrigin-RevId: 478544478
Change-Id: Idc899eef25261f2cb0b8317a84989cea2d8c2243
2022-10-03 10:40:30 -07:00
Saran Tunyasuvunakool 7072b61cc5 Make Simulate app scan for plugin libraries on launch.
PiperOrigin-RevId: 478502151
Change-Id: I9057e74af4d207cfc551e701134820100bdeee78
2022-10-03 07:47:42 -07:00
Kevin Zakka 7e89d8dab0 In simulate UI, clear shortcut string for flags with no shortcuts.
PiperOrigin-RevId: 478467279
Change-Id: Icc4317d9e35b41871143572275d03adf7e13d956
2022-10-03 04:31:17 -07:00
Alessio Quaglino 52c415eb80 Move schema from XMLReference to the new XMLschema RST file.
PiperOrigin-RevId: 478436495
Change-Id: Ib1db879eef2720f897360810eccb198bb9946f72
2022-10-03 01:18:57 -07:00
Kevin Zakka cce35e1816 Add assetdir compiler option.
PiperOrigin-RevId: 478117894
Change-Id: I4a93108e00558034aa02d22047da80adfa4232b2
2022-09-30 17:59:25 -07:00
Nimrod Gileadi 8a8305d3ca Avoid unnecessary copies after of mju_mulQuat.
Since fdbbc8bbe0, mju_mulQuat allows in-place computations.
There were a few places where the result was unnecessarily assigned to a temporary variable.

PiperOrigin-RevId: 477746005
Change-Id: I7351ef4796e7d70a4a54b930037bfaadee781f12
2022-09-29 09:33:50 -07:00
Kevin Zakka 48f2ed99a5 Enforce strict positivity of extent and znear attributes at parse time.
PiperOrigin-RevId: 477597498
Change-Id: Ic927655cd5ba2fd8fdb1a1a5f7e54ff5040c3370
2022-09-28 17:53:05 -07:00
Nimrod Gileadi d3dbc554b9 LQR.ipynb: Don't refer to global model from Renderer.
PiperOrigin-RevId: 477444216
Change-Id: I1e71d823428b1c4f60751720fe5b85d5ae98c5c2
2022-09-28 07:11:50 -07:00
Saran Tunyasuvunakool 323d6e96fd Fix typo and weird indentation in documentation.
PiperOrigin-RevId: 477285765
Change-Id: I90dd05c85898193f67fa1ec94e9d3ffdaa7701e8
2022-09-27 15:09:24 -07:00
Yuval Tassa a6b338db64 mju_boxQP only reads from the lower triangle of the input Hessian.
- Before this change, an asymmetric Hessian would lead to solver failure. After this change the Hessian is symmetric by definition (upper triangle is ignored).
- API documentation was updated to reflect this contract.

PiperOrigin-RevId: 477135411
Change-Id: I60d011d36853afebac26c359771c217baf101360
2022-09-27 04:32:40 -07:00
Copybara-Service f433776c9b Merge pull request #504 from engnadeau:build/phony-targets
PiperOrigin-RevId: 477022393
Change-Id: I3c808e475e7af4fabb09d4cb1b045538dced3045
2022-09-26 16:44:00 -07:00
Nicholas Nadeau f637dd76d5 build(makefile): added proper .PHONY target 2022-09-26 10:49:08 -04:00
Nicholas Nadeau 0ca12b3171 build(makefile): added proper .PHONY target 2022-09-26 10:48:38 -04:00
Nicholas Nadeau f3b9536c89 build(makefile): .PHONY targets are cumulative 2022-09-26 10:48:00 -04:00
Nicholas Nadeau ea3b48afeb build(makefile): explicit DEFAULT_GOAL 2022-09-26 10:47:18 -04:00
Kevin Zakka c13b9e89b6 Fix typos.
PiperOrigin-RevId: 476632296
Change-Id: I136556acc43d3cd24273fb975a515e72a3cf23d7
2022-09-24 15:25:39 -07:00
Saran Tunyasuvunakool b1a79aa01b Replace internal-only imports and comments that aren't valid externally.
PiperOrigin-RevId: 476492651
Change-Id: I310a21a73a65da3a5939f5cb8a1c8a67c8595863
2022-09-23 16:58:58 -07:00
Saran Tunyasuvunakool 6acc111c48 Remove internal-only paths from Colab notebook.
PiperOrigin-RevId: 476416594
Change-Id: I54e7b27d30da76f7690341e70f182e7e5d0dec96
2022-09-23 11:15:39 -07:00
Kevin Zakka fe9bd74d3f Fix doc typos.
PiperOrigin-RevId: 476353794
Change-Id: I37db6c440893db55b2d02f78ce52e554b150fa32
2022-09-23 06:28:54 -07:00
Kyle Bayes 36b47e56d0 Use squared distance for sphere comparison in collision filtering.
PiperOrigin-RevId: 476165394
Change-Id: Id53493fc7cf4c10a22f5f885baeec0ed4b1d8574
2022-09-22 12:18:23 -07:00
Saran Tunyasuvunakool c13979cd17 Add id and name properties to MjModel and MjData indexers.
PiperOrigin-RevId: 476078133
Change-Id: I905cc8ec147ac595cd56f0a42e38013ae1ac6903
2022-09-22 06:19:03 -07:00
Yuval Tassa 6e256c03b7 Fix location of LQR colab notebook.
PiperOrigin-RevId: 475562228
Change-Id: Ifa51caee6c573a15814b57fb1237d0fdb859c4b8
2022-09-20 08:35:22 -07:00
Yuval Tassa f151e84a1d Add LQR tutorial colab notebook.
PiperOrigin-RevId: 475551810
Change-Id: Iac8ca4fff88331f325e34fef01b41307603a6416
2022-09-20 07:41:16 -07:00
Copybara-Service f13a58326d Merge pull request #492 from rohanpsingh:topic/fix-humanoid-xml
PiperOrigin-RevId: 475530310
Change-Id: I2740af8f61cc9d0ffd2c58333880e638a1ef12a6
2022-09-20 05:35:52 -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