Commit Graph

4478 Commits

Author SHA1 Message Date
Google DeepMind 8135465779 Remove usages of texture2D and other FL0 features that are obsolete due to FL0 now going through spirv-cross.
This is an early upload of https://github.com/google/filament/pull/9867 and necessary material changes

Original PR commits:
FL0 materials are always compile via spirv-cross
postfx materials now support sRGB emulation in FL0

PiperOrigin-RevId: 899262890
Change-Id: I52c002d60790d84269674c1f0d0c5f7d6a58000c
2026-04-13 17:31:29 -07:00
Yuval Tassa 412cee2059 Add Jdot correction for connect and weld constaints
Measured reduction in constraint violations before/after this change:

| Model | Correction ON (Avg Viol) | Correction OFF (Avg Viol) | Reduction |
| :--- | :--- | :--- | :--- |
| `jdotv_connect_2d.xml` | 3.959e-4 | 1.699e-3 | **76.7%** |
| `jdotv_connect_3d.xml` | 1.399e-3 | 5.493e-3 | **74.5%** |
| `jdotv_weld_3d.xml` | 9.472e-3 | 1.148e-2 | **17.5%** |

PiperOrigin-RevId: 899137525
Change-Id: Ic3e33764ebd64239bab916289c23d80c3da0b51b
2026-04-13 12:48:03 -07:00
Yuval Tassa 0c337799bd Implement midpoint integrator for free bodies.
PiperOrigin-RevId: 899043541
Change-Id: I0bb38f6ad94e189b45ab16777a04ad6fefc6adf7
2026-04-13 10:58:49 -07:00
Copybara-Service d9b5d8babb Merge pull request #3216 from tkelestemur:mjx-render-batched-unpackers
PiperOrigin-RevId: 899017204
Change-Id: I7409a00cff81a1d24afe2ca50ec14c2f25c103ea
2026-04-13 10:58:20 -07:00
Sam Haves 7ae07d8157 URDF parsing no longer strips filepaths by default.
This default forces users to use the `spec.assets` dictionary or to do other filepath gymnastics when loading URDF. Instead we encourage users to just modify file paths directly if necessary.

PiperOrigin-RevId: 899009853
Change-Id: I4bb84606a95b65be79ccc77ccbe78062d6de8773
2026-04-13 10:57:52 -07:00
Tom Erez f55aeb04fa Add protocols for authoring simulation environments. This is for preview only, we discourage users from using this in production code.
PiperOrigin-RevId: 899009633
Change-Id: I2de08c5cc4ece69fa135f3fd02df7542bf66d7d0
2026-04-13 10:57:25 -07:00
Yuval Tassa c004d144d1 Correct DC motor derivative calculation and enforce actearly.
PiperOrigin-RevId: 898983657
Change-Id: I008529eacf3e400696d26bd3a52a4cf4c1c12225
2026-04-13 10:56:58 -07:00
Haroon Qureshi bc83c24a4d Rename Renderables to Renderable.
PiperOrigin-RevId: 898904688
Change-Id: I5e52708e4f745ef1d0e4281a7fa1aa29b660bb6a
2026-04-13 10:56:30 -07:00
Haroon Qureshi b38aa0fa23 Move Material into Renderables.
PiperOrigin-RevId: 898873853
Change-Id: I3ef13e44c16334c52ea6f08dbc44fde23096ef4c
2026-04-13 10:55:59 -07:00
Haroon Qureshi 126d5b67e3 Remove ModelObjects and ObjectManager members from Drawable.
Split up the Update function into parts and allow SceneBridge
to call them individually, passing in the ModelObjects or
ObjectManager as needed.

PiperOrigin-RevId: 898851732
Change-Id: I25c6bf920b85caa7b2ddee045475f11fb7a8bac8
2026-04-13 10:55:30 -07:00
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
Tarik Kelestemur 1c310ca7be keep render util test setup
Restore the existing Warp/CUDA-gated render_util test setup so the review change stays minimal while preserving the new batched shape coverage.

Made-with: Cursor
2026-04-09 08:14:15 -04: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
Tarik Kelestemur de39128114 fix render batching 2026-04-08 14:09:45 -04: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