Commit Graph

866 Commits

Author SHA1 Message Date
Saran Tunyasuvunakool 06b70832ce Add keyboard event callback for Python passive viewer.
Fixes #766
Fixes #846

PiperOrigin-RevId: 549449372
Change-Id: I37d17f1162c66d0e8482d402aae22d9a16b59deb
2023-07-19 15:54:44 -07:00
Saran Tunyasuvunakool f7847ba73e Fix GLFW crash when Python exits while the passive viewer is running.
Fixes #790

PiperOrigin-RevId: 549440435
Change-Id: I808f6aaab6662225e5fe1131e0da72eca6011ba9
2023-07-19 15:20:46 -07:00
Saran Tunyasuvunakool 8386b28877 Change "MIME type" to "Media Type".
MIME type is the historic nomenclature for Media Type, see e.g. https://www.iana.org/assignments/media-types/media-types.xhtml.

PiperOrigin-RevId: 549394435
Change-Id: I000e044a35ec44392e9c41bab6383aa89cdefc49
2023-07-19 12:35: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
Saran Tunyasuvunakool 7603b07a20 Fix broken Linux build in 5fcdae771b.
PiperOrigin-RevId: 549338643
Change-Id: Icb2de7aa77ddb5d6c9bbf6a1140ef388ead5368c
2023-07-19 09:27:25 -07:00
Kyle Bayes 5fcdae771b Add content_type attribute that takes a MIME type to specify the file contents for meshes, hfields, and textures.
PiperOrigin-RevId: 549302344
Change-Id: I30a8adfef5b5d87bb20479329f3396892f5137ff
2023-07-19 06:51:36 -07:00
Saran Tunyasuvunakool 5f327b0c31 Add missing pybind definition for update_mesh.
PiperOrigin-RevId: 548395521
Change-Id: Id21a1ef6daa94a221062e7354db3e906611f0f36
2023-07-15 14:57:38 -07:00
Copybara-Service ac4ed87a9f Merge pull request #985 from thowell:main
PiperOrigin-RevId: 548330978
Change-Id: I3e9e8e0ae55b8b56ab41ce316a1dd129029cea93
2023-07-15 03:11:56 -07:00
taylor howell e695a95efb fix mjd_transitionFD comment 2023-07-14 13:50:57 -07:00
Saran Tunyasuvunakool 0ccfef7314 Add update_{hfield,mesh,texture} methods to the passive viewer.
Fixes #812.
Fixes #958.
Fixes #965.

PiperOrigin-RevId: 548181282
Change-Id: I6eb0cd2ce52c66083e83dd08d69e0cfb4178dbba
2023-07-14 11:43:36 -07:00
Yuval Tassa b5bef1b639 Describe c-frame variables.
Fixes #982.

PiperOrigin-RevId: 548060614
Change-Id: I2164afc07c02e657b1b924a5afc59209356b57eb
2023-07-14 01:59:43 -07:00
Google DeepMind 8f3c488de8 allow specifying static bodies when parsing URDF
PiperOrigin-RevId: 547664406
Change-Id: I4b555431d1877fb7547c6b550387cd4230c2b0c4
2023-07-12 19:42:09 -07:00
Kyle Bayes 242aea93c6 Bump oldest supported MacOS to version 11.
PiperOrigin-RevId: 547479684
Change-Id: Idb6a432af0e7872ca087a0c571aafa72e9528818
2023-07-12 06:38:26 -07:00
Yuval Tassa 77b3533d90 Improve mju_cross implementation.
- Allow in-place cross product a = a x b using `mju_cross(a, a, b)`.
- Easier for compiler to optimize since tmp cannot alias a or b (verified with godbolt).

PiperOrigin-RevId: 547265908
Change-Id: If965867e08c1bc980e71729e38f6855e32de18b2
2023-07-11 12:35:02 -07:00
Alessio Quaglino e2677d6057 Check references for BVH data structure.
PiperOrigin-RevId: 547175700
Change-Id: I10e47f0c81ad25563d1f149bf4d2310ee515b1be
2023-07-11 06:49:20 -07:00
Kyle Bayes 24c1ec9aec Add support for printing to stdout in mj_saveLastXML.
PiperOrigin-RevId: 546849864
Change-Id: I799ea3fcd723cf036f82ef5c1ef8152c314072dc
2023-07-10 06:08:10 -07:00
Yuval Tassa 5cfbb6ac8b Add mjd_quatIntegrate, expose mjd_subQuat.
PiperOrigin-RevId: 546252926
Change-Id: I7d6b2bd6536e7e8afc368f3c46037c20f6a1cb5e
2023-07-07 05:33:24 -07:00
Saran Tunyasuvunakool 7401d6786a Add a test to check that mjData values for the world body are initialized.
PiperOrigin-RevId: 545493742
Change-Id: I502b57450ca858b0e96823a416cd7d930fd34489
2023-07-04 12:56:56 -07:00
Yuval Tassa 761649c3a3 Improvements to testspeed.cc:
- Turn on internal profiling by default, adding "other" category.
- Print step timing in microseconds.

