Commit Graph

3082 Commits

Author SHA1 Message Date
Sam Haves 2ca9602d3c Remove crank site from ActuatorAPI generated code.
The generated code was stale and no longer reflected the current schema.

PiperOrigin-RevId: 773369007
Change-Id: Ife3fa373309e668430453351f6fd10998edfdd8a
2025-06-19 09:31:10 -07:00
Sam Haves 86e6a0415b Add missing PLUG_INFO_LIBRARY_PATH to mjcPhysics plugInfo.json
This gets replaced during build installation time to have the actual path to the plugin shared lib.

PiperOrigin-RevId: 773354944
Change-Id: Ib4a78d6308f97654fdd995460ac05c1c4cfbd70f
2025-06-19 08:31:05 -07:00
Sam Haves f1b3897ea7 Fix missing namespace in test_utils.
PiperOrigin-RevId: 773354912
Change-Id: Ic19ba6f1ed4c3ae37a9c143f64da8b7ddc3b3e86
2025-06-19 08:29:34 -07:00
Alessio Quaglino 35665c5cb3 Skip mesh geoms in touch sensor.
Also, use geom_rbound for the sensor size and check that there is at least one collision geom.

PiperOrigin-RevId: 772928954
Change-Id: I56f1577df66213a70fb1dc12488fbcd2f8a4b8b4
2025-06-18 08:24:37 -07:00
Yuval Tassa 335a9ce0c2 Use early-exit to improve readability of mj_instantiateEquality.
PiperOrigin-RevId: 772917213
Change-Id: I106402d063a8fd0e95154bd8608eb4359d4dfdab
2025-06-18 07:45:23 -07:00
Alessio Quaglino 92bc486558 Make mjs_findElement find textures by file name.
This is done if the model is uncompiled and their name is empty.

PiperOrigin-RevId: 772885774
Change-Id: I827d5b679637fa0571cfb0a69833ed688df16304
2025-06-18 05:54:12 -07:00
Nimrod Gileadi 9e2c21a17d Return stricter type from mjCModel::operator+=(mjDef&).
PiperOrigin-RevId: 772871198
Change-Id: I4c840389b38e2d8d6bcf92311fad3242324fa3af
2025-06-18 05:00:46 -07:00
Google DeepMind 6b309b5251 Display equality constraints in the simulate UI.
Add section for toggling constraint activity to the UI, similar to actuators or joint controls.

PiperOrigin-RevId: 772866923
Change-Id: I017b9195fcf67b5865e9d44d6c8aded64c8bc46d
2025-06-18 04:42:34 -07:00
Erik Frey bb1d313780 Update docs reflecting MJX now has good support for implicitfast.
PiperOrigin-RevId: 772660862
Change-Id: I2ba27b39bb6885b48f65ca1afdc6b83ec027a26d
2025-06-17 16:08:12 -07:00
Copybara-Service a7559ed0ad Merge pull request #2378 from Balint-H:feature/unity-obj
PiperOrigin-RevId: 772619174
Change-Id: I62a2bbeb0d8bb0fb007af1abc93d6e8b3449b3fe
2025-06-17 14:24:08 -07:00
Taylor Howell a64f1fd335 Compute M in mjx._get_data_into.
PiperOrigin-RevId: 772594295
Change-Id: I7da992e9e5590c6060fbe1e2c1e40ccbd3c9b2b9
2025-06-17 13:21:22 -07:00
Taylor Howell 8084b06a35 Add tendon armature with sparse qM to MJX. Fixes #2681.
PiperOrigin-RevId: 772583693
Change-Id: I827d61aacada33f53500bf54613ccb8145bc854b
2025-06-17 12:52:03 -07:00
Bálint Hodossy 3a035fc0a9 Remove trailing whitespaces from MjMeshfilter 2025-06-17 19:32:24 +02:00
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
Nimrod Gileadi d9aae1521a Remove confusing operator overload in user_api.cc
Explicitly add const_cast. This doesn't change the previous behaviour, just makes it explicit.

