Commit Graph

29 Commits

Author SHA1 Message Date
Yuval Tassa 8686339726 Fix typo.
PiperOrigin-RevId: 528763706
Change-Id: Ia8c92fdd7e21ecd456684b4ea443aea017971972
2023-05-02 06:24:18 -07:00
Yuval Tassa b0bc330b54 Add utility functions for banded-then-dense symmetric matrices.
PiperOrigin-RevId: 528757637
Change-Id: I916d843140322c28e857100a6b305a041f704d53
2023-05-02 05:58:08 -07:00
Alessio Quaglino 2ad82d5998 Add mj_multiRay function to perform multiple ray intersection with the same source.
PiperOrigin-RevId: 528684535
Change-Id: I6e1747a4a0910e6061d6154e19ad8723f56c22e3
2023-05-01 23:02:45 -07:00
Yuval Tassa c50177d301 Add mjd_inverseFD for finite-difference approximations of inverse dynamics Jacobians.
Fixes #703.

PiperOrigin-RevId: 527899700
Change-Id: I10e41a381dcecf62c53b3b9aa72a4ce666161366
2023-04-28 09:04:41 -07:00
Saran Tunyasuvunakool 90e14ac8d0 Bump version number to 2.3.6.
Going forward, the version number at head will be kept one ahead of the latest released version. The rationale behind this change is so that it is clear that the source code at head is more recent.

PiperOrigin-RevId: 527687981
Change-Id: I7982ecd0b99ad70dccec6a8ffe86629754558bda
2023-04-27 14:40:32 -07:00
Yuval Tassa e3cdc410d6 Rename centered argument of mjd_transitionFD to flg_centered, to conform with the rest of the API.
PiperOrigin-RevId: 527258079
Change-Id: I77817be8ee007a572c79e9cd41f7c5728a091fb3
2023-04-26 07:18:52 -07:00
Saran Tunyasuvunakool db3b49b60f Bump version number to 2.3.5.
PiperOrigin-RevId: 526918869
Change-Id: I9f19600b0c1b855ef0834e5c026b204bf1dc06c4
2023-04-25 03:52:12 -07:00
Saran Tunyasuvunakool 0630b7543d Bump version number to 2.3.4.
PiperOrigin-RevId: 525745444
Change-Id: I8a9994b72a0a2ba3f371bee2c2bea947ad8f4fd1
2023-04-20 07:52:46 -07:00
Saran Tunyasuvunakool b362cb4972 Expose a handle for the Python viewer.
This change also requires user scripts to explicitly synchronize changes to physics state to the viewer. The Simulate class was reconfigured so that certain UI events are handled during this sync operation, outside of the render loop on the main thread. These correspond to operations that require access to the full mjModel/mjData.

To support other, more interactive operations (e.g. camera movements), a new mjvSceneState struct is introduced which captures only the portion of the physics state required for scene re-rendering. The mjvSceneState is updated from mjModel/mjData during the viewer sync operation, and is significantly cheaper than a full mj_copyModel and mj_copyData.

Fixes https://github.com/deepmind/mujoco/issues/796

PiperOrigin-RevId: 525723636
Change-Id: Id08d0210a2c067d5afe85e2bf104f276aeddd75e
2023-04-20 05:59:19 -07:00
Kyle Bayes fe3dccfd1d Add a new plugin / extension mechanism called a resource provider along with retrofitting VFS on top of it.
A resource provider provides a mechanism for MuJoCo to read from filesystems other than the OS filesystem or the Virtual File System (VFS).

PiperOrigin-RevId: 525394983
Change-Id: I077ff5a7e2e76806b48b6defb531280aadc8b169
2023-04-19 03:02:22 -07:00
Yuval Tassa d7ec409eb6 Improve code block for mjFREESTACK documentation.
PiperOrigin-RevId: 525150006
Change-Id: Ief5af7ea78658f89449795b58466dac14ab7e32a
2023-04-18 08:11:45 -07:00
Yuval Tassa 9b7d42acb8 Improved numeric constants docs section.
PiperOrigin-RevId: 524799733
Change-Id: Ibb941d5bbb57f884ec31e1f00ae0e99cedac2980
2023-04-17 03:26:30 -07:00
Yuval Tassa 01b84089dd Document engine plugins.
Rename `mjPLUGIN_DYNAMIC_LIBRARY_INIT` -> `mjPLUGIN_LIB_INIT`.

