Commit Graph

4466 Commits

Author SHA1 Message Date
Michael Moss 45c6137ec2 Update dependencies ahead of the 3.7.0 release.
PiperOrigin-RevId: 898652802
Change-Id: I74668a5116e8d1b81b61c5b5e94680d08f72bc33
2026-04-13 10:55:01 -07:00
Yuval Tassa 239aa1f856 Minor updates to documentation across multiple sections.
PiperOrigin-RevId: 898652783
Change-Id: Idb671910c18ed3406722b8a1307f97ae9a194139
2026-04-13 10:54:28 -07:00
Tom Erez c08d181d52 Add protocols for authoring simulation environments. This is for preview only, we discourage users from using this in production code.
PiperOrigin-RevId: 897908600
Change-Id: Ib2fa1ca8527665a99a8f31e9320afb5f54c31035
2026-04-13 10:50:26 -07:00
Tom Erez bd4ee537b8 Add protocols for authoring simulation environments. This is for preview only, we discourage users from using this in production code.
PiperOrigin-RevId: 897857927
Change-Id: I82ce0a23465429e7025334e83ba00dfbe5085649
2026-04-13 17:19:19 +00:00
Yuval Tassa f114ea8038 Optimize mj_tendonBias by computing Jdot * qvel directly
PiperOrigin-RevId: 897628283
Change-Id: Iee26a95d6aaa379730b89be14746308742111e2d
2026-04-10 04:57:55 -07:00
Yuval Tassa 025ba59fab Implement sparse Jacobian time derivative
PiperOrigin-RevId: 897609541
Change-Id: Ic86b6026cfc369c584d3edfe12a9a2fd14cc4357
2026-04-10 04:08:06 -07:00
Alessio Quaglino 6b724616c0 Prevent deletion from an attached mjSpec.
This change disallows calling `mjs_delete` on an mjSpec that has been attached to another mjSpec via `mjs_attach`. Attempting to delete an element from an attached spec will now result in an error. The Python bindings for `mjSpec.delete` have been updated to raise a ValueError when this occurs.

PiperOrigin-RevId: 897266695
Change-Id: Ic0670125a3028191ec50eca890f02b5910ec8b03
2026-04-09 13:14:00 -07:00
Sam Haves a744b366fb Include obj and stl decoder plugins as sources in CMake builds.
This removes the need to load these decoders via mj_loadAllPluginLibraries when using MuJoCo built with CMake. Other plugins are unchanged.

PiperOrigin-RevId: 897114719
Change-Id: Iee914cc5e05798186f384a67901f1cf86bc2f887
2026-04-09 07:58:28 -07:00
Yuval Tassa 81720071b8 Changes to dcmotor:
- Remove `lugre:viscous`, should now be added directly to actuator `damping`. Trying to do this for the user was incompatible with default inheritance (compounding instead of overriding).
- Move voltage limiting from the `saturation` to the `controller` attribute.
- Fix indexing issues in default inheritance.

PiperOrigin-RevId: 897087642
Change-Id: I5388c2633e15c7e223992e7eb5d6a28db75a6438
2026-04-09 06:52:45 -07:00
Haroon Qureshi 26fb65c7a7 Expose Drawable Material allowing users to manipulate it directly.
PiperOrigin-RevId: 897079632
Change-Id: Iec51ab30dc087562b8e6a464e122525f144e73a9
2026-04-09 06:34:53 -07:00
Haroon Qureshi f6baacfa86 Remove ObjectManager dependency from Material.
PiperOrigin-RevId: 897056556
Change-Id: Ic02239d7a411b52333b48a069292b21afb547b19
2026-04-09 05:34:18 -07:00
Haroon Qureshi edc807895f Split SceneView into two parts: SceneView and SceneBridge.
SceneView owns the filament Scene, View, and Camera objects.
is responsible for rendering the Scene (to which Entities
have been added).

SceneBridge takes the mjvScene as an input and updates the
corresponding light and drawable Entities in the SceneView.