PiperOrigin-RevId: 545493349
Change-Id: I0cd5fea1206b3f86f1c757130169975d6862733d
2023-07-04 12:53:59 -07:00
Alessio Quaglino 46e06c4cac Add elasticity plugins to xml_native_writer_test. Fixes #961.
PiperOrigin-RevId: 545454207
Change-Id: I4e93499eaa53e5bc8c8afa682986657cef3ac20f
2023-07-04 08:30:30 -07:00
Saran Tunyasuvunakool 2b38148d24 Explicitly zero out cinert of the world body.
Values of `cinert` are only set by `mj_comPos` for body 1 and above, which leaves the values for body 0 uninitialized. This triggers a `use-of-uninitialized-value` error under msan when the entire `cinert` array is read.

PiperOrigin-RevId: 545453619
Change-Id: I7bfdb4e4e33677903fc90c6ad070490aa65bf464
2023-07-04 08:26:02 -07:00
Kyle Bayes 95167fab2d Add utility function for merging directory names with filenames, and fix issue in mj_addfileVFS where directory names without trailing filesystem separators won't append correctly.
PiperOrigin-RevId: 545450158
Change-Id: I550394f11ac2837d35f3d869f8718a119a9eac38
2023-07-04 08:09:01 -07:00
Kyle Bayes 82e85e24e5 Fix nv precounting bug for dense allocation in contact constraint.
PiperOrigin-RevId: 545441998
Change-Id: I12951d9022d78838a67d8e1d9d80d41b73e7c29d
2023-07-04 07:26:49 -07:00
Copybara-Service d2fc7c1139 Merge pull request #947 from Balint-H:feature/unity-export
PiperOrigin-RevId: 545261978
Change-Id: I9b4b7eb8dc8fc58581a83435c31bd96384c11a55
2023-07-03 12:14:10 -07:00
Yuval Tassa 906a8e8b27 Correct shortening of camera name in simulate.cc (for UI menu item)
Fixes #963

