Commit Graph

652 Commits

Author SHA1 Message Date
Alessio Quaglino d2501eff68 Use procedural model creation in plugin tests.
This will be useful for simplifying the mjSpec API for plugins.

PiperOrigin-RevId: 772505558
Change-Id: I8eb57d7e129e0f6430fb4c610a543e0dc0f3b295
2025-06-17 09:30:54 -07:00
Kevin Sayed a4ab35c194 update scrubs and set next version
PiperOrigin-RevId: 770740070
Change-Id: I6b2f1356706b1849872df2583adbbb3f72057884
2025-06-12 11:39:45 -07:00
Kevin Sayed f978b4eea3 Release notes for 3.3.3 + update git hashes.
- Upgraded dependencies versions.
- Added release date for 3.3.3
- Reordered changelog to be a numbered list.

PiperOrigin-RevId: 769808336
Change-Id: Iffa074f52ef2e3f9d450ce6973a7e85980417367
2025-06-10 14:49:17 -07:00
Alessio Quaglino f75772587a Add functions for setting an mjsActuator to a specific shortcut type.
PiperOrigin-RevId: 769049331
Change-Id: If5bb04966bd29a57569a2c17d712b9ae3d33324d
2025-06-09 02:17:02 -07:00
Levi Burner 3eb31f56cd Copybara import of the project:
--
c9acc0a6f677951db34f2b607bd60fc18a43f72b by Levi Burner <leviburner@gmail.com>:

Fix race condition in Python viewers set_X methods

--
b89ab8f7a0f628ee7a02ebfbac2a97f113112076 by Levi Burner <leviburner@gmail.com>:

use std::swap to replace some copying

--
02625bed0cffbfc9ea4537f74689f0bbcb8bf44c by Levi Burner <leviburner@gmail.com>:

fix whitespace

COPYBARA_INTEGRATE_REVIEW=https://github.com/google-deepmind/mujoco/pull/2613 from aftersomemath:simulate-set-race 02625bed0cffbfc9ea4537f74689f0bbcb8bf44c
PiperOrigin-RevId: 766646168
Change-Id: I1e1dc16afbfb1e69fb958d54bd1075cc9aed3569
2025-06-03 07:01:31 -07:00
Alessio Quaglino 84ad22a590 Add mj_copyBack for copying real-valued arrays from mjModel back to mjSpec.
Also add `SaveAndReadXML` function to test fixture using `mjSpec` as input.