PiperOrigin-RevId: 897007401
Change-Id: I3ec245f5bd48c3654672b11a55fb011f113454cc
2026-04-09 03:32:57 -07:00
Kyle Bayes 229d821915 Enable multiccd for golden data.
PiperOrigin-RevId: 896996806
Change-Id: I7f842d25b4497e135831879e4ac1b268d0307aa6
2026-04-09 03:07:01 -07:00
Tom Power cc0933af8b Add com_pos to Mujoco Warp shims.
PiperOrigin-RevId: 896969879
Change-Id: Idc3eb067a8473251a98404525df0c8c134ac2032
2026-04-09 02:12:17 -07:00
Tom Power 05e26e961c Refactor: Expose flex-related fields directly on mjx.Model.
PiperOrigin-RevId: 896958292
Change-Id: I94b32048e69d2b6844db0911f037318d5fbf4a6a
2026-04-09 01:43:00 -07:00
Sam Haves f2461f9ce6 Modify mj_PLUGIN_LIB_INIT to support multiple plugins in the same compilation unit.
Previously on MSVC we used DllMain to register plugins, you cannot have multiple definitions of DllMain in a single unit so you would get errors if you tried to register two plugins. This modifies the implementation to insert a function pointer into the C runtime initialization instead.

PiperOrigin-RevId: 896612678
Change-Id: I07732147b955d741c836acff6da986db0e9b9eff
2026-04-08 11:35:16 -07:00
Yuval Tassa 33fd2fe40e Improve mju_addToSclSparseInc with two-pointer loop.
Profiling `leaves.xml` with contacts disabled, this function takes up most of the time (in the implicit integrator). Total `testspeed` run time:

BEFORE: 18.5s
AFTER: 16.5
PiperOrigin-RevId: 896525902
Change-Id: I57f4a984d178956a2902212deb857bf53f53f01b
2026-04-08 08:49:15 -07:00
Google DeepMind 8191bf1e41 Update MuJoCo README with a link to mjswan.
Add a note about mjswan, which extends the JavaScript/WebAssembly bindings with real-time policy control and interactive features. Requested by tatsuki.

PiperOrigin-RevId: 896513129
Change-Id: I984a41d281ffa1ad307f0b3db909140a201dd717
2026-04-08 08:21:34 -07:00
Yuval Tassa 0e04436d51 Remove `mjWARN_VGEOMFULL, handle visual geom buffer full warnings in mjvScene`.
PiperOrigin-RevId: 896483023
Change-Id: I6dde2c20d8e8e229cf95e1f002dd10525d3376e6
2026-04-08 07:17:53 -07:00
Yuval Tassa 5a2cc6cee3 Improve torque-speed Figure (3b) in dcmotor.pdf
PiperOrigin-RevId: 896453507
Change-Id: I3973b173db9035b71d69bc2c9dea990689d06a1c
2026-04-08 06:04:57 -07:00
Haroon Qureshi c6a434a408 Move flex/skin Mesh creation into ModelObjects.
PiperOrigin-RevId: 896419032
Change-Id: Ib0f0cd0c80c9f630127f2f72dbaed7c644046663
2026-04-08 04:38:10 -07:00
Haroon Qureshi 87b0ea785e Move UpdateMeshData into model_objects.cc.
PiperOrigin-RevId: 896346482
Change-Id: Id57586d652faca75d07ccfe0cee72e97afc823fc
2026-04-08 01:48:38 -07:00
Haroon Qureshi 49b45bd993 Merge vertex_util into math_util.
PiperOrigin-RevId: 896071837
Change-Id: Ieec0e4b4b11988805219739a84f413871ae34f1b
2026-04-07 13:53:27 -07:00
Haroon Qureshi f7fd5fc58b Rename RenderTargetAndTextures to RenderTarget.
Also rename render_target_util to render_target.

