Commit Graph

172 Commits

Author SHA1 Message Date
Yuval Tassa fcf4131771 Add mj_jacSubtreeCom for computing subtree center-of-mass Jacobians.
PiperOrigin-RevId: 464075727
Change-Id: If679c0fdd05b7dc84154cec00963aeea7bbdacc3
2022-07-29 07:44:32 -07:00
Alessio Quaglino cd489fc72d Check if STL vertex coordinates are within maximum bounds.
PiperOrigin-RevId: 464047975
Change-Id: I5c8c32aca468aaee26ff5cf9466a0f2f81721010
2022-07-29 04:13:59 -07:00
Alessio Quaglino 8ead54d2dc Add missing gain type "affine" to general actuators.
PiperOrigin-RevId: 463605415
Change-Id: I849e6f2f0ec5eaedaa774099e5e07f27919bb943
2022-07-27 09:24:17 -07:00
Saran Tunyasuvunakool 807097148e Add internal-only API for creating mjrContext with custom offscreen FBO size.
PiperOrigin-RevId: 463048634
Change-Id: I195cbbf0e13a6c032e86070e8e4c11ad53af8a71
2022-07-25 03:47:02 -07:00
Saran Tunyasuvunakool 95b6327bb5 Fix rendering of reflection for transparent geoms.
PiperOrigin-RevId: 462589429
Change-Id: Ibda2d2b83cb43804644fecfe3a1e2a8496f3de56
2022-07-22 04:09:02 -07:00
Saran Tunyasuvunakool b849023069 Miscellaneous linting in src/engine.
PiperOrigin-RevId: 462415459
Change-Id: I6c79c592613c6b0a665af06faf945586bb6ba32d
2022-07-21 10:16:49 -07:00
Kevin Zakka eef473b1e1 Fix hyperlink to mjd_transitionFD.
PiperOrigin-RevId: 462150695
Change-Id: If736fee2cb629d649c2931aa0c0cbf4ddb56d68b
2022-07-20 08:44:36 -07:00
Yuval Tassa f6e1b02f48 Fix rendering of mjd_transitionFD docstring.
PiperOrigin-RevId: 462117193
Change-Id: Ia7fbd0c1a3cb3a9241f75759fc416a84d55d75fe
2022-07-20 05:23:29 -07:00
Kevin Zakka fa1536c2de Nit fixes to documentation.
PiperOrigin-RevId: 461932200
Change-Id: I3f929e09239c526b1686aa65641e47e759d32827
2022-07-19 11:27:33 -07:00
Alessio Quaglino 8dd9971409 Raise error if mesh has flipped faces.
PiperOrigin-RevId: 461860424
Change-Id: Ib23c50cf7f64de1173404d2f65ad87177fab45b3
2022-07-19 05:47:46 -07:00
Yuval Tassa e6480c76a9 Remove unused imports.
PiperOrigin-RevId: 461829404
Change-Id: I9ae44085af211013ed2b677b7d3a545ccec34605
2022-07-19 02:11:56 -07:00
Tom Erez 151449c47a binary retriever is only relevant for the Editor.
PiperOrigin-RevId: 461629986
Change-Id: Ib2e27bdf30c1fb696773b8d05b3e42a6adc3e0fe
2022-07-18 08:47:03 -07:00
Tom Erez e8a9db82b8 Retrieve the binary only when the MuJoCo package is installed.
PiperOrigin-RevId: 461524833
Change-Id: Ie8ca9dda71b35262f99688d02f71be77c251ea3e
2022-07-17 20:48:06 -07:00
Tom Erez 0180d839a9 Change assembly definition to target only the Editor.
PiperOrigin-RevId: 461522513
Change-Id: I3eb146eff71f0293c6f63d835d776b66b07c52ff
2022-07-17 20:21:42 -07:00
Tom Erez 26a0441e7c add a script that converts MJCF models to PhysX.
PiperOrigin-RevId: 461520759
Change-Id: I177195af60645169294180da8b99740426d23d8f
2022-07-17 20:08:31 -07:00
Saran Tunyasuvunakool 69e3fe1730 Add CI builds on Ubuntu 20 with GCC 9, GCC 10, Clang 10, and Clang 11.
PiperOrigin-RevId: 461500095
Change-Id: I812d1ac2a864e404c3052b3aa65443c5eb975ccf
2022-07-17 16:00:40 -07:00
Saran Tunyasuvunakool cb01022124 Uncomment pypi-versions-badge from README.md.
This badge now works correctly since version 2.2.1 has been uploaded to PyPI.

PiperOrigin-RevId: 461476606
Change-Id: I22b40d2fbf900a7cbd86b04f7af69c313bcc721d
2022-07-17 10:55:55 -07:00
Saran Tunyasuvunakool 373cc894a8 Bump version number to 2.2.1.
PiperOrigin-RevId: 461471944
Change-Id: Ia752d992fabdc57b822bc30b01030c19162917ac
2022-07-17 09:50:31 -07:00
Nimrod Gileadi 1392843aed Fix the use of __has_builtin for GCC < 10.
The breakage was introduced in af12322e9d.

