Commit Graph

306 Commits

Author SHA1 Message Date
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
Yuval Tassa 5dc26cf4a0 Fix bugs in actuator parsing.
- Adhesion actuator defaults were not parsed, now fixed.
- Both damper and adhesion actuators were requiring `ctrlrange` at parse time, which prevented this attribute from being inherited from defaults, now fixed.
- Added tests for all 3 cases.

PiperOrigin-RevId: 475145255
Change-Id: I8dd6196e20734136d990f522893ebd4d156cd7a8
2022-09-18 11:10:02 -07:00
Yuval Tassa 142c0eb200 Fix typo.
PiperOrigin-RevId: 475014408
Change-Id: I2dd467d12905f640ee6fa131fdee059a89e01ccc
2022-09-17 07:09:36 -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
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
Nimrod Gileadi f556d4d94f Avoid out-of-bounds access when checking file extensions.
Include the '.' in the file extension check.

PiperOrigin-RevId: 474866478
Change-Id: I809ae975e4c8b00f17278735975a7d07e0748643
2022-09-16 11:49:33 -07:00
Tom Erez 68718e76b1 Ensure that memory allocated by mju_malloc is freed by mju_free.
Previously, `vfs->filedata` memory was allocated via `mju_malloc` in C and released using `Marshal.FreeHGlobal` in C#. In 5cc73c30bf, `mju_malloc` started returning 64-byte aligned pointers, which should not be freed by a deallocator that isn't aware of this alignment.

Fixes #479.

PiperOrigin-RevId: 474596441
Change-Id: I8a8383c7eaa2c1ec516d81f92a2f90e7aedfe2ee
2022-09-15 10:26:09 -07:00
Alessio Quaglino 0e05e7ce52 Do not raise an error for flipped triangles if their area contribution is negligible.
PiperOrigin-RevId: 474552367
Change-Id: I9727a74e50a9bab9b04bb0de0b64e11587ed36f1
2022-09-15 07:07:00 -07:00
Nimrod Gileadi c8517e63a4 Mark mjCError and mjXError as [[nodiscard]].
This lets the compiler catch the mistake of creating an exception without throwing it.

PiperOrigin-RevId: 474536776
Change-Id: I5bd18258ce6ddd266adb1c852b1ba9e3063cd0b2
2022-09-15 05:28:57 -07:00
Yuval Tassa 0a0acb3419 Display real-time percentage in paused mode, if different than 100%
PiperOrigin-RevId: 474519561
Change-Id: I54eea97f305dc9b57b9513d6ab5cd75368c2cd45
2022-09-15 03:26:12 -07:00
DeepMind 549437ca52 Fix typo in MuJoCo docs.
PiperOrigin-RevId: 474414621
Change-Id: I0585d0f087fcf82ddb0b606f9680a9ffebeddc67
2022-09-14 16:06:04 -07:00
Alessio Quaglino 0d5a1019a5 Update author list and fix doc typo.
PiperOrigin-RevId: 474411316
Change-Id: Ifcfe1ba90ed6d04db9731f96919c78e63fbd43e0
2022-09-14 15:51:56 -07:00
Tom Erez b1eb1fccef Update bindings to latest version of headers.
PiperOrigin-RevId: 474353426
Change-Id: I749b459c7dc284bf80dd05cb0e6c7ef682a100a8
2022-09-14 11:58:31 -07:00
Yuval Tassa f4e7fa97af Add mju_mulVecMatVec, mutiplies a square matrix M by a vector x on both sides. Returns x^T * M * x.
PiperOrigin-RevId: 474292806
Change-Id: I3432469dbe1f02ccf5a13241c7aa12d824cbe034
2022-09-14 08:05:28 -07:00
Tom Erez ee9eccc992 Update Unity bindings to latest headers.
PiperOrigin-RevId: 474291658
Change-Id: I3d92a83face0e6f05defbb7dd5d883cf8180ae98
2022-09-14 08:00:45 -07:00
Yuval Tassa 8957976674 Add mju_boxQP solving box-constrained quadratic programs.
PiperOrigin-RevId: 474256629
Change-Id: I87d70fe6899608122fe0688b017420a3e81afae2
2022-09-14 04:31:34 -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
Saran Tunyasuvunakool 00576a3bf9 Update icons to match the new banner and add Windows version info.
Also update the README banner so that the background grid lines scale more reliably to different screen PPI.