PiperOrigin-RevId: 545187656
Change-Id: Ib213d693569d884915fba99f150df4fd5f53984c
2023-07-03 04:32:27 -07:00
Bálint Hodossy 0e4d638d11 Add exporter based on existing MjScene functionality 2023-07-02 08:55:51 +01:00
Copybara-Service a36cb0ce3f Merge pull request #949 from Ein04:patch-1
PiperOrigin-RevId: 544517699
Change-Id: Ic12feb62f3e90d93b1be122a90f0a6fe062ac411
2023-06-29 18:32:37 -07:00
Yuval Tassa bce2043762 Tighten const qualifiers in collision functions.
PiperOrigin-RevId: 543789453
Change-Id: I929c68b9100a093738c0de6c0965dab4ded1084b
2023-06-27 10:44:58 -07:00
Copybara-Service b96532181c Merge pull request #936 from thowell:main
PiperOrigin-RevId: 543653302
Change-Id: I174efb329a9023199ba0267d3fcd308805ff9cd0
2023-06-26 23:59:08 -07:00
Saran Tunyasuvunakool 551a7bbc38 Drop support for Python 3.7.
Python 3.7 reaches end-of-life on 27 June 2023 (https://devguide.python.org/versions/), and future versions of MuJoCo (after 2.3.6) will no longer support it.

PiperOrigin-RevId: 543594006
Change-Id: I66a7db3dab5d08f2fc52912c43e1532080600fc8
2023-06-26 18:05:32 -07:00
Yuval Tassa a7021df63e Add primitive sphere-cylinder collider.
PiperOrigin-RevId: 543586615
Change-Id: Icd47123e619f731f16dedfec25d825e44c24c036
2023-06-26 17:25:32 -07:00
Yuval Tassa 1d6d6f33bf Cosmetic clean-up and a few micro-optimisations for primitive colliders.
PiperOrigin-RevId: 543559919
Change-Id: I345ccbdca4303e82d1097a5a4bf9381c9f845617
2023-06-26 15:36:20 -07:00
Ruiyu G ca3823343d fix typo in computation.rst 2023-06-22 17:28:56 -07:00
Ruiyu G 14cc32bbe5 Fix typo. 2023-06-22 16:39:44 -07:00
Yuval Tassa c50c92ccc8 Add mjv_connector, identical to mjv_makeConnector but with a more convenient "from-to" parameterization.
PiperOrigin-RevId: 542343761
Change-Id: I75f5ff3c404a2a9f65dfed706e590efd7b951f6e
2023-06-21 13:19:36 -07:00
Nimrod Gileadi 74747e2ae6 Don't accept NaN geom sizes.
PiperOrigin-RevId: 542209911
Change-Id: I80f9728e8e624d19783370ba5072f39624c1bbe7
2023-06-21 04:02:48 -07:00
Copybara-Service 516c5a8bbe Merge pull request #935 from traversaro:patch-25
PiperOrigin-RevId: 542013022
Change-Id: I1339ff72c961e815143e9ab423497f603a4b2dd4
2023-06-20 12:23:49 -07:00
Saran Tunyasuvunakool 0945af7b8a Apply version number 2.3.6 to the pending changelog.
PiperOrigin-RevId: 541964989
Change-Id: I66a18f2bae624f63962f28f434b9a5cf90d260c7
2023-06-20 10:08:34 -07:00
Saran Tunyasuvunakool f555261934 Bump MuJoCo dependency versions.
PiperOrigin-RevId: 541945332
Change-Id: I13e67a2ef55a4b61600563c510e8f22405a87943
2023-06-20 09:14:28 -07:00
Yuval Tassa 87f35b7703 Cite [Simulink Blockset for MuJoCo Simulator](https://github.com/mathworks-robotics/mujoco-simulink-blockset) in Third Party Section of the README.
PiperOrigin-RevId: 541848569
Change-Id: I42ad86979a8bbeb5bb8f8ce9dab06b9cc3c74007
2023-06-20 02:48:38 -07:00
Taylor Howell 52aa5b645c Update python.rst 2023-06-19 14:12:08 -07:00
Silvio Traversaro 06decde594 MujocoDependencies: Move comment back to related code 2023-06-19 15:38:10 +02:00
Saran Tunyasuvunakool 5e220d43fe Add missing Nvidia ICD file for glvnd to enable GPU rendering on Colab.
PiperOrigin-RevId: 541615331
Change-Id: Iff85772bffb245330898e9c2a511d77896bac0cf
2023-06-19 05:37:25 -07:00
Kyle Bayes ac1f41160d Add engine internal error macro mjERROR to prepend calling function to error function.
PiperOrigin-RevId: 541584847
Change-Id: I57447e64375413ee07aa96372a402e1ced59ff4a
2023-06-19 03:29:31 -07:00
Saran Tunyasuvunakool c9e9cd8b35 Change org name to "Google DeepMind" in various docs.
PiperOrigin-RevId: 540691205
Change-Id: I9eb99eb18893e6748892334470211dbd9d5808db
2023-06-15 14:28:25 -07:00
Kyle Bayes 2644de2438 Fix typo in README.md.
PiperOrigin-RevId: 540549566
Change-Id: Id5446379597f777bdb4bb784a52ff6baa3182e01
2023-06-15 05:18:33 -07:00
Copybara-Service 7f549d2e03 Merge pull request #921 from thowell:main
PiperOrigin-RevId: 540492521
Change-Id: Ie7a43e259bce15dd0fe3f27e61779afbf08f8686
2023-06-15 00:32:19 -07:00
Kyle Bayes 2b6ea95d16 Fix dimension of res vector in sparse benchmark test.
PiperOrigin-RevId: 540336845
Change-Id: I79d4c487455a0642d57f36abe0e38eae92f212fa
2023-06-14 11:49:53 -07:00
taylor howell b81dfbbc48 fix python type_error mj_differentiatePos, mj_integratePos 2023-06-14 12:19:58 -06:00
Kyle Bayes c79dc39e50 Internal change to parsing benchmarks.
PiperOrigin-RevId: 539926231
Change-Id: Ia9128df6dad0b720950bbcb458b8ccb95758dae6
2023-06-13 04:54:46 -07:00