PiperOrigin-RevId: 896033907
Change-Id: I123cf98dc308f7cc4916f7b79dcc59a05564022d
2026-04-07 12:30:39 -07:00
Yuval Tassa 382474bb9d Minor improvements to dcmotor
PiperOrigin-RevId: 895907301
Change-Id: Ia50a6d06c1ede9894cc71f375db837d104f0211e
2026-04-07 08:11:13 -07:00
Haroon Qureshi b61d304126 Rename buffer_util to mesh.
PiperOrigin-RevId: 895897940
Change-Id: Ic6d4315fd6429efda81d24168548271a1a1f03c5
2026-04-07 07:49:38 -07:00
Haroon Qureshi a3c9115d1e Use MeshData struct for creating Meshes.
Consolidate all Vertex and Index buffer creation inside the
Mesh class. Users now set data pointers in the MeshData
from which the Mesh class will create the filament buffers.

PiperOrigin-RevId: 895871213
Change-Id: Ie086fcb5c31adf90e54cba168b03501e21720726
2026-04-07 06:41:36 -07:00
Matija Kecman 9f3babd60c Group platform components into descriptive subfolders
PiperOrigin-RevId: 895832492
Change-Id: I6cc56b0e4b002b2998579cde95f4b88dfbd88184
2026-04-07 04:58:32 -07:00
Haroon Qureshi 6273331d82 Define a struct that can be used to create a Mesh.
A future change will update all callers to use this
method for creating Meshes after which we will remove
the constructor that takes explicit filament objects.

PiperOrigin-RevId: 895807063
Change-Id: I50833817961ae57fbb9ed6b875c1ef286b9fdd26
2026-04-07 03:58:21 -07:00
Haroon Qureshi 28d8ddcbeb Rename FilamentBuffers class to Mesh.
Update the Mesh class so that it manages the lifetime of the
vertex and index buffers.

PiperOrigin-RevId: 895794022
Change-Id: I5eda578b8b7ed7f918e792f6181ec724729b5215
2026-04-07 03:24:40 -07:00
Copybara-Service 6de35648d1 Merge pull request #3165 from thowell:mjwarp_per_world_meshes_doc
PiperOrigin-RevId: 893971099
Change-Id: I57d44bf8f793356601ec6bde129a459ff114b91c
2026-04-03 02:35:45 -07:00
Alessio Quaglino 0e3306b62d Add useful flex arrays to MJX API.
This enables using name2id for flexes.

PiperOrigin-RevId: 893923892
Change-Id: I7c2a71791e26fa2280cfa75fd66db328f4599b0b
2026-04-03 00:13:29 -07:00
Sam Haves db011b5100 Add condition to team notification of github actions that it's from 'main'
PiperOrigin-RevId: 893437916
Change-Id: I0c0b22747e4e4cac23ad0f44cf8b667863cc79ae
2026-04-02 04:42:39 -07:00
Taylor Howell e9de329e4e Import google-deepmind/mujoco_warp from GitHub.
PiperOrigin-RevId: 892971818
Change-Id: Ibce0c41294a4fcf2825a246a9533e8927fdc7e82
2026-04-01 09:33:20 -07:00
Yuval Tassa 70a7647ad9 Add <dcmotor> actuator and related docs and tests.
PiperOrigin-RevId: 892927987
Change-Id: I38ed6412801341ba03ddf5fe7b93a6081df24d37
2026-04-01 07:50:23 -07:00
Haroon Qureshi 6da210c794 Rename texture_util to texture.
PiperOrigin-RevId: 892868713
Change-Id: I113132dc9e4535e94d48c4e71520acb159e2e216
2026-04-01 05:14:47 -07:00
Haroon Qureshi 565e46da42 Update GuiView to use Texture class.
PiperOrigin-RevId: 892866156
Change-Id: I2a2e9ef51df51472b675d69edcf2d5ba291721ea
2026-04-01 05:06:08 -07:00
Haroon Qureshi 9fa9193a62 Split Texture creation into two structs.
TextureConfig describes the properties of the texture (e.g.
width, height, pixel format, etc.).  TextureData contains
the binary payload of the texture.

