Commit Graph

710 Commits

Author SHA1 Message Date
Yuval Tassa 4d4b0bb2c3 Don't normalize mjData->qpos quaternions in-place.
PiperOrigin-RevId: 647927542
Change-Id: I13b0be55498d1da3af2cdc414cfed4c3908a6fe1
2024-06-29 03:07:10 -07:00
Alessio Quaglino f6cc3f4091 Remove classname from mjs* structs.
PiperOrigin-RevId: 647277317
Change-Id: Ic3cb0d3bf890d6be2712c0538e21910a8f12ab44
2024-06-27 05:13:02 -07:00
Yuval Tassa 62e2842116 Skip deprecated mju_rotVecMat and mju_rotVecMatT in Python bindings.
PiperOrigin-RevId: 647275284
Change-Id: I371236182b22eb399041959901085bb82af3f670
2024-06-27 05:06:01 -07:00
Alessio Quaglino 6be4e0697e Simplify mjs_addDefault.
PiperOrigin-RevId: 646534046
Change-Id: I658224e4800849231e68ed02d8fad07b8d796231
2024-06-25 10:51:57 -07:00
Yuval Tassa 9e9a0c637e Fix docstring of mjData.arena. Fixes #1753
PiperOrigin-RevId: 646121139
Change-Id: I46c7fb32b0e705fb3b8301272d7fc55ba0dacd7c
2024-06-24 09:29:12 -07:00
Emo Todorov ee6a1dba28 UI improvements. Fixes #1274.
Copybara import of the project:

--
a1297d997d0b3cc624bbd1e704ffb7fbb2c5db9d by Emo Todorov <etodorov@gmail.com>:

UI imrovements

When OpenGL buffer size is too small to hold entire UI with all sections open, older sections (as determined by latest mouse click) are automatically closed as needed.

To test this new functionality, uncomment the test near the top of mjui_resize().

UI items now have userid, which can be used for event handling.  It is set through the (new) last field of mjuiDef, called otherint.

Sections titles can now have a checkmark - in which case they are rendered differently. Set via mjuiDef.otherint: 0- none (as before), 1- rendering changed but box not shown, 2- box shown.  This can be used to label sections of special interest to the application.

--
b0405bfb3005586ef1d2656ea9cc43c608225927 by Emo Todorov <etodorov@gmail.com>:

more ui improvements

Implemented mjPRESERVE state for adding sections and separators, so you don't have to keep track of old states.

simulate.cc is now modified to use this new functionality.  I also made the separators in the Physics section collapsible. If you don't like it, change them back to state 1.

Also added functionality for handling section checkboxes.

--
10f4c49be62a6605a38b7c0c7bfae1629024ba31 by Emo Todorov <etodorov@gmail.com>:

even more ui improvements

Selection boxes that extend below the current UI height are finally rendered in full.

Sections and collapsible separators now have rounded corners. The radius can be controlled from theme spacing.

More theme color settings were added. In particular, color gradients can now be disabled (the two end colors are set independently).

--
96c2dc601a25d31c93b21f8e089d349e729e829e by Emo Todorov <etodorov@gmail.com>:

final ui improvements

Cleaned up the code a bit.

Added more control for color gradients.

--
c9eddb679f36df3f0745d37e3fa90c4e66ee6b98 by Emo Todorov <etodorov@gmail.com>:

bug fix

Fixed some rendering bugs in the new functionality.

COPYBARA_INTEGRATE_REVIEW=https://github.com/google-deepmind/mujoco/pull/1749 from emotodorov:ui_improve ddfc21dbcf0482b8f0d5eacab21847c302f71440
PiperOrigin-RevId: 646060325
Change-Id: Idb27aae7cd0311d00f26387bcadf5891175e867d
2024-06-24 05:33:51 -07:00
Kyle Bayes e66b9a36b2 Remove mj_makeEmptyFileVFS and mj_findFileVFS from MuJoCo API.
PiperOrigin-RevId: 645393666
Change-Id: Iabe939c88f60b80dce20f84c7ff9a6396717cc84
2024-06-21 08:12:51 -07:00
Nimrod Gileadi 2188cba4cd Fix a memory leak when copy.deepcopy(data) is called.
In MjDataWrapper.__deepcopy__ use the Python implementation of MjModelWrapper.__deepcopy__ to make an object that Python knows about and can release later.

