Commit Graph

4429 Commits

Author SHA1 Message Date
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
Haroon Qureshi e4f4044659 Move material multipliers to calling function.
PiperOrigin-RevId: 890457829
Change-Id: Icb4151a792321aadd3958d479ef02f29ae4a2afc
2026-03-27 08:06:57 -07:00
Haroon Qureshi e17e3bfd82 Remove ObjectManager dependency from Light.
PiperOrigin-RevId: 890454094
Change-Id: Idb609ad6d8ed7df714cad7b0aca997fee73ab96d
2026-03-27 07:57:43 -07:00
Haroon Qureshi 75bbf03cfb Add PBR test model.
PiperOrigin-RevId: 890431107
Change-Id: Ib3b5fa775daa93b4c798483df226585441ea5c61
2026-03-27 07:05:08 -07:00
Haroon Qureshi b31e15fbb8 Remove ObjectManager dependency from GuiView.
PiperOrigin-RevId: 890407310
Change-Id: I9548ee698fbd02d967581200ba2f6ec31e0f7a7c
2026-03-27 06:01:56 -07:00
Haroon Qureshi 1c2100e27c Refactor FilamentContext to prepare for upcoming changes.
Separate out the parts of the FilamentContext initialization that
depends on the mjModel into a separate Init function.

PiperOrigin-RevId: 890373341
Change-Id: I06b524668cd60dad804d437958f4f6606c46200b
2026-03-27 04:26:10 -07:00
Haroon Qureshi d597b23e5e Remove mjModel dependency from builtins.
PiperOrigin-RevId: 890372546
Change-Id: I1d6b99998e42c1d80072a04f5e57eaf5b4d49791
2026-03-27 04:24:09 -07:00
Haroon Qureshi f7fb23084d Remove mjrContext from FilamentContext.
Setting values in the mjrContext is only useful for the classic
renderer.

PiperOrigin-RevId: 890345656
Change-Id: Ie3d34dc260d13f74b569dcf575e88dde894d652b
2026-03-27 03:13:17 -07:00
Yuval Tassa 9f5fc99711 Convert monolithic RecompileCompare and WriteReadCompare tests into test suites, one test per file.
PiperOrigin-RevId: 890149850
Change-Id: Ib3e8c032a7b43b4a3f85e7a922e25987050cd77c
2026-03-26 18:21:49 -07:00
Haroon Qureshi 0021564035 Remove unused member variable.
PiperOrigin-RevId: 889775964
Change-Id: I8464d381158875c22437633dfbb548c10dc89462
2026-03-26 05:18:01 -07:00
Haroon Qureshi a25b9376f0 Remove unused variable.
PiperOrigin-RevId: 889771550
Change-Id: I8b89e6ccf0a896461b9ddadc23f57e003ea7f8da
2026-03-26 05:07:28 -07:00
Michael Moss f28e727a57 Ignore new tsc deprecation warning from emscripten.
PiperOrigin-RevId: 889322248
Change-Id: I70be60506a8ecbc0dde0f64f5a31c075a804706e
2026-03-25 10:38:57 -07:00
Yuval Tassa c000724a53 Update references.h
PiperOrigin-RevId: 889270962
Change-Id: I0d4295b936e00c55846ea4f6e13f7c25c36c5c6b
2026-03-25 08:59:15 -07:00
Haroon Qureshi 07fc5bc736 Fix build.
PiperOrigin-RevId: 889270417
Change-Id: I4052639054f98c1775357797a80b3049e31b18c7
2026-03-25 08:58:04 -07:00
Haroon Qureshi 4fce53c31f Detect KTX files as image/ktx.
PiperOrigin-RevId: 889260070
Change-Id: I93a505bca3da87d05c71fe302f9e7ac31806ab90
2026-03-25 08:32:28 -07:00
Sam Haves 10c5f5d066 Add comments to mjpEncoder member functions.
PiperOrigin-RevId: 889233466
Change-Id: Ia08ae7ef9bd554cea2f82270e8f150db3e01bf69
2026-03-25 07:33:10 -07:00
Haroon Qureshi 1bfd68cbba Adds function for creating the filament Platform based on the renderer
configuration.

PiperOrigin-RevId: 889226229
Change-Id: Ia5bcdc16e9861e39c49422c2d5fccee23e477af6
2026-03-25 07:15:58 -07:00
Alessio Quaglino c49bc7c7c0 Warn when a non-rigid flex has no constraints or passive forces.
Add a warning in user_model.cc if a flex is not rigid and has no edge equality constraints or passive forces (edge stiffness, edge damping, or vertex damping). Such flexes would not affect the simulation. A test case is added to verify the warning.

PiperOrigin-RevId: 889215981
Change-Id: I481128e1456921b632719547c676d201fdfbe931
2026-03-25 06:50:30 -07:00
Haroon Qureshi fd3ce4fe92 Implement reflective surfaces.
Reflective surfaces (planes) use a custom shader to blend their
texture with a texture that contains the reflected image. The
reflected image is rendered to a texture as a separate render
pass in the SceneView.

Because reflective textures are generated after the preparation
phase, additional functions are needed to reapply the texture
to the drawable.

PiperOrigin-RevId: 889213413
Change-Id: I7bad39d62e3e5ba38cf6ac667fec5b87bfa7b2a2
2026-03-25 06:43:46 -07:00
Haroon Qureshi 02b0b40b1c Add reflective materials.
A future CL will implement reflective surfaces and make use of these materials.

