Commit Graph

740 Commits

Author SHA1 Message Date
Kevin Zakka 42fbc2ec7b Skip CI on README changes.
PiperOrigin-RevId: 529067951
Change-Id: Icca59b5abd89d131066b99780e4bc2b575d7810e
2023-05-03 06:03:38 -07:00
Yuval Tassa 42a16f65c2 Fix typo in mjd_inverseFD documentation.
PiperOrigin-RevId: 529022023
Change-Id: I2f9e014e271910989f96cd9bfd28c6adaf2e62e5
2023-05-03 01:30:44 -07:00
Alessio Quaglino e59720833e Add ReadVector function to touch_grid plugin, use it for size and field-of-view attributes.
PiperOrigin-RevId: 528783871
Change-Id: Icf3d060116826b01f68c9818a5153be4ce9511b0
2023-05-02 08:01:10 -07:00
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
Kevin Zakka 4d2bf636ea Improve touch_grid sensor documentation.
PiperOrigin-RevId: 528473107
Change-Id: I2fecc10667b1b94a4b2b32653685f0a6d9da4ba9
2023-05-01 08:01:52 -07:00
Yuval Tassa ced9e0872f Load DM Mono font in CSS file
PiperOrigin-RevId: 528360725
Change-Id: I32cde6dc6c9cdc5dbd8ba1d8d22586027b0476f0
2023-04-30 19:30:08 -07:00
Alessio Quaglino 15e77b13dd Add mjCBoundingVolume class to represent an element of mjCBoundingVolumeHierarchy (for example an mjCGeom).
PiperOrigin-RevId: 527906004
Change-Id: Ibc3bdac0ec6d85c7fd56fd2057f5a63970e8b1d4
2023-04-28 09:29:58 -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 b397b3123e Added touch grid sensor plugin.
PiperOrigin-RevId: 527512624
Change-Id: I0f316eb6eb2c52472abbec484e5538b66ba2e82e
2023-04-27 02:03:03 -07:00
Tom Erez 139328f86e Clarify error messages when Unity fails to step the scene.
PiperOrigin-RevId: 527486144
Change-Id: I4e889977e035e13557c114e875ea0ba32da79002
2023-04-26 23:30:06 -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 a8d202a0c2 Reword "undefined" to "unspecified" on the topic of units.
To a software engineering audience, "undefined" has a strong connotation that the concept is fundamentally ill-defined or ill-behaved (c.f. "undefined behaviour").

PiperOrigin-RevId: 527192289
Change-Id: I8e81d1256c1330cd0e29c00f9913b9772d5344e6
2023-04-26 01:10:59 -07:00
Saran Tunyasuvunakool d23c5e784e Update changelog for 2.3.5.
PiperOrigin-RevId: 526984300
Change-Id: I40f0280c5366f3a7f9f61862fe6c9adc123c67fb
2023-04-25 09:09:36 -07:00
Kyle Bayes 23961e24b7 Refactor user codebase to use LoadResource helper method.
* Fix small bug when registering resource providers.
* Add test cases for OS filesystem fallback with VFS.
* Rewrite LoadModelFromString using a resource provider (now can pass custom VFSs).

PiperOrigin-RevId: 526959705
Change-Id: Iee1773e5584535d868aab6b206d1bf362e600c8a
2023-04-25 07:24:45 -07:00
Saran Tunyasuvunakool c2115a1f51 Fix a mjvSceneState leak in the passive viewer.
PiperOrigin-RevId: 526957248
Change-Id: I4f30faf097da64189607a4b98c6dff04fec773fa
2023-04-25 07:11:42 -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
Yuval Tassa d65bffd8ff Shorten section title
PiperOrigin-RevId: 526727580
Change-Id: Ibfeb752e5cde480beee04032df047c1124983d54
2023-04-24 12:47:34 -07:00
Yuval Tassa 51126caf3f Cosmetic improvements to Actuation Model documentation.
PiperOrigin-RevId: 526659426
Change-Id: If0ca9a505bb77e496739938a946ead5780b93d0f
2023-04-24 09:03:26 -07:00
Yuval Tassa 62a675ba28 Improve Python bindings documentation.
PiperOrigin-RevId: 526658768
Change-Id: Ife5640ed4328427e24e9f0302ee8a5424d82a974
2023-04-24 09:00:58 -07:00
Saran Tunyasuvunakool 66def34e0e Fix broken OBJ and PNG loading when a VFS is provided to mj_loadXML.
At present, if a VFS is used but an OBJ or PNG asset doesn't exist in the VFS, the model compilation will fail without trying to first locate the asset on disk.

This breaks the Python bindings `MjModel.from_xml_string` almost entirely when OBJ assets are involved.

Also modify error messages to disambiguate between different modes of asset loading failures.

PiperOrigin-RevId: 526637686
Change-Id: Iba02cc94989083bc2835a3e67dfc78c0a21047e9
2023-04-24 07:37:33 -07:00
Alessio Quaglino 3db483c248 Print warning and default to computing mesh inertia from convex hull if volume is negative (malformed mesh).
PiperOrigin-RevId: 526053615
Change-Id: I3974b3433da513f869b1bdab5e98232e215f6509
2023-04-21 09:01:34 -07:00
Yuval Tassa a2a1ac9fc2 Pass mjvOption to plugin visualize callback.
PiperOrigin-RevId: 526047180
Change-Id: Ia63f02184f5c6a7e3b588298639fa0ab4a6da649
2023-04-21 08:44:20 -07:00
Saran Tunyasuvunakool 94779a722a Rename Differ to IsDifferent and tidy up its implementation.
Startblock:
   diffbase is submitted