PiperOrigin-RevId: 892854578
Change-Id: I604b926ac38ff1050cac8fdf9ec767b789c0798e
2026-04-01 04:32:22 -07:00
Haroon Qureshi 95666da039 Introduce a Texture class that wraps filament::Texture.
PiperOrigin-RevId: 892839636
Change-Id: I3c08fba0a514cfb758ec2842d8510c6d88300874
2026-04-01 03:52:05 -07:00
Haroon Qureshi 6d32038417 Move all texture creation functions into texture_util.
PiperOrigin-RevId: 892838123
Change-Id: I84a536b111c3d6b5391513d6623c2e9a4d02f3df
2026-04-01 03:47:51 -07:00
Taylor Howell 0b54638df4 Import NVIDIA/warp from GitHub.
PiperOrigin-RevId: 892794388
Change-Id: Ic681071dc68bfaecaaab4e131c1c464dca99f9b5
2026-04-01 01:54:01 -07:00
dependabot[bot] 1640d6a4bc Copybara import of the project:
--
9a748c86e78009393be8ef2f586c5637ac6225d9 by dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>:

Bump pip from 24.3.1 to 26.0 in /python

Bumps [pip](https://github.com/pypa/pip) from 24.3.1 to 26.0.
- [Changelog](https://github.com/pypa/pip/blob/main/NEWS.rst)
- [Commits](https://github.com/pypa/pip/compare/24.3.1...26.0)

---
updated-dependencies:
- dependency-name: pip
  dependency-version: '26.0'
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
COPYBARA_INTEGRATE_REVIEW=https://github.com/google-deepmind/mujoco/pull/3064 from google-deepmind:dependabot/pip/python/pip-26.0 9a748c86e78009393be8ef2f586c5637ac6225d9
PiperOrigin-RevId: 892327253
Change-Id: I0cf41d08a1ffeb3238cddd5a3fcf39388810d9b7
2026-03-31 07:28:29 -07:00
Haroon Qureshi d4103939e4 Correctly compute bounding boxes for meshes.
Enable culling when bounding box is available.

PiperOrigin-RevId: 892289875
Change-Id: I124426b6e7e72f4d9a1486320d72d6eb032e0828
2026-03-31 05:58:11 -07:00
Haroon Qureshi 06d6bda5bb Factor out mjModel-specific objects from ObjectManager.
All objects that are specific to the mjModel (meshes, textures, etc.)
are now managed by a ModelObjects class which is owned by the SceneView
and not the FilamentContext.

PiperOrigin-RevId: 892250776
Change-Id: Iddad66fd3ab1a60c4becdcb5d0c935ed9ea8ad90
2026-03-31 04:16:51 -07:00
Michael Moss 51b2f52296 Workaround for TypeScript 'outFile' is deprecated errors.
PiperOrigin-RevId: 892241799
Change-Id: Ibe028d453f35f5e03bdf66418bc4b45c20e807d3
2026-03-31 03:55:06 -07:00
Haroon Qureshi bcaa0a8e6a Use mjrf functions from within other mjrf functions.
PiperOrigin-RevId: 892234323
Change-Id: I70ff01121764b552da84bdcc9b01527ae138dfea
2026-03-31 03:37:26 -07:00
Copybara-Service ab7b78caa9 Merge pull request #3200 from StafaH:render_doc_update
PiperOrigin-RevId: 891839705
Change-Id: I79874c769a1399e3ca71ec42b7389055b5b5fb88
2026-03-30 12:10:11 -07:00
Peter Hawkins 47264877a1 [JAX] Replace jnp.clip(..., a_min=..., a_max=...) with jnp.clip(..., min=..., max=...).
a_min and a_max are deprecated parameter names to jax.numpy.clip.

PiperOrigin-RevId: 891786675
Change-Id: Icc06efe0381c0db06f4aeb16f281a4d01ea37539
2026-03-30 10:28:24 -07:00
Yuval Tassa 5107c31c06 Add missing API documentation entries.
PiperOrigin-RevId: 891658745
Change-Id: I7fa4f0535e72eaaf8964ce3f1bcf4bf87486580a
2026-03-30 05:13:31 -07:00
Mustafa Haiderbhai 5e677f1091 Update mjwarp render doc after flex rendering improvements 2026-03-27 13:01:16 -04:00