PiperOrigin-RevId: 521458377
Change-Id: I42aaec923e4f392899dfe53ab6ce1dddc75a83b3
2023-04-03 07:55:21 -07:00
Yuval Tassa 4ce00f7e2d Add notes section to APItypes documentation, add note about representation of convex hulls.
PiperOrigin-RevId: 521416156
Change-Id: Ia752b2fc5e4826a8d27af4167c40d9d7424bb069
2023-04-03 03:55:10 -07:00
Yuval Tassa c29f32657c Fix broken links in the documentation.
PiperOrigin-RevId: 520657874
Change-Id: Idd01c40f87e0f2afcbd2d2bfd98fab95edc2371e
2023-03-30 09:18:06 -07:00
Yuval Tassa 3fd5164524 Fix heading level of function types.
PiperOrigin-RevId: 520653499
Change-Id: I8b5265b9a9b43eab40616a78570f558ff85e4ec8
2023-03-30 09:00:46 -07:00
Yuval Tassa 2127d0bb3f Improvements to API TOC
PiperOrigin-RevId: 520284861
Change-Id: Iac8c05d6d18f1e7f89728c5c5f5aa6395d0a1899
2023-03-29 03:21:43 -07:00
Kyle Bayes 8696247f9d Add mj_stackAllocInt to get correct size for allocating ints on mjData stack. Reducing stack memory usage by 10% - 15%.
PiperOrigin-RevId: 517672195
Change-Id: Ie14e6c9c99e8b9e1c5d3686b77631f2df0651c67
2023-03-18 13:04:14 -07:00
Yuval Tassa fe18e58ad2 Rendering of mjGEOM_LINE respects size[0] (width argument of mjv_makeconnector), denominated in pixels.
- Before this change, line width was hardcoded to 3 pixels and the width argument of mjv_makeConnector was ignored.
- After this change, the width argument is respected and interpreted in units of pixel. The non-standard width unit is ok since lines can only be drawn programmatically.

PiperOrigin-RevId: 516529265
Change-Id: I27bffabba69cde415d2ada67263a887c9240efbf
2023-03-14 08:17:36 -07:00
Yuval Tassa 972770ba55 Improve order of sections in APIfunctions.rst
PiperOrigin-RevId: 516518339
Change-Id: I84e973e6f9034a5d24f20791c13b3880fedde46c
2023-03-14 07:26:29 -07:00
Yuval Tassa c16d4d0d25 Move mjtByte definition from mjmodel.h to mjtnum.h.
PiperOrigin-RevId: 516193927
Change-Id: Idbba21119ef2f7da3ab6f6f21611a757658aad23
2023-03-13 06:38:46 -07:00
Yuval Tassa b4d29abfc1 Add table of contents to API Functions documentation page.
PiperOrigin-RevId: 516191825
Change-Id: I792aa72e748443a3f422d0b6cf65a2803f3ec012
2023-03-13 06:26:52 -07:00
Yuval Tassa 2f03da740a Fix typos.
PiperOrigin-RevId: 516135725
Change-Id: I094f6af5d3ef8dd6a93430c09c61f29c23f55e02
2023-03-13 01:01:45 -07:00
Yuval Tassa c57a588ab5 Re-organise API data structure documentation.
PiperOrigin-RevId: 515515875
Change-Id: I743a0409eb9b867249a90d5c1cb4d77bacade4dc
2023-03-09 20:24:32 -08:00
Kyle Bayes d3d789cf7d Convert mju_error and mju_warning to variadic functions, supporting printf-like arguments. The functions mju_error_i, mju_error_s, mju_warning_i, and mju_warning_s are now deprecated.
PiperOrigin-RevId: 515431052
Change-Id: I440de0cb417ce216b6d636a5d86dc9ef6cc1fc06
2023-03-09 13:51:27 -08:00
Kyle Bayes 49dd6b4193 Clean up mj_id2name and mj_name2id.
PiperOrigin-RevId: 514340647
Change-Id: Idf895b2d7a4a8833725afbe5c71c777081b42d9e
2023-03-06 06:36:48 -08:00
Yuval Tassa 7542c90cd2 Improved behaviour of mouse-spring interactions.
Also:

- Renamed recently introduced `mjvPerturb` member `reflocalpos` -> `refselpos` and corrected docstring.
- Added `mjvPerturb.localmass`: body spatial inertia at selection point.
- Removed `const` qualifier to `mjData` argument of `mjv_initPerturb()`, to facilitate spatial inertia computation.
- Improved `mj_Object{Velocity, Acceleration}` docstrings, clarifying that rotational velocities precede linear velocities.
- Removed redundant const qualifiers from non pointer arguments to `mju_dot` and `mju_writeNumBytes`.

PiperOrigin-RevId: 511002168
Change-Id: I27400f497947f330072d4abb7c9bf7e71e6c5d49
2023-02-20 08:40:33 -08:00
Yuval Tassa 35967a30d9 Fix order of API function sections, add missing Plugins section.
PiperOrigin-RevId: 510442237
Change-Id: I1fd4e309f33f45247eac84233745bfa35b5d796f
2023-02-17 08:50:25 -08:00
Kyle Bayes 090c25988a Split API reference pages into Data Structures and Functions pages.
PiperOrigin-RevId: 510422950
Change-Id: I6b2eebab0c0020b80fec83094aa65c6a412e277e
2023-02-17 07:06:20 -08:00