PiperOrigin-RevId: 526024927
Change-Id: I718f3b98539f5c33a42f6254bc817a07459f694c
2023-04-21 07:14:26 -07:00
Yuval Tassa 967b07314f Improve rendering of [state section](https://mujoco.readthedocs.io/en/latest/computation.html?highlight=qfrc_applied#the-state) in documentation.
PiperOrigin-RevId: 526023870
Change-Id: If650cefa0cc6c22d63e909fb763767a77067af4e
2023-04-21 07:08:32 -07:00
Saran Tunyasuvunakool da17fdfcfd Fix a macOS segfault in simulate.cc.
The segfault was caused by updating the UI outside the main thread.

PiperOrigin-RevId: 526019783
Change-Id: I3a211ce8a65f10716778bb3310bb568e00309a32
2023-04-21 06:46:09 -07:00
Yuval Tassa 0295d972cb Improve comments in mjplugin.h, align to header standard (column 35).
PiperOrigin-RevId: 525868504
Change-Id: I8edfcea737e6e94458015a0e4fa6522cf89a1230
2023-04-20 15:39:09 -07:00
Yuval Tassa 2d69b158aa Improve changelog item.
PiperOrigin-RevId: 525860902
Change-Id: Ib753fca46d451af2ab796d6698303dbde081a469
2023-04-20 15:09:01 -07:00
Saran Tunyasuvunakool 101c647aad Clarify the 2.3.4 implicitfast bug fix situation in the changelog.
PiperOrigin-RevId: 525793327
Change-Id: Ib440c80d1a56d2f484dca2348118e3790882a2cc
2023-04-20 10:56:28 -07:00
Saran Tunyasuvunakool 0db9a453dc Update changelog for version 2.3.4.
PiperOrigin-RevId: 525773208
Change-Id: I54a0e16f069718737719e3d145f3f4795d19e9c8
2023-04-20 09:47:31 -07:00
Nimrod Gileadi d4414a0353 Initialize real_time_index to zero.
In the passive viewer, this value wasn't initialized.

PiperOrigin-RevId: 525760119
Change-Id: I6635270a30556600a0c51ba1d2767da226ba0440
2023-04-20 08:55:32 -07:00
Saran Tunyasuvunakool b28d149f8d Update Python dependency versions.
PiperOrigin-RevId: 525759204
Change-Id: I120dfc5a92e207dbe0ee31b04168c84d3ea47008
2023-04-20 08:51:53 -07:00
Nimrod Gileadi 707fcdb44f Correct return type on viewer.launch_passive.
PiperOrigin-RevId: 525753923
Change-Id: Idfff26e89deaeb37dd8b179106640f05c0deabb2
2023-04-20 08:30:42 -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
Alessio Quaglino 4f5da9c554 Add OnePlugin read/write functions and remove redundant plugin attributes from mjCActuator.
PiperOrigin-RevId: 525708657
Change-Id: I762de238f989b13877d5f9198c83c16ea9dc1d8b
2023-04-20 04:25:43 -07:00
Saran Tunyasuvunakool 34e62aa3c1 Don't use designated initializer in engine_resource_test.
MuJoCo codebase is currently C++17, not C++20.

PiperOrigin-RevId: 525507811
Change-Id: Iaa1b5a271e811bee34418be79583fc5bdda3bee9
2023-04-19 11:42:23 -07:00
Saran Tunyasuvunakool c6e35d255c Update dependency versions.
PiperOrigin-RevId: 525487198
Change-Id: Ic352c0dc6aaa4120e1f2fa637a8c483c885ca4cd
2023-04-19 10:33:11 -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
Alessio Quaglino b25728cc2e Move tree construction to helper class.
PiperOrigin-RevId: 525171924
Change-Id: I28b572fa09a2ccc029e56f9a84808ac53a4e6ac9
2023-04-18 09:42:43 -07:00
Alessio Quaglino 94c4f72907 Specify is volume is too small or negative in mesh error messages. Fixes #799.
PiperOrigin-RevId: 525151156
Change-Id: Ia0e9d8b900b8c372e9229da934a4eb7aeb1a3b7a
2023-04-18 08:16:44 -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 c69e0b97fb Improve documentation of the internal stack.
PiperOrigin-RevId: 525119946
Change-Id: I49c757506f4af2b588dc07f978c8a72acad1b5bc
2023-04-18 05:40:44 -07:00
Nimrod Gileadi 4b1375297b Add a test that hfields are loaded and normalised to [0, 1].
PiperOrigin-RevId: 525103908
Change-Id: I3a6cc3a339cf31aa40700cd44962038d5c6bcf74
2023-04-18 04:05:04 -07:00
Saran Tunyasuvunakool 3e85ef5f38 Remove spurious whole-arena copying in mj_copyData.
Fix #568

PiperOrigin-RevId: 524929990
Change-Id: I164cb98cff752bf5d0a506bc0a290198775da0ef
2023-04-17 13:14:58 -07:00
Alessio Quaglino c943797591 Make shellinertia ignore exactmeshinertia, which is only used for legacy volume computations. Fixes #759.
PiperOrigin-RevId: 524884880
Change-Id: Ia5b64ee33802866f792cdad4acfec6d9baf2a9e9
2023-04-17 10:30:20 -07:00
Yuval Tassa 27742da9d7 Fix formatting in cable.cc
PiperOrigin-RevId: 524846500
Change-Id: I4e07a68b443a78ea1c46812f64ecf99804b26020
2023-04-17 07:56:42 -07:00
Yuval Tassa 9b7d42acb8 Improved numeric constants docs section.
PiperOrigin-RevId: 524799733
Change-Id: Ibb941d5bbb57f884ec31e1f00ae0e99cedac2980
2023-04-17 03:26:30 -07:00