Commit Graph

289 Commits

Author SHA1 Message Date
Kyle Bayes 0bffd744f9 Add nativeccd flag. When this flag is enabled, general convex collision detection is handled natively, as opposed to using libccd.
PiperOrigin-RevId: 663859009
Change-Id: Ife18bb1de62f2154e4725fdf764484a18586b836
2024-08-16 14:08:35 -07:00
Taylor Howell 2c56946547 Increase mjVERSIONSTRING to 3.2.3 after release.
PiperOrigin-RevId: 660891033
Change-Id: I2bda69d11cab60a83b0c77bb53214240eacaea62
2024-08-08 10:31:57 -07:00
Gabe Oppenheimer ebc48d2783 Update the MuJoCo version to v3.2.2 following the 3.2.1 release.
PiperOrigin-RevId: 660036707
Change-Id: I7e649e5a0ce6db863bcb99dc4fc1aa851b3f5140
2024-08-06 11:39:30 -07:00
Nimrod Gileadi 9db9df7380 Increase material count limit to 1000.
The texture limit used to be 1000, but when materials with multiple textures were introduced in 3.2.0, the limit was reduced to 100. Since there are model out there that already have more than 100 and fewer than 1000 textures/materials, we should maintain backwards compat.

Fixes #1877

PiperOrigin-RevId: 659901629
Change-Id: If0f6d0500d1d808bc3ec2d87d4a3faf24007da59
2024-08-06 04:20:51 -07:00
Gabe Oppenheimer d538bf994d Update version to 3.2.1 following the 3.2.0 release.
PiperOrigin-RevId: 658412236
Change-Id: I4bd6ccb5dee18059eb6fc0d187afe62598845793
2024-08-01 08:35:42 -07:00
Yuval Tassa 24a555062d Rename mjDSBL_AUTORESETNAN to mjDSBL_AUTORESET.
- Expose in MJCF.
- Add documentation.
- Improve handling in simulate.

PiperOrigin-RevId: 657606140
Change-Id: I6a27c2f4842d7d4ae32642f2a6255e5f8f1f605a
2024-07-30 08:41:59 -07:00
Saran Tunyasuvunakool f62792594f Add a new disable flag mjDSBL_AUTORESETNAN.
PiperOrigin-RevId: 654677473
Change-Id: Id92383fe413729bf6697353aa6e0bc8a946ec7e8
2024-07-22 03:22:41 -07:00
Tom Erez 796173170c Add support in mjModel for tagging textures with different roles, and use the slot index of a texture to designate its role.
PiperOrigin-RevId: 654030065
Change-Id: I34a5b132a7f91a6bb8f260500c1b9c128a03b596
2024-07-19 09:29:22 -07:00
Tom Erez e92af73cbf Add mjmodel support for textures with different number of channels.
PiperOrigin-RevId: 653974959
Change-Id: Ia280e0bdb21027646249f104f21bedee792ba7e5
2024-07-19 05:22:19 -07:00
Copybara-Service f20edda26e Merge pull request #1759 from Balint-H:fix/unity-multi-dof-axes
PiperOrigin-RevId: 653173396
Change-Id: Iedd13dc23ccdd370ba0237bbe278d3bde755bb84
2024-07-17 03:54:22 -07:00
Gabe Oppenheimer 22ce22ac8a Update the MuJoCo version number ahead of the 3.2.0 release.
PiperOrigin-RevId: 652578624
Change-Id: I8ed6f66ff1247ff7421e3ed0521cf15e1c0b6c79
2024-07-15 13:16:06 -07:00
Kyle Bayes 57e6760ec9 Re-implement VFS internals in C++, removing the constraints of the previous implementation.
PiperOrigin-RevId: 649433087
Change-Id: Icaa3e6b7f2ef14f56b04fef2f4360b46d8b5f022
2024-07-04 09:22:23 -07:00
Yuval Tassa ca44ad4f0f Improve docstrings and layout in mjdata.h
PiperOrigin-RevId: 649195756
Change-Id: Iadf6589c226acacd9f3e85959de552a98fc7435a
2024-07-03 14:15:51 -07:00
Tom Erez 3b73dfe33b Add textured materials to render context, and refactor mjvGeom to refer to those textures.
PiperOrigin-RevId: 648719103
Change-Id: Idb4425bdeea3cbc1133cda3e4366574ed3bb5ccc
2024-07-02 08:01:40 -07:00
Bálint Hodossy 8ab7abf5af Use MuJoCo calculated cartesian axes for hinge and slide 2024-06-25 14:12:04 +01: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
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
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 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
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
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
Kyle Bayes 18397e61ec Replace calls to mj_makeEmptyFileVFS with mj_addBufferVFS in MuJoCo Unity bindings.
PiperOrigin-RevId: 640168011
Change-Id: Ic592b5cbedb89981ac24d4b8d2c864ceaf415e46
2024-06-04 08:50:12 -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
Copybara-Service d6712f2944 Merge pull request #1646 from Balint-H:fix/unity-sensornoise
PiperOrigin-RevId: 639722238
Change-Id: I80a941e97923169150f665fb3411605affcc0702
2024-06-03 03:49:20 -07:00
Bálint Hodossy 45ccc2a6df Add tests for kv param in position actuators 2024-05-27 12:11:15 +01:00
Bálint Hodossy 2aa30b188c Adjust formatting 2024-05-27 11:49:26 +01:00
Bálint Hodossy adbbcc4ff5 Track separate kv property for position actuators 2024-05-27 11:48:11 +01:00
Bálint Hodossy 161ed22299 Fix Unity tests for sensornoise attribute 2024-05-27 11:29:04 +01:00
Bálint Hodossy a9308a4420 Remove sensor noise properties 2024-05-10 16:12:51 +01: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
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
Yuval Tassa 8ebc9ed2c8 Add mjModel.ngravcomp, number of bodies with nonzero gravcomp attribute.
PiperOrigin-RevId: 627087335
Change-Id: Ie85ae4150962463b8a8c8435fec068c44877aa16
2024-04-22 10:45:43 -07:00
Yuval Tassa 546a27ca72 Fix memory allocation error when memory size is larger than 2G. Fixes #1606
PiperOrigin-RevId: 627058355
Change-Id: Iebef647a0107d1f112a876d705f5b3ea888b4a41
2024-04-22 09:15:46 -07:00
Yuval Tassa caf215e342 Add metallic and roughness scalar attributes to materials.
Rename `light_radius` -> `light_bulbradius`, make the default value 0.02.