__has_builtin was introduced to GCC in version 10, and the arithmetic overflow builtins were available since version 5.

Fixes deepmind/mujoco#386.

Tested with GCC 9.

PiperOrigin-RevId: 461463027
Change-Id: I76627539a5c0e7f5617b56a2c9ada9251bceb0f6
2022-07-17 07:51:40 -07:00
Copybara-Service 5ef1e59f06 Merge pull request #385 from wpumacay:fix-build-without-tests
PiperOrigin-RevId: 461352099
Change-Id: I27ad117a5a0055af32abc70f0cc3aea8dff8fdca
2022-07-16 08:02:47 -07:00
gregor 0223773a54 Fix typo on CMake script 2022-07-16 06:51:59 -05:00
gregor 06305c0ae1 Merge remote-tracking branch 'upstream/main' into fix-build-without-tests 2022-07-16 06:45:52 -05:00
gregor 7ee01ddcac Fixes #382 (compile with unittests disabled) 2022-07-16 05:56:32 -05:00
Saran Tunyasuvunakool c9ec2654a2 Fix binary rpath for Linux releases.
PiperOrigin-RevId: 461262210
Change-Id: If2d97176abef15bc250841ad518fd1f5915f698a
2022-07-15 16:24:11 -07:00
Kevin Zakka 461f8ccbda Add PyPI classifiers and README badge.
PiperOrigin-RevId: 461197208
Change-Id: I2c82a83d5f8719d5bc7f3373fd39d45ed965f218
2022-07-15 08:17:06 -07:00
Nimrod Gileadi af12322e9d Avoid integer overflows when computing buffer sizes.
If any field size would cause an overflow, fail to create the model.

PiperOrigin-RevId: 460466485
Change-Id: Ic8b84f3b56f2617c04ba04604729f0f76c6d62ee
2022-07-12 08:20:40 -07:00
Yuval Tassa d5059f484d Add license badge to README.
PiperOrigin-RevId: 460437521
Change-Id: I25514343a6b0f507c661261a20d1ad07465491fc
2022-07-12 05:40:28 -07:00
Yuval Tassa 138a01625e Fix typo.
PiperOrigin-RevId: 460312313
Change-Id: I4ff1f82afb28d1286e33aaee8b008f76f81935ac
2022-07-11 15:20:38 -07:00
Yuval Tassa 50a72d7227 Don't use var[restrict n] syntax.
This notation is unsupported by MSVC.

PiperOrigin-RevId: 460030944
Change-Id: Ib86b76c8767d83ab49e4db9d3d0fd1437721df20
2022-07-10 02:31:21 -07:00
Yuval Tassa ea956dfe34 Derivatives of ellipsoid fluid model.
PiperOrigin-RevId: 459751881
Change-Id: I52db87d82e20e10698b13065df2e983b9841bd7a
2022-07-08 07:19:48 -07:00
Yuval Tassa 7034851d0a Add slider-crank example to model/
PiperOrigin-RevId: 459746610
Change-Id: I6ff609718adba7166cef6a105331d83cc3ee3097
2022-07-08 06:43:14 -07:00
Yuval Tassa c14a7ef4a7 Add clock sensor type.
PiperOrigin-RevId: 459720950
Change-Id: Ibda48ae7dc4aa7be451a947a1c53d10a7eaf176b
2022-07-08 03:50:08 -07:00
Yuval Tassa d3a86bb748 - Add floating changes to changelog.
- Add sections about the state and derivatives to the Computation chapter.

PiperOrigin-RevId: 459032736
Change-Id: I0b69401688f24c84d5747f1b49980e38e19a54a3
2022-07-05 02:18:01 -07:00
Yuval Tassa 6d01627c0b No longer modify control vector in-place, add mju_clip.
- Never modify `d->ctrl`:
  - `ctrl` values which are outside their respective `ctrlrange` are clamped internally, but `d->ctrl` itself is unmodified.
  - Similarly, if `mjWARN_BADCTRL` is raised (NaNs or huge values), `ctrl` is cleared internally, but `d->ctrl` itself is unmodified.
- `mjWARN_BADCTRL` is no longer raised for `d->ctrl` values that are larger in absolute value than `mjMAXVAL`, if clamping makes them smaller than that.
- Added `mju_clip()` utility function.
- Added missing warning string for `case mjWARN_BADCTRL`.

PiperOrigin-RevId: 459025950
Change-Id: Ifbf974f9c02c3d70afdaa3114018fc81dfd746d3
2022-07-05 01:38:32 -07:00
Yuval Tassa 09a5efc09e Add control values to keyframes.
- Add basic test for keyframes.
- Add missing documentation for keyframe mocap positions and quaternions.