PiperOrigin-RevId: 889200524
Change-Id: Icbe5c0c390f89789ed0f5d5c6058a2ef31105608
2026-03-25 06:10:59 -07:00
Haroon Qureshi c61d239ac6 Use model name for window title.
PiperOrigin-RevId: 889193934
Change-Id: Ief9ade9e239c14da1d824d9bc8aa95dc0a71b65f
2026-03-25 05:53:47 -07:00
Haroon Qureshi 4df2fc2490 Ensure decoder has an error string.
We use that error buffer to check for errors.

PiperOrigin-RevId: 889193796
Change-Id: I1f7575321a57301b4ae5002d0c488bbb16a30b26
2026-03-25 05:52:46 -07:00
Sam Haves f5d3ce3451 Introduce mjpEncoder plugin architecture
Add a new mjpEncoder plugin type mirroring the existing mjpDecoder pattern.
Encoders serialize an mjSpec + mjModel to an mjResource for a given format.

New API functions:
- mjp_registerEncoder: globally register an encoder
- mjp_defaultEncoder: zero-initialize an encoder struct
- mjp_findEncoder: look up an encoder by filename extension or content type

The mjfEncode callback takes (mjSpec*, mjModel*, mjVFS*, mjResource*) and
returns 0 on success. Writing to mjResource keeps symmetry with the decoder
reading from mjResource and leaves the door open for writable resource providers.

PiperOrigin-RevId: 889187898
Change-Id: I180771b2255b91dea188ac5e2cdc3a8f0fb85364
2026-03-25 05:35:39 -07:00
Alessio Quaglino 2d33b50243 Parallelize tactile sensor computation.
The computation of tactile sensor values for each taxel is now parallelized using the MuJoCo threadpool when the number of taxels exceeds a threshold. Each thread processes a batch of taxels, accumulating forces from all colliding geoms.

PiperOrigin-RevId: 888606457
Change-Id: I98abf3e98a7318fc14080054bea7093ab46e8b8b
2026-03-24 05:21:08 -07:00
Alessio Quaglino f4e3469239 Add test for geom and mesh plugin attributes.
This test verifies that geom.plugin and mesh.plugin are accessible and can be assigned a plugin instance.

PiperOrigin-RevId: 888576511
Change-Id: Id17885de5fdf1f4543ac195a8b04bb01139d1bfa
2026-03-24 03:59:35 -07:00
Kyle Bayes 5c0de1f84d Remove model and data from ccd object. Each geom gets a copy of pos and mat, which is editable without modifying mjData.
PiperOrigin-RevId: 888028695
Change-Id: Ic9bbea4bcd7c2dbe62326798eab73d14da0aaa13
2026-03-23 04:51:53 -07:00
Haroon Qureshi babcfd6575 Add class to manage resources for a RenderTarget.
PiperOrigin-RevId: 888016283
Change-Id: I4959e63e95fad4f75a7a04fabf0879f0b9238f9f
2026-03-23 04:17:53 -07:00
Michael Moss 5664b9e89e Update pybind to 3.0.2.
PiperOrigin-RevId: 887980078
Change-Id: I2eb5284e878180293553e20c94dae853c380805c
2026-03-23 02:44:19 -07:00
Yuval Tassa 4b1667e4ce Fix documentation links
PiperOrigin-RevId: 886920783
Change-Id: Ie1ab433aeaaa668a103a684cbb30ef5375c6211b
2026-03-20 12:26:56 -07:00
Yuval Tassa 510d75f4cf Allow actuators to add damping and armature to joint and tendon transmissions.
PiperOrigin-RevId: 886899849
Change-Id: I02200ee0d4f7c96096d8188b95f823b566562a30
2026-03-20 11:41:15 -07:00
Copybara-Service f7bd6d15f7 Merge pull request #3164 from Balint-H:unity/passive-resubmit
PiperOrigin-RevId: 886821338
Change-Id: I2b733732fcc17223aad4299713f5528b597f03e8
2026-03-20 09:05:07 -07:00
Yuval Tassa c348bc9f4c Disable clang-format for MuJoCo public headers and engine source.
PiperOrigin-RevId: 886720463
Change-Id: I7c89fa99bee0598dcf48807bfbd61ee8bf8fa9b8
2026-03-20 05:06:15 -07:00
Michael Moss 904744bd72 Fix --gc-sections linking error on github macos-15-x86_64.
This forces `CMAKE_REQUIRED_FLAGS` to be treated as a string instead of list,
so none of the args get dropped when passed through `check_c_source_compiles`.

PiperOrigin-RevId: 886717366
Change-Id: I6314f9bfabd9d62bdcad5070c8801c453c381b79
2026-03-20 04:57:54 -07:00
Michael Moss 02d1d3d503 Fix call_guard usage inside .def_property calls.
See also [PR #5533](https://github.com/pybind/pybind11/pull/5533).

PiperOrigin-RevId: 886714838
Change-Id: I8c98461098ccf4958fb18bdcb5acc293c988c258
2026-03-20 04:50:50 -07:00
Yuval Tassa 9fa3f6f77e Enable float32 testing for most MuJoCo engine and user tests.
PiperOrigin-RevId: 886697701
Change-Id: I4a96fae03ea18494c3fcef8eb17b3b6f0863e9b7
2026-03-20 04:05:06 -07:00
Copybara-Service cab4b73f41 Merge pull request #3184 from MatiasManevi:single-thread-npm
PiperOrigin-RevId: 886334046
Change-Id: If054286ac11f2b0e13e770922c049e334d136ab1
2026-03-19 13:05:52 -07:00
Haroon Qureshi 6134fe48d9 Enable shadows depending on render settings.
PiperOrigin-RevId: 886236214
Change-Id: I6999e52ff3d9fc0734082312a77d6c033b69a24b
2026-03-19 09:59:50 -07:00