PiperOrigin-RevId: 627032170
Change-Id: I1e01e2eca028c0aefc2e7dc384e8b34abac184aa
2024-04-22 07:39:06 -07:00
Yuval Tassa 0cd28d2423 Add light radius attribute.
Also fix bug: light defaults were not being saved.

PiperOrigin-RevId: 625142278
Change-Id: I8ec3a5a06e9f314e98b7c34346db3c24b34d7e0b
2024-04-15 17:55:15 -07:00
Yuval Tassa 7b3f1a0261 Add mjModel.mesh_scale: scaling applied to asset vertices.
PiperOrigin-RevId: 625083195
Change-Id: I36290282379e57ad23ec771d65d1bd6bf2a75b07
2024-04-15 14:26:06 -07:00
Gabe Oppenheimer 225619c964 Update MuJoCo internal version to be the external version +1
PiperOrigin-RevId: 623607403
Change-Id: Ia8f6516bb6b2fb6a3ecb8273b59e61667098f308
2024-04-10 14:32:54 -07:00
Yuval Tassa 5a365603f8 Add mju_euler2Quat.
PiperOrigin-RevId: 623469398
Change-Id: Ia86b29a764018cd4c3bc57d23616bed7393081f5
2024-04-10 06:02:50 -07:00
Yuval Tassa 5d26b50fce Remove native sensor noise sampling.
PiperOrigin-RevId: 620075316
Change-Id: I6a0a1d63834e7c8bfd290f89d86fea791d794739
2024-03-28 15:33:03 -07:00
Yuval Tassa 47ba72ea59 Add actuatorgravcomp joint attribute, to treat gravity compensation forces as applied by actuators, rather than passive buoyancy.
PiperOrigin-RevId: 620049593
Change-Id: I2c8a9dc152c087b408e4f904838034271a7dd910
2024-03-28 14:01:52 -07:00
Balint-H c2bef232b6 Handle the implicit auto value for limits now written by the compiler to the xml 2024-03-14 12:38:56 +00:00
Alessio Quaglino bda03af49a Add childclass support to frames.
PiperOrigin-RevId: 615487831
Change-Id: I0e4d2efd52211701b4286a0b0de84424470a3a47
2024-03-13 11:31:22 -07:00
Meghha Dhoke 106453fa2b Updated version number to be (v3.1.4) ahead of current release (v3.1.3)
PiperOrigin-RevId: 613236845
Change-Id: I3ee759493f27cfa1e367c71e3e073b54738b73d4
2024-03-06 09:07:25 -08:00
Copybara-Service 0631a406c4 Merge pull request #1470 from Balint-H:bugfix/unity-tendon-rendering
PiperOrigin-RevId: 612839845
Change-Id: Idf5b5cec4adc350b3ed36e902e2e52fbe9080281
2024-03-05 07:49:57 -08:00
Copybara-Service 6b7d714291 Merge pull request #1450 from v-r-a:angmomMat
PiperOrigin-RevId: 612835207
Change-Id: I8e7b01cc433563556a3ae4bbdd0c53612cc15e97
2024-03-05 07:35:15 -08:00
Balint-H f70db6b0ee Remove unnecessary using 2024-03-04 13:51:08 +00:00
Balint-H 2f64cf36c5 Conditional compilation for Tendon visualization 2024-03-04 13:49:00 +00:00
Balint-H 1baa478b64 Fix rendering of tendons 2024-03-04 13:41:50 +00:00
Copybara-Service 73f65ec408 Merge pull request #1428 from Balint-H:feature/unity-plugins
PiperOrigin-RevId: 612144507
Change-Id: Ie355c0da2b4a51331aadcfce865a1edd720381b5
2024-03-03 02:16:08 -08:00