Fixes google-deepmind/mujoco#1572.

PiperOrigin-RevId: 644967999
Change-Id: I95d093c672e136122e1939f69463a4d29dad82e8
2024-06-20 03:46:16 -07:00
Yuval Tassa 3f3b39bbb1 Fix type-related issues in dependent code. Remove hardcoded mjUSEDOUBLE. Add mjUSESINGLE compiler flag.
This CL does not change the default build behavior of MuJoCo. To use single-precision floating-point, build MuJoCo with `-DmjUSESINGLE`.

PiperOrigin-RevId: 644782648
Change-Id: Ie815df9916798ca8054306437b39a33f84ce9e08
2024-06-19 10:52:18 -07:00
Alessio Quaglino 7bd7065e0e Renamed mjs_fullInertia to mjuu_fullInertia and moved it to user_util.
PiperOrigin-RevId: 644769379
Change-Id: I83511eeb4c0972ce9f46f0e3443d438cccdd4d9f
2024-06-19 09:39:02 -07:00
Yuval Tassa 1eb708646d Update the simulate tutorial video.
The new video is more comprehensive and covers more features of MuJoCo.

PiperOrigin-RevId: 644758072
Change-Id: I1f114746833e00cd61b27659c816316c0e72c46c
2024-06-19 08:41:53 -07:00
Yuval Tassa 19388eee0c Fix type errors in engine and plugins.
- Preparation for a float32 build of MuJoCo.
- Fix use of `float`-typed `fabs` in `mju_eig3`.

PiperOrigin-RevId: 643804942
Change-Id: I89f64e8fd39f4e70e78d7607816283e217912383
2024-06-16 12:35:05 -07:00
Yuval Tassa 6067048537 Deprecate mju_rotVecMat and mju_rotVecMatT in favor of mju_mulMatVec3 and mju_mulMatTVec3.
These functions names and argument ordering are more consistent with the rest of the API.

PiperOrigin-RevId: 643788290
Change-Id: I783eda8021b80b82098e23ed95669b102bb82508
2024-06-16 10:02:36 -07:00
Yuval Tassa 3d63c873aa Improve 2D texture documentation.
PiperOrigin-RevId: 643347176
Change-Id: Ice83a723776092c762dac6e6bc440ef1b1d673b5
2024-06-14 08:04:09 -07:00
Yuval Tassa c9bcf8371e Add mj_setKeyframe function to save current state in k-th model keyframe.
Fixes #1719.

Also improve documentation of `mju_sigmoid`, was previously only documented in changelog.

PiperOrigin-RevId: 642637458
Change-Id: I811a0bf8f881c8b76c9a62d2faec8fdec4e7585b
2024-06-12 09:22:52 -07:00
Baruch Tabanpour 5ed464b489 Support spherical joint in URDF.
PiperOrigin-RevId: 642326650
Change-Id: Iec766800bc9ab7e022bd586fc5881df576d01331
2024-06-11 11:08:00 -07:00
Yuval Tassa 07fc95ca9a Add orthographic cameras.
Orthographic cameras are specified by setting the `orthographic` attribute of the `<camera>` element. The `fovy` attribute is still used to specify the field-of-view, but its semantic is different for orthographic cameras. For orthographic cameras, the field-of-view is expressed in units of length, rather than degrees.

Other related changes:

* Fix bug in the ordering of `cam_xxx` elements in `mjModel`.
* Make camera visualization translucent only when the frustum is visualized.
* Added a button to `simulate` to toggle between perspective and orthographic free cameras.

https://youtu.be/ZXBTEIDWHhs

PiperOrigin-RevId: 642293435
Change-Id: Id090a421ad88ab404b5b27ddbbd6bfc81ad49bc5
2024-06-11 09:23:18 -07:00
Yuval Tassa 171b0d6e06 Improve order and categorization in function API reference.
Also, move macros to the globals section.

PiperOrigin-RevId: 641936967
Change-Id: I5b1f6aa52c69e68cc6310093c5811f0f20828bab
2024-06-10 10:01:09 -07:00
Alessio Quaglino 7a06bcfdaf Make model editing API public, fixes #364
Still missing:

- Detailed documentation.
- Python bindings.

PiperOrigin-RevId: 641445626
Change-Id: I20e67b707cf1bebae7e0cc94d17f7b76a89171f0
2024-06-07 22:28:01 -07:00
Erik Frey 4c3d9461ae Elliptic friction in MJX.
PiperOrigin-RevId: 641384367
Change-Id: I510c565940324fbbf392ce537ce27e0cb9af3eb1
2024-06-07 16:05:58 -07:00
Baruch Tabanpour ace0c8f0a3 Add maxhullvert.
PiperOrigin-RevId: 641092710
Change-Id: Ib4fa828a9c82531614f0a67de9990340dbb25406
2024-06-06 19:05:16 -07:00
Kevin Zakka 4debe1344a Add WidowX 250 6-DoF. Closes #28.
PiperOrigin-RevId: 640239380
Change-Id: I94c126f9d4f8711b6f8ab7d9b7cc1dace864a153
2024-06-04 12:09:34 -07:00
Meghha Dhoke 1bf90af0e0 Bumping mjVERSIONSTRING from 3.1.6 to next version 3.1.7
PiperOrigin-RevId: 639959152
Change-Id: I7b88bae6ea56b0173f00c6f0899ba4a156614f01
2024-06-04 15:27:47 +01:00
Meghha Dhoke 21bc6e5ce4 Trimmed underline to match the current format.
PiperOrigin-RevId: 639873230
Change-Id: Id065af04b6364e720d14873ab55fabff75e94efb
2024-06-03 12:25:11 -07:00
Meghha Dhoke ff167e91d9 Updated the version number and release date to be current release v#3.1.6
PiperOrigin-RevId: 639864767
Change-Id: I94a2c81fe125c99bdcfca07b557eebeadca542e9
2024-06-03 11:58:17 -07:00
Yuval Tassa 2830a4071f Add dampratio attribute to position and intvelocity actuators.
PiperOrigin-RevId: 639745135
Change-Id: I94ba4c346d2750c6c454a60a568f2e6f6bce19d4
2024-06-03 05:28:35 -07:00
Yuval Tassa 8fa0fea02d Allow partial specification of polycoef attribute of equality constraints.
- Usually the user only wants to tweak `polycoef[1]`, after this change `"0 2"` is equivalent to `"0 2 0 0 0"`.
- Also improve documentation of this attribute.
- Tighten margins of documentation display equations.