PiperOrigin-RevId: 772486471
Change-Id: I942bd4effed93a366089411ca18461cad52bff88
2025-06-17 08:34:33 -07:00
Yuval Tassa 998769a995 Return the total non-zeros from mju_sqrMatTDSparseCount.
PiperOrigin-RevId: 772414653
Change-Id: Ic1cac868af0034196f33d08b2456be77c72cbd50
2025-06-17 04:27:15 -07:00
Google DeepMind ea949f1cee Add support for ORM maps in mujoco file format plugin
The ORM texture is a packed-channel map, with ambient occlusion in Red, roughness in Green, and metallic in Blue channel.

PiperOrigin-RevId: 772367369
Change-Id: I88a4dee2477daa1e3c0b00197bfbe2b276ba9937
2025-06-17 01:45:10 -07:00
Nimrod Gileadi e2e2932fe6 Mark all single-argument constructors in user_objects.h as explicit.
This avoids accidental implicit conversions.

Also included some constructors with multiple arguments, where default values mean that the single-argument constructor is valid.

PiperOrigin-RevId: 772117936
Change-Id: I57e54a373593080e9d68961b00488c7a70f1aff8
2025-06-16 12:00:51 -07:00
Google DeepMind 1f0e4891c2 Add some autoformatting changes to mujoco_to_usd.cc
PiperOrigin-RevId: 772032458
Change-Id: I94a80e7f7928b2956e76268c0d89fb862a228c41
2025-06-16 08:15:00 -07:00
Google DeepMind bb1b2db3a9 Add support for normal maps in mujoco file format plugin
PiperOrigin-RevId: 771992722
Change-Id: Ifeae9e12f1071018112e697402361caa84095ff2
2025-06-16 06:01:18 -07:00
Google DeepMind 3969cac614 Fix tinyxml include
This came up as a code suggestion, presumably for consistency.

PiperOrigin-RevId: 771966921
Change-Id: Ic29afc9a9eb1e0b87dd7d9ac04a5ad9790f86f0d
2025-06-16 04:26:41 -07:00
Baruch Tabanpour 41eb966c9b Resolve deprecation warnings in playground.
PiperOrigin-RevId: 771184565
Change-Id: Ic2056ad82a6a0c20897a02ea39c37b3f44a80513
2025-06-13 12:28:57 -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
Baruch Tabanpour 65deedbc75 Rename backend_impl to impl. Remove _full_compat from callsites.
PiperOrigin-RevId: 770400560
Change-Id: I7bec79aeae07322a30b15cc04d4dd05077741a8b
2025-06-11 18:05:49 -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
Erik Frey e5631c0bab [MJX] Don't raise sparse qM error in tendon_armature if there are no tendons.
PiperOrigin-RevId: 769753590
Change-Id: I5dd7a953f08e0566c5e22c2c926d7bd9c2c57bd6
2025-06-10 12:46:47 -07:00
Alessio Quaglino 5f42078dc1 Do not write nameless frames whose class is "main".
PiperOrigin-RevId: 769685151
Change-Id: I3d993d7521db2b2adbf611c3e4eb5b4b293bdc30
2025-06-10 10:15:43 -07:00
Yuval Tassa bf56312c9d Increase size of image in changelog
PiperOrigin-RevId: 769549620
Change-Id: I8666771ecf50b91342694deeb357b3edfa3f62d9
2025-06-10 03:34:17 -07:00
Erik Frey caaf7b3a69 Add tendon armature to MJX.
PiperOrigin-RevId: 769294284
Change-Id: Idfbd4f355eb26fba5035973ab989a9d3af05c85f
2025-06-09 14:27:18 -07:00
Alessio Quaglino b8768aa1cd Allow to fusestatic a body if it doesn't generate a referencing error.
PiperOrigin-RevId: 769189929
Change-Id: I62f512813ea330da088b28d39373df39be10a602
2025-06-09 10:05:57 -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
Google DeepMind dd18dd2024 Apply metallic and roughness scaling factors.
PiperOrigin-RevId: 767518801
Change-Id: I7eff7b7a56cfbb9c6e46ac22011559eabf401c07
2025-06-05 03:03:16 -07:00
Alessio Quaglino 047df4e871 Add texture to rotating cylinders in pulley example.
PiperOrigin-RevId: 767260834
Change-Id: I3030be314b5b197163d75ef88a5fd99a940d9c67
2025-06-04 13:16:04 -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 fe81373ffe Enable WriteReadCompare for models with assets.
PiperOrigin-RevId: 765500742
Change-Id: I119dbea11ed6771839b5e81d04070e95a51d3ed0
2025-05-31 00:56:27 -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
Robin Alazard 072c872deb Add helper methods for storing USD prim paths into mjsElements.
This way we fix a previously uncaught casting error due to using different types.