PiperOrigin-RevId: 765393821
Change-Id: Ic257addd2fc89678fc11b226c168c077626cc51e
2025-05-30 17:17:14 -07:00
Tom Power 18b0e68a5a Fix missing import in model editing colab
PiperOrigin-RevId: 764272427
Change-Id: I5623818489dca322a73fa19dd50bc24771b2832a
2025-05-28 08:30:13 -07:00
Tom Power 3a4b6e6c5b Added terrain generation to mjspec tutorial
PiperOrigin-RevId: 764229337
Change-Id: Ic541eefc4b561d3c39c5ee99c7d38466d7e75903
2025-05-28 06:13:26 -07:00
Alessio Quaglino 1fbbfd8079 Correct frame property in MjsBody from method to read-only attribute.
PiperOrigin-RevId: 764188923
Change-Id: I7c753f7f431b79aa320681c45b7614f68b63852c
2025-05-28 03:48:07 -07:00
Google DeepMind 568620dd2f Add texture attribute to lights.
PiperOrigin-RevId: 763739805
Change-Id: I333ed2ac68f30f79f688ca01d7b5fd6bf2d836c9
2025-05-27 05:04:01 -07:00
Yuval Tassa ccc912c3b0 Improve docstring in mjvGeom, fixes #2629
PiperOrigin-RevId: 763693102
Change-Id: Icb9a3168691690ccf086adb5a20358b3952d6717
2025-05-27 02:17:24 -07:00
Copybara-Service f1954e98cf Merge pull request #2589 from Rahul-Lashkari:fix-py-rollout-typos
PiperOrigin-RevId: 763686962
Change-Id: I6a9c419200f410f60a1801d74ae05862464ad9a1
2025-05-27 02:00:12 -07:00
Yuval Tassa 89e39dc0a7 Expose mj_makeM as a sub-component.
PiperOrigin-RevId: 763662068
Change-Id: I55ced456dca751c1de09fb35e2f73c60ffc0d626
2025-05-27 00:35:55 -07:00
Alessio Quaglino 7a5b55f57e Expose mjs_resolveOrientation to the Python API.
PiperOrigin-RevId: 762571376
Change-Id: I08d8394b24670c7f102356da4234b17f1ba4e05f
2025-05-23 14:36:47 -07:00
Alessio Quaglino e389872c7d Add frame property to python bindings.
PiperOrigin-RevId: 762452877
Change-Id: I555cec650d04700f6718b4d77a866c821b90685c
2025-05-23 09:24:24 -07:00
Copybara-Service e44513bee5 Merge pull request #2640 from google-deepmind:dependabot/pip/mjx/setuptools-78.1.1
PiperOrigin-RevId: 762416151
Change-Id: I40e47cb3334ab2fa7f8bdfef27fa1720186cd082
2025-05-23 07:37:33 -07:00
Google DeepMind 74cc904edc Convert light directional boolean into a type enum.
PiperOrigin-RevId: 761983728
Change-Id: Id5bf93c103e5358d9c5cd9f1176532a978e0b3a8
2025-05-22 08:51:18 -07:00
Google DeepMind 3e9bc79b54 Adds color space to textures.
PiperOrigin-RevId: 761907261
Change-Id: Iec546d1d5907a15e57ef809ec31850640fc52915
2025-05-22 04:33:40 -07:00
Erik Frey 49c33716a1 Allow _realloc_con_efc to also allocate new nJ arrays.
PiperOrigin-RevId: 761252071
Change-Id: Idce822c6f2b8f2d81a5d43228f5dc35281c5ad07
2025-05-20 15:26:04 -07:00
Yuval Tassa ced630181d Replace mjv_sceneState and related code with mjv_copy{Model,Data}
PiperOrigin-RevId: 760662776
Change-Id: I512bda9187fbc19ade6924b91d5cb2275078de42
2025-05-19 09:51:58 -07:00
Yuval Tassa 8268c6d1ff Add mjv_copyData
PiperOrigin-RevId: 760642972
Change-Id: I16227fd91bf42618fda684b15b3650758ae29b13
2025-05-19 08:59:43 -07:00
Tom Power 670c97c4f7 Reorder model editing notebook, placing dm_control example last
PiperOrigin-RevId: 760642275
Change-Id: I7d8a625ab1d6d8364de93571390e8c14289e070a
2025-05-19 08:57:49 -07:00
Tom Power 6c201d3e1c Add examples of scaling assets into tutorial notebook. Fixes #2476
PiperOrigin-RevId: 760617809
Change-Id: I86d4fadb473cf8ad9bcfd058567551c431f2bf31
2025-05-19 07:34:51 -07:00
Yuval Tassa e8c566bee1 Remove use of diagnum in solver
PiperOrigin-RevId: 759021147
Change-Id: I9e5c85b6542380780fc487781398f406ddaad51b
2025-05-15 00:39:28 -07:00
Alessio Quaglino 71bdd915f7 Move bending stiffness from plugin to the compiler.
PiperOrigin-RevId: 758677644
Change-Id: I7d5c5140ba6948002bfa4ae9d6b4bf0f6de0e39b
2025-05-14 07:39:24 -07:00
Yuval Tassa dd28b887d4 Rename C sparse structure to M in mjdata, improve docstrings.
PiperOrigin-RevId: 758636638
Change-Id: If78acc423601d2911f514929b27f7b6d0af9ef58
2025-05-14 05:26:19 -07:00
Google DeepMind fa95fe0c59 Add intensity and range parameters to lights.
PiperOrigin-RevId: 758603199
Change-Id: I74e88bdfeedd9224e84d953f237d68eca79e6cb7
2025-05-14 03:28:03 -07:00
Alessio Quaglino 34e8ff1aad Add flex edge flap connectivity to mjModel.
PiperOrigin-RevId: 758593152
Change-Id: I79836df961972c9eae8037e5fcbfc3d0122645de
2025-05-14 02:50:37 -07:00
Yuval Tassa 79c74d7eae Add mjData.M, not yet used.
PiperOrigin-RevId: 758351796
Change-Id: I0786966b2f2c2e699db845cda6940a8821b23f49
2025-05-13 13:28:03 -07:00
Yuval Tassa 1e02d66c3d Remove M matrix structure from mjData.
Introduced in March 2025 as a temporary measure, this is not considered a breaking change.

PiperOrigin-RevId: 758311298
Change-Id: Ia08857c18b791f6a62a2d8d136b45fc075507b93
2025-05-13 11:47:18 -07:00
Yuval Tassa 627fffdef9 Switch mjData.{qH,qLD} from full ("M") to reduced ("C") inertia matrix structure.
PiperOrigin-RevId: 758273074
Change-Id: If1a2e663ea70044694af985e0119afd6d58115ac
2025-05-13 10:20:32 -07:00
Yuval Tassa 755564a348 Remove unused code related to legacy island implementation.
Also fix a docstring.