PiperOrigin-RevId: 639720742
Change-Id: Ibafa0e093cebe1c1c75bf2e47ff3bd2ad7619414
2024-06-03 03:43:13 -07:00
Kevin Zakka 814deb0e9f Fix bug in hyperlink.
PiperOrigin-RevId: 639255722
Change-Id: I0419169ac6d82e2fa64a36a33538ee33a2e22c50
2024-05-31 22:33:27 -07:00
Kevin Zakka 16e9db3ad6 Add Franka Robotics FR3 robot.
PiperOrigin-RevId: 639104288
Change-Id: Ib8c834f9f07f36bcbb62d92cbeba8c28ffd8da67
2024-05-31 11:49:12 -07:00
Kevin Zakka 5c71c7de5d Add Boston Dynamics Spot.
PiperOrigin-RevId: 639086847
Change-Id: I8ef6d87d93dc730135a46ce361efbee1bf68c6c8
2024-05-31 10:58:03 -07:00
Yuval Tassa 0d1c92b20a Add documentation on pipeline stages and mjData self-consistency. Fixes #1667
PiperOrigin-RevId: 638619787
Change-Id: Ic8dd0fbd178c4946757a07d74fca3b2c905f9080
2024-05-30 05:38:05 -07:00
Baruch Tabanpour c511d02265 Add hfield. Fixes #1655 #1491 #1695
PiperOrigin-RevId: 638447127
Change-Id: Ib1e5020a8407bc100145a6b382e985c03dd4a848
2024-05-29 16:21:34 -07:00
Erik Frey 255a59487c Corrects function reference in class comments.
PiperOrigin-RevId: 637070006
Change-Id: I0d9dcf0401a107de67cd0a663df6c876287ba772
2024-05-24 16:53:56 -07:00
JunYoung Kim 9e0a437e2a fixed minimal example shown at mjx.rst 2024-05-21 16:32:54 +09:00
Kevin Zakka f2732c336e Add Unitree G1 to model docs.
PiperOrigin-RevId: 635464942
Change-Id: I970351ebc3723bff6ae14e08595a7365c861004e
2024-05-20 08:34:43 -07:00
Copybara-Service 292745000a Merge pull request #1675 from peterdavidfagan:pr-fix-mjx-put-data-docs
PiperOrigin-RevId: 635177941
Change-Id: I1f2685a8b0574929c2625a7ba2e70c5568a364fd
2024-05-19 00:40:23 -07:00
Tom Erez 727893f0f2 Add timeconst attribute to position actuator.
PiperOrigin-RevId: 635018979
Change-Id: I919573f4241ecb4a4c61c3b8b6641b31aa79eca4
2024-05-18 03:38:20 -07:00
peterdavidfagan 848c33e16b fix put_data function signature 2024-05-17 12:22:58 +01:00
Kyle Bayes 6e58cedb47 Fix typo in sensor documentation.
PiperOrigin-RevId: 633872551
Change-Id: I033a8227c19da2feebf286f4b3c24635f5625372
2024-05-15 03:03:40 -07:00
Yuval Tassa b8a8d811e1 Update documentation for URDF parsing, noting different default values for compiler attributes.
PiperOrigin-RevId: 633556582
Change-Id: Ibf99b034706afc14f54bfc34e082465d025719d2
2024-05-14 06:01:38 -07:00
Yuval Tassa 3809951172 Add sensor to replicate example model. Fixes #1654
PiperOrigin-RevId: 633213086
Change-Id: I1672cf31871637497bcb0f26880e0a41a9f510bc
2024-05-13 08:06:44 -07:00
Yuval Tassa 65d4f04cd4 Add some missing const qualifiers.
PiperOrigin-RevId: 632463634
Change-Id: Id3e3e53371f8ed53d970ad7c471bbefd2a70cf5a
2024-05-10 05:20:37 -07:00
Yuval Tassa 02d015458c Add mj_geomDistance API function and sensors for geometric distance, normal direction and segment between between two geoms. Fixes #51
PiperOrigin-RevId: 632458301
Change-Id: I65b7e5bb0df59008028114cf4a07e0d6365ff3d3
2024-05-10 04:52:43 -07:00
Alessio Quaglino 1d181786a2 Prevent visualization of SDF iterations from writing outside the maximum allocated vector. Fixes #1539.
PiperOrigin-RevId: 632071103
Change-Id: Idf91ede1661e717ad338f601a5482ab171d7f625
2024-05-09 01:42:35 -07:00
Alessio Quaglino 96844db926 Update BVH during fusestatic. Fixes #1069 and #1577.
PiperOrigin-RevId: 631748750
Change-Id: I4e1ae01207568c90fc49bcd7d9f760f5187f1afa
2024-05-08 04:13:16 -07:00
Meghha Dhoke 4eca3b048d Bumping mjVERSIONSTRING from 3.1.5 to version 3.1.6
PiperOrigin-RevId: 631544334
Change-Id: Iadf8fa25e30da5b00172c8212786b1f9edb22e1a
2024-05-07 14:11:38 -07:00
Meghha Dhoke e001975f08 Update changelog for MuJoCo 3.1.5
PiperOrigin-RevId: 631497384
Change-Id: I04bf6d0a4e744ab61becda5212e76b30c392f5b2
2024-05-07 11:47:15 -07:00
Erik Frey 24bc1c8b52 Add new differentiable physics tutorial to readme.
PiperOrigin-RevId: 631458983
Change-Id: Ic0ef9e93397a974be50f0616571a4a5fea6f2b21
2024-05-07 10:00:45 -07:00
Kyle Bayes ad0459680d Enable compiler asset cache for public use, and add changelog entry.
PiperOrigin-RevId: 631352810
Change-Id: If6208327499e3e4bd37cbb2a1b0cdcfb912c1056
2024-05-07 02:50:50 -07:00
Yuval Tassa 93b57c1421 Update Python documentation.
PiperOrigin-RevId: 631189628
Change-Id: I17d0fbe476fc14bbad525a302f588bf773a2244b
2024-05-06 14:40:59 -07:00