PiperOrigin-RevId: 459021649
Change-Id: I91cf7ecbddc6262e8c72a868eeb82d627f389fb3
2022-07-05 01:07:37 -07:00
Yuval Tassa 5ba880506c Improve header and paragraph spacing.
PiperOrigin-RevId: 458935896
Change-Id: Ibbd084ddd18cf9c1a5fe59b3ca60b715595cf606
2022-07-04 11:05:16 -07:00
Tom Erez 3df3c95812 Update C# bindings.
PiperOrigin-RevId: 458919739
Change-Id: I7737d2736491dae8fce46bc36aa5135007a7a588
2022-07-04 08:47:29 -07:00
Nimrod Gileadi b1e185bb9e Fix ReadTheDocs config.
build.os is a required field, see docs: https://docs.readthedocs.io/en/stable/config-file/v2.html#build-os

PiperOrigin-RevId: 458465958
Change-Id: I24889d32996328290c2f470c4f2a593fa89a637d
2022-07-01 07:31:00 -07:00
Nimrod Gileadi 2b319c81bc Update sphinx and jq for documentation.
Old versions of Sphinx don't support Python 3.10.

sphinx-rtd-theme 1.0.0 supports Sphinx 4.x:
https://sphinx-rtd-theme.readthedocs.io/en/stable/changelog.html#features

PiperOrigin-RevId: 458455382
Change-Id: Ic34a7d350d5ecd1dfff53d88472a3b25a7245ec0
2022-07-01 06:27:14 -07:00
Nimrod Gileadi dbef8e6c2b Fix memory leaks when loading an invalid model from MJB.
PiperOrigin-RevId: 458445745
Change-Id: I99229a66fc86f7763cfe2b5382229b0304bdfa9c
2022-07-01 05:21:55 -07:00
Alessio Quaglino 2d0995b47c Add visualisation groups to skins.
PiperOrigin-RevId: 458441645
Change-Id: I14324e8efda5142b2718a5cc9215228c7556dbf7
2022-07-01 04:57:34 -07:00
Nimrod Gileadi 040deb161f Run cmake-format on test/xml/CMakeLists.xml
PiperOrigin-RevId: 458226371
Change-Id: I34f43a890dee7511597b48b303d5674ab9435d64
2022-06-30 07:59:39 -07:00
Nimrod Gileadi d567263959 Fix null pointer dereference in mj_loadModel.
mj_makeModel returns NULL if any of the array sizes are negative. Callers of the function need to handle that case.

PiperOrigin-RevId: 457948558
Change-Id: I9a5c8c0d3293ed0a92c5791f00d3ed34c848e024
2022-06-29 05:09:54 -07:00
Nimrod Gileadi 41bcf2d621 Python bindings: Add __repr__ implementations to grouped views.
PiperOrigin-RevId: 457704673
Change-Id: Idf0d2132ce0872e6ae3eef319b4c3119ab769cd0
2022-06-28 05:23:16 -07:00
Nimrod Gileadi e14cf7ddf1 Python bindings: Give a detailed error message when passing non-existent name.
List all valid names in the error message.

Fix an off-by-one error when accessing elements by numeric index (rather than name).

PiperOrigin-RevId: 457702283
Change-Id: I6e4f1518b4ecd9ca91ac9b0bf6b0963fc0a9bd18
2022-06-28 05:06:28 -07:00
Nimrod Gileadi a077db1b91 Implement __repr__ and __eq__ on MjrRect in Python bindings.
PiperOrigin-RevId: 457457401
Change-Id: I0d395ff301fbcf775b4766ac81c830a625b3be63
2022-06-27 05:55:38 -07:00
Nimrod Gileadi 263c92e301 Update lodepng to latest version.
This speeds up PNG loading significantly.

PiperOrigin-RevId: 457431911
Change-Id: I28da22a1fdbfc912d187a40cd731d9c04b83e07c
2022-06-27 03:06:55 -07:00
Kevin Zakka afc8395376 Make installation instructions more explicit in the README.
PiperOrigin-RevId: 456976659
Change-Id: I9bac31771eb62e069107b30122478437b67c2ebf
2022-06-24 03:48:26 -07:00
Yuval Tassa 228264c92b Add efficient finite-difference Jacobians of mj_step.
- Add `qH` and `qHDiagInv` to `mjData` to save factorized modified inertia.
- Add `mj_EulerSkip`, `mj_implicitSkip`, to `engine_forward.c`.
- Using the above functions, implement `mj_stepSkip` in `engine_derivative.c`.
- Add `mjd_stepFD` and `mjd_transitionFD` to `engine_derivative.c` to compute `mj_step` Jacobians.
  - Exploit "Skip" functionality for speed.
  - Correctly handle quaternion derivatives.
  - Handle warmstarts and control limits.

PiperOrigin-RevId: 456584811
Change-Id: Iee8541f11e7b66feb8f431cb102d9bbe65461f79
2022-06-22 12:48:48 -07:00
Yuval Tassa 2ea01bf2f6 Add Related Software section to README.md.
BEGIN PUBLIC

Add Related Software section to README.md.

Fixes #312.

END_PUBLIC

PiperOrigin-RevId: 456528399
Change-Id: Icf97a31a5ea16e93edf9856f70dec650c7b70791
2022-06-22 09:06:43 -07:00