PiperOrigin-RevId: 757939564
Change-Id: I3a970fd38c63886d34cd23b1fb45617a9ce5c147
2025-05-12 15:39:16 -07:00
Alessio Quaglino 8a7c42c747 Add SDF functions to public API.
PiperOrigin-RevId: 757829339
Change-Id: I81ee7c3f33acf234835bf34cbb632e23cb9e284e
2025-05-12 10:53:39 -07:00
Alessio Quaglino d77126dc58 Add vertcollide option for adding spheres at flex vertices.
PiperOrigin-RevId: 757789990
Change-Id: I8ccba52b13e8c02a7be78f992297d6f414d98f8e
2025-05-12 09:13:48 -07:00
Yuval Tassa dfe22f7ef7 Remove stale reference to uncompressed sparse matrix.
PiperOrigin-RevId: 757775265
Change-Id: Ic18c0c89ab84285a7d93e24c65e50832ebc53c6f
2025-05-12 08:30:43 -07:00
Sam Haves 924ee3070a Modify user values in mujoco to allow users to provide cleanup functions to avoid memory leaks.
For the MJCF -> USD plugin, and I suspect other usecases for user values, it's necessary to give ownership of the object to Mujoco. However since they get type erased, we can't clean up the data automatically for the user. Instead this allows c++ clients to provide a cleanup function with their data.

PiperOrigin-RevId: 756832010
Change-Id: I80b8e7822e1a0e399a0d19dcaa57ee69b3ccc16a
2025-05-09 11:03:06 -07:00
Yuval Tassa ecb769fc3a Refactor islands to be memory contiguous.
PiperOrigin-RevId: 755803476
Change-Id: I41972b07e0d5ef5d0117c94f565b93367b87458b
2025-05-07 05:06:27 -07:00
Alessio Quaglino 3e9d130092 Add mjs_getPluginAttributes.
PiperOrigin-RevId: 752691116
Change-Id: Ib503a99f8d10661b8bf92410ccf471420f924986
2025-04-29 05:19:09 -07:00
Alessio Quaglino 75f196c7ef Add missing PointToLocal call in mjCPlugin copy constructor.
PiperOrigin-RevId: 752486555
Change-Id: I08b14476b9098e6473a4c00918ef3f9a287f35f6
2025-04-28 16:23:45 -07:00
Google DeepMind 4137a4c774 Bump version to 3.3.3 following the 3.3.2 release
PiperOrigin-RevId: 752482043
Change-Id: I3dae8a0b9de2be4d456e856825c18f16f62bf51a
2025-04-28 16:09:25 -07:00
Yuval Tassa 8f768be2da Remove solver_nisland field from mjData.
PiperOrigin-RevId: 750527660
Change-Id: I6b34944c92483ea2abc774df75efd868255a2bac
2025-04-23 03:27:41 -07:00
Rahul Lashkari 7c8930af96 fix(notebook): corrections in python notebooks 2025-04-21 15:38:50 +05:30
Saran Tunyasuvunakool 71a7004057 Fix array extent parsing logic for introspect.
Also fix the mjxmacro_test to correctly assert that all array extents defined in the X macros can be correctly parsed from field comments.

PiperOrigin-RevId: 747808525
Change-Id: I0b08dc263f8a46118a07200ae044d6c491207245
2025-04-15 04:03:04 -07:00
Alessio Quaglino ec186430ef Add setting plugin config properties via Python bindings.
PiperOrigin-RevId: 747421357
Change-Id: Ie80f1a889f2f6ec457c1e16193fa0694e07d3fe9
2025-04-14 08:07:14 -07:00
Gabe Oppenheimer 440ce5eb7a Update the version number to 3.3.2 following the 3.3.1 release.
PiperOrigin-RevId: 746147577
Change-Id: Idb7b4e7e06a4730b4f2eea8f6600b898e998f8db
2025-04-10 13:17:20 -07:00
Alessio Quaglino a209134315 Enable procedural plugin activation in Python bindings.
PiperOrigin-RevId: 746055614
Change-Id: Idcc2f62fdfeccdca356e3d1acadf168b46a98881
2025-04-10 09:13:21 -07:00
Sam Haves eadd13038a Move Mujoco struct wrappers definitions into library separate from pybind module.
This allows other modules to depend on functions such as FromRawPointer that previously were only defined in the _struct python module.

PiperOrigin-RevId: 745619670
Change-Id: I9f1af60cb665c00d853b7ca38201b37302d278af
2025-04-09 09:28:40 -07:00
Gabe Oppenheimer da1850760a Prepare for v3.3.1 release.
PiperOrigin-RevId: 745602958
Change-Id: I412fd58bb063959d5a151f4bca9b3ba26e942d02
2025-04-09 08:40:30 -07:00
Sam Haves 5c12ea871f Split MjSpec out into header to allow use by other pybind modules.
This should enable other pybind modules to accept arguments of type MjSpec.

PiperOrigin-RevId: 745580987
Change-Id: I435a8d264149369e3fbee14c5d2c628ef74b2541
2025-04-09 07:31:23 -07:00
Yuval Tassa 5031f88158 In minimize.least_squares, compute values at the solution at full verbosity.
PiperOrigin-RevId: 745301888
Change-Id: Ibd8e35e405bb2cebc7ac59a6dfc77118a6e6ba9f
2025-04-08 14:55:53 -07:00