PiperOrigin-RevId: 765177079
Change-Id: I4f817f12c92fe578b25e8c53a94b3c91e22a3db0
2025-05-30 07:10:35 -07:00
Alessio Quaglino 7932b4b202 Accumulate inertial in mjs_bodyToFrame.
PiperOrigin-RevId: 765129145
Change-Id: Ib7caca42ef4272ebe762655eee9380dae471be7f
2025-05-30 04:10:38 -07:00
Alessio Quaglino f72a175a2c Enable using sensor and SDF plugins in MJX:C.
PiperOrigin-RevId: 765089354
Change-Id: I3cacc2980ac8aeff68cfb927beb5b1dbb13261d4
2025-05-30 01:52:59 -07:00
Sam Haves b2e8589e7a Add support for actuators to Mujoco USD interop.
PiperOrigin-RevId: 764740692
Change-Id: Ib045653fee840087bc3891ee7e770bdaac08548c
2025-05-29 08:29:46 -07:00
Robin Alazard 6b919162d1 Add write_physics_ as a state variable on ModelWriter.
This way we don't have to worry about passing the write_physics param everywhere.

PiperOrigin-RevId: 764394280
Change-Id: I2c879ae57bdc30f50189960864097c932f967330
2025-05-28 13:33:01 -07:00
Robin Alazard fc69ef1084 Fix authoring type mismatch for geoms sizes attributes.
Fixes wrong sizes being displayed in usdview.
Also introduce a new test to ensure we catch as many of those kinds of errors as possible in the future.

PiperOrigin-RevId: 764388588
Change-Id: Id3c878edd054fe5272c42c9f960c65c850655559
2025-05-28 13:21:19 -07:00
Alessio Quaglino 287f46b220 Ensure last XML is freed after tests.
This fixes undetected memory leaks in tests calling mj_loadXML.

Additionally, a specific test for `mj_freeLastXML` is introduced.

PiperOrigin-RevId: 764294041
Change-Id: I8b5a5683d8431ed920cdd52b06ad3515d8e19e14
2025-05-28 09:26:46 -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
Google DeepMind 9b2b7cf92a Set light intensity to 0 by default (not 1000).
PiperOrigin-RevId: 764257692
Change-Id: If656095e3f8d4b4d9c97fa67bdad508a49095eb3
2025-05-28 07:47:28 -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
Kyle Bayes 56b88b59f0 Support 0-simplex in GJK code, and refactor code for efficiency and readability.
PiperOrigin-RevId: 764197889
Change-Id: Ie0d57474060a34a6b908be0386094f442cda448a
2025-05-28 04:19:13 -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
Sam Haves 441ca838a1 Add support for inertia and mass to Mujoco USD interop.
PiperOrigin-RevId: 763737956
Change-Id: I6cdf267d76536a26aeb6327ce90165842e32bd8a
2025-05-27 04:58:09 -07:00