PiperOrigin-RevId: 473598837
Change-Id: I43434b35333714922128f8fd625aa6eb62521a7f
2022-09-11 11:04:36 -07:00
Copybara-Service 39e34404dc Merge pull request #476 from rohanpsingh:patch-1
PiperOrigin-RevId: 473219692
Change-Id: Ia9f5fe0e8faab38873f41ee8280ffecbc47d43a4
2022-09-09 04:46:10 -07:00
Rohan P. Singh 63f39d797e Update models.rst
Fix broken links
2022-09-09 17:07:28 +09:00
Yuval Tassa d04e37e724 Add Models page to docs.
PiperOrigin-RevId: 472730287
Change-Id: Ie1e5fe3bb30a5fffce8bf73b37300d8d10afd579
2022-09-07 08:25:41 -07:00
Saran Tunyasuvunakool f55a9fccea Add a MuJoCo banner to the README.
PiperOrigin-RevId: 472721942
Change-Id: Ida552f8ffe6ead102d138586c3e280a543c97511
2022-09-07 07:43:26 -07:00
Saran Tunyasuvunakool 9b694103e6 Update dependencies in CMake.
PiperOrigin-RevId: 472698116
Change-Id: I0afc29468555339e0a2cac27977bd68246e483f3
2022-09-07 05:17:54 -07:00
Saran Tunyasuvunakool 94b6ae2b69 Bump version number to 2.2.2.
PiperOrigin-RevId: 472513958
Change-Id: I42f321c6681fdd42c5f80368f612534aa885af74
2022-09-06 11:32:55 -07:00
Alessio Quaglino 3647584caa Fixed typo ntexdata -> ntextdata.
PiperOrigin-RevId: 472461694
Change-Id: Ia97ffd6aeb1ae2df9ab5e11aabba6e361a98152b
2022-09-06 08:18:05 -07:00
Nimrod Gileadi a693a2d981 Don't infer limited attributes automatically by default.
This is an amendment to 4bfc2c0311.

Add an autolimits compiler option. When true, *limited will be inferred from the presence of the *range attributes.
When false, models where limited is not specified, and range is will fail to compile.

PiperOrigin-RevId: 472438650
Change-Id: I489098e879ee695030f44e0d8cd969787e75fb90
2022-09-06 06:11:53 -07:00
Yuval Tassa 0784a46f62 Add safety check to mjui_event.
PiperOrigin-RevId: 471809554
Change-Id: I563cac24781a9da6f7aa8313c9ea0b15c7b30903
2022-09-02 08:38:26 -07:00
Copybara-Service df51a1de59 Merge pull request #467 from aftersomemath:fix-python-setup
PiperOrigin-RevId: 471640674
Change-Id: I588230c597bc49e7a6b5aedb2bd2602f8b538d90
2022-09-01 14:58:40 -07:00
Saran Tunyasuvunakool 4210d31cf0 Restore MJAPI declaration for mjd_transitionFD.
Commit e3a82247c2 removed MJAPI in mujoco.h but not in engine_derivative.h, causing a linking error when building on Windows with MSVC.

PiperOrigin-RevId: 471639915
Change-Id: I6b965e23a19faee6f9f8f9c0168dc2774b19f310
2022-09-01 14:55:15 -07:00
Levi Burner e0f6441a27 swap out cp call with shutil.copyfile closes #462 2022-09-01 16:50:46 -04:00
Yuval Tassa e3a82247c2 Add sensor matrices to mjd_transitionFD.
- Also add missing `mj_jacSubtreeCom` to Python bindings.

PiperOrigin-RevId: 471610181
Change-Id: I31410d194527ce6a7bdbd01e176f3a41efa52d84
2022-09-01 13:00:36 -07:00