Commit Graph

4675 Commits

Author SHA1 Message Date
Haroon Qureshi 5d818306ef Save/restore window size in UX settings.
PiperOrigin-RevId: 913695007
Change-Id: I3366b11a5de53292d4ffe0e4c46f866381624788
2026-05-11 07:44:09 -07:00
Haroon Qureshi 465e574c42 Test scene for shape generators.
PiperOrigin-RevId: 913694536
Change-Id: I49a2a3a4f918f9b80650ce884d3d442581e60d6b
2026-05-11 07:42:56 -07:00
Yuval Tassa ff4a5673f8 Delete testspeed_test.sh
This shell test was extremely slow (taking up to 26 minutes under ASAN). In any case the compilation pipeline takes one kick-the-tires step, so the RecompileCompare test effectively does the same thing.

PiperOrigin-RevId: 913646840
Change-Id: If659705b88d0ac64722f88ddf2ae377932e5ef0f
2026-05-11 05:25:59 -07:00
Copybara-Service 044f294c7c Merge pull request #3243 from thowell:readthedocs
PiperOrigin-RevId: 913616905
Change-Id: I41452fc8823b96c8d15b8909b17fb13e69bf1f15
2026-05-11 03:54:33 -07:00
Michael Moss 28548ce51c Update MuJoCo version to 3.9.0 following the 3.8.1 release
PiperOrigin-RevId: 913596257
Change-Id: Ib8b27fd2224e38560a209054c1d508a9bba21bbf
2026-05-11 02:58:56 -07:00
Alessio Quaglino df59e7d0f1 Fix mj_makeConstraint error for flex trilinear vs trilinear contacts.
The coordinates for flex interpolation are now computed using the absolute values of the vertex weights. The sign of the first vertex weight is then applied to the resulting barycentric weights. This correctly handles cases where the flex is both the first and the second entity in the contact pair.

PiperOrigin-RevId: 913590928
Change-Id: I970b35fba3d209e13b5b33bb5f945e3c6a43d487
2026-05-11 02:45:27 -07:00
Michael Moss 688209574d Update changelog for the 3.8.1 release.
PiperOrigin-RevId: 913578392
Change-Id: I7367ff9044fd52039cec8dd492b37df2153a6d7f
2026-05-11 02:14:58 -07:00
Alessio Quaglino 5ee8bd7b9c Rotate undeformed normals before using them in the bending passive forces.
The normal jump residual in flex elasticity calculations now rotates the rest-frame normal jump into the current frame using the face's corotational quaternion before subtracting the jump from the current normal difference.

PiperOrigin-RevId: 913242127
Change-Id: Ia62b28ecccd59e79225737d8225ef4131b333c96
2026-05-10 03:00:11 -07:00
Michael Moss cb5a9caa5c Update dependencies ahead of the 3.8.1 release.
PiperOrigin-RevId: 913212199
Change-Id: I97e5a2367010c492e6277a8c333ae8eb8155f7f2
2026-05-10 00:51:43 -07:00
Haroon Qureshi 4e2064b26f Fix skin/flex rendering by setting size to 1 (not 0).
PiperOrigin-RevId: 912993245
Change-Id: Ib81f58bd8d474decea469cafa40d57f053eee516
2026-05-09 08:39:14 -07:00
Haroon Qureshi b9a1fad99b Fix segmentation/depth rendering.
PiperOrigin-RevId: 912674769
Change-Id: Iba525679630e7996bc27d916e61e5a265a147061
2026-05-08 13:40:37 -07:00
Taylor Howell fefbc2c407 mujoco introspect 2026-05-08 20:23:30 +01:00
Alessio Quaglino fa912dffa0 Add flex arrays to CompareModel check.
Due to a bug, all flex mjModel fields were previously ignored.

PiperOrigin-RevId: 912546202
Change-Id: Ica95ecfcbbe366fd81de6e8f7d83ed57a7d23033
2026-05-08 08:47:51 -07:00
Alessio Quaglino 8cef5bb978 Add configurable octree max depth for meshes.
The maximum depth of the octree used for SDF generation can now be specified in the mesh definition via `mjsMesh::octree_maxdepth`. The default value is 6.

PiperOrigin-RevId: 912494999
Change-Id: I6d828d1d3999b99d1210a6829a05b04fac591e1f
2026-05-08 06:35:45 -07:00
Yuval Tassa 531a571dda studio: replace separate Solver and Performance charts with a unified Profiler, bound to F3
Combines the "Solver" and "Performance" chart windows into a single "Profiler" window for better ergonomics and visual layout:
- Unified Dashboard: Groups the Solver block (Counts & Convergence) and the Performance block (Dimensions & CPU Time) in a single viewable window that scales cleanly without vertical scrollbars.
- Adaptive Stacking: Uses ImGui grouping so each block internally stacks its charts vertically, but tiles side-by-side horizontally when the window is stretched wide.
- Default Docking & Width: Integrates the Profiler into the default dockspace layout attached to the right of the main viewable area, with an optimized initial width scaling factor of 0.42.
- Shortcut and Menus: Adds a toggle shortcut bound to `F3`, updates the Help Shortcuts overlay, and replaces old separate entries in the Charts menu.

PiperOrigin-RevId: 912491435
Change-Id: I1f9215e5498866a01ce48b6aeb4a7461191fa01d
2026-05-08 06:25:31 -07:00
Haroon Qureshi 395a002801 Small usability fixes.
- allow reloading of files that failed to load
- clear errors on successful reload

PiperOrigin-RevId: 912458744
Change-Id: Ie6af87508f10e83461bc998c99c9c66e2d58312e
2026-05-08 04:50:13 -07:00
Yuval Tassa 2ad01960c6 Studio UI tweaks
- RHS: Make Inspector be focused by default.
- RHS: Remove Noise pane, put the functionality in the Controls pane.
- Improve Frame and Label dropdowns.

PiperOrigin-RevId: 912434712
Change-Id: I2ee5b647febfc4a90a0cf9387b1d416f5a0dd4a1
2026-05-08 03:33:16 -07:00
Michael Moss 3ef083eecc Allow the Studio build script to be run outside the git checkout.
PiperOrigin-RevId: 912421771
Change-Id: Ie355d2f59cd43166ab06aa49349d87a0f5f9151c
2026-05-08 02:51:53 -07:00
Sam Haves b7b96d2acc Remove explicit mjz linking from studio.
PiperOrigin-RevId: 912157162
Change-Id: Ie5a229836cfe2c4af1b2f3cc9de9f03623b5d815
2026-05-07 14:35:18 -07:00
Sam Haves f4ab9aa93d Make miniz a PRIVATE dependency of mujoco in CMake.
PiperOrigin-RevId: 912068267
Change-Id: I5d4f3bbd294c6d4fcc519ae4f36f13005d51f9b7
2026-05-07 11:33:18 -07:00
Sam Haves 3e960ba3d3 Fix mjcPhysics doc link in changelog.
PiperOrigin-RevId: 912053636
Change-Id: Ie711995e171ae9dc97766a82902ba6917b08cd79
2026-05-07 11:07:04 -07:00
Sam Haves eddfbcfc50 Move mjz_decoder out of experimental to xml/mjz.
Since the mjz format is just an archive for MJCF assets this seems like a sensible place. The upcoming mjz encoder will also need to make use of the full precision XML utility that is local to src/xml.

PiperOrigin-RevId: 912044746
Change-Id: I6a9fef24b1c3fec5b5edc3a8d4c8e22584273264
2026-05-07 10:52:03 -07:00
Haroon Qureshi 5f36cb9e64 Add/cleanup documentation.
PiperOrigin-RevId: 912014433
Change-Id: I8f05d482e07ed58588f5847d470e5420e5c09f3a
2026-05-07 09:52:04 -07:00
Haroon Qureshi 730ecceda1 Add SDF support.
PiperOrigin-RevId: 912007379
Change-Id: I89ebf6bbabca08656932d028b27f1fbe48178986
2026-05-07 09:37:18 -07:00
Haroon Qureshi abea65b0be Simplify materials.
Merge shading model, material params, and material textures into a
single "mjrMaterial" type.

Remove redundant decor_line material.

PiperOrigin-RevId: 911960222
Change-Id: Icce3772a8ea48467dfd610799c0c2f2ba752323e
2026-05-07 07:51:15 -07:00
Haroon Qureshi d5c5a989f2 Use viewport instead of width/height.
PiperOrigin-RevId: 911942457
Change-Id: I2d6d52a8bb6b1b10d69956cce9e5d7f62e7d1f1c
2026-05-07 07:06:35 -07:00
Sam Haves ec50260e26 Add mjs_getOriginSpec to retrieve the original spec of an element.
The new function mjs_getOriginSpec returns the mjSpec that was used to define a given mjsElement. Unlike mjs_getSpec, this value remains constant even after the element has been attached to a different model.

PiperOrigin-RevId: 911930951
Change-Id: Ia9cd79d9dfabc513d6121eadcffc5d41075224c9
2026-05-07 06:33:28 -07:00
Haroon Qureshi 8b06fe4c16 Remove invalid dlfcn.h include.
PiperOrigin-RevId: 911924226
Change-Id: Id5c05745ee8dbdd4e5518e8c6ff5feb0b9972bb5
2026-05-07 06:13:08 -07:00
Haroon Qureshi 364c716f08 Rename TextureTarget to SamplerType.
PiperOrigin-RevId: 911918372
Change-Id: If711d5909499b68316acd10a2de3a2d83436e18d
2026-05-07 05:56:07 -07:00
Haroon Qureshi 75f1b81df7 Missing file in CMakeLists.txt
PiperOrigin-RevId: 911913781
Change-Id: I080298ff26fa2d7a3646f80ed15396bbe868c76b
2026-05-07 05:42:52 -07:00
Sam Haves 034167f4cd Fix MjVfs changelog item accidentally placed in last release
PiperOrigin-RevId: 911908806
Change-Id: I44514152c2084ca39d8ef218d9f00de66448c3ac
2026-05-07 05:28:29 -07:00
Haroon Qureshi f2da6cabdf Add API function for querying frame stats.
Replaces the current GetFrameRate function.

PiperOrigin-RevId: 911897360
Change-Id: I4199ba9ce40d1d8bc37b551fa7058d964186641d
2026-05-07 04:57:30 -07:00
Haroon Qureshi e1b27afcda Merge math_util and model_util and rename to filament_util.
Move filament_util to the main folder so as to indicate that
these utilities can be used by anyone and aren't internal to
the filament renderer implementation.

PiperOrigin-RevId: 911884375
Change-Id: Ieb58184263bdac7e44a07f1e44a4649c68c6bf77
2026-05-07 04:20:28 -07:00
Haroon Qureshi 7ade42ca88 Internal changes.
PiperOrigin-RevId: 911871922
Change-Id: I82452ffb4c96dca0206d2284193e0756e3dc830e
2026-05-07 03:49:14 -07:00
Haroon Qureshi 607970a900 Remove dependency between SceneBridge and ObjectManager.
PiperOrigin-RevId: 911824153
Change-Id: Ie87d6d9e77b0b3f68a41a0c7d13a36fb2029e4c2
2026-05-07 01:55:52 -07:00
Haroon Qureshi 8e214e5133 Move imgui_editor into filament library.
PiperOrigin-RevId: 911808107
Change-Id: I14318b1c7396e2eaf0df9d6afcc5298de01bcfa4
2026-05-07 01:19:30 -07:00
Haroon Qureshi 39c891e358 Add function for creating Renderable meshes from mjtGeom types.
The Renderable class now internally knows which built-in meshes
to use for a given geom type. It gets these meshes from the
ObjectManager which now stores the collection of built-ins based
on the nstack/nslice/nquad quality arguments.

PiperOrigin-RevId: 911782530
Change-Id: I6698ec3964a5c657f6a9495809cc795eec2e346f
2026-05-07 00:13:01 -07:00
Alessio Quaglino 0c05215e18 Reduce flex stiffness and bending memory size to the exact amount needed.
PiperOrigin-RevId: 911774147
Change-Id: I3b18eba23e75ec91ece8342945f25e0cd7c63a1a
2026-05-06 23:53:19 -07:00
Haroon Qureshi b6aac76cc4 Pass filament::Engine instead of FilamentContext
for textures, meshes, and render targets.

PiperOrigin-RevId: 911770834
Change-Id: I081458e118f0e91091d6d4df7b760e9dbb321672
2026-05-06 23:44:39 -07:00
Yuval Tassa 0f53f55853 Add checks for degenerate meshes in convex hull computation.
Fixes #3260

PiperOrigin-RevId: 911610731
Change-Id: I9efd15eee1bb5cb13639fd733a49535a147c3401
2026-05-06 16:25:13 -07:00
Sam Haves a501731089 Update multiccd default in mjcPhysics.
PiperOrigin-RevId: 911410939
Change-Id: Ia20b5be87f85c4662b71994dd824d90c6b98b3ed
2026-05-06 10:21:48 -07:00
Haroon Qureshi 2aa2131057 Refactor how render requests are generated.
Get the camera and drawmode from the bridges rather than recalculating
it unecessarily.

PiperOrigin-RevId: 911406470
Change-Id: Ia295846bb80105a2b0ad5da21912ca82b25e04bd
2026-05-06 10:13:37 -07:00
Haroon Qureshi 2b67fe3c3a Remove direct dependency between SceneBridge and ImguiBridge.
PiperOrigin-RevId: 911366540
Change-Id: I05c348ea6b1d08c034f2bb26e4c770079073c61d
2026-05-06 08:57:23 -07:00
Taylor Howell 9ffd50ce6a Import google-deepmind/mujoco_warp from GitHub.
PiperOrigin-RevId: 911361969
Change-Id: I2dd1223a4279b3df2f11adc4f44778b8d153e599
2026-05-06 08:47:54 -07:00
Yuval Tassa 6376e67070 Extract AVX code from engine_util_blas.c into engine_util_blas_avx.h
PiperOrigin-RevId: 911274884
Change-Id: Iaac2789f9538f669c49b497d1e60947a783368d3
2026-05-06 05:25:53 -07:00
Sam Haves 579a27e9d2 Make mjSpec related getter/find utilities take const parameters.
PiperOrigin-RevId: 910848529
Change-Id: I1c966a6299fe47317cbf0bfb8f8b835cbcd4ed65
2026-05-05 12:35:56 -07:00
Alessio Quaglino d249c882d5 Fix gcc errors due to restrict.
PiperOrigin-RevId: 910814591
Change-Id: I6858b1a36e21c6d47df803f49ceaed62c8e56248
2026-05-05 11:38:55 -07:00
Yuval Tassa 5c156ebf15 Refactor sparse constraint Jacobian supernode computation.
- Compute efc_J_rowsuper incrementally in mj_addConstraint instead of post-hoc via mju_superSparse.
- Better exploitation of supernodes in A matrix pipeline: precount and fill skip redundant chain traversals for supernode rows.
- Redundant B_rowsuper computation via mju_superSparse is eliminated (indentical to efc_J_rowsuper).

PiperOrigin-RevId: 910787825
Change-Id: I6eda9996659602b7051ee1090aeedb862603c84e
2026-05-05 10:57:31 -07:00
Alessio Quaglino d933b195ee Implement bending forces for interpolated flex shells.
This change adds a new passive force computation for flexes with elastic2d="bend" and dof="trilinear". The bending energy is based on the squared difference of normals between adjacent face elements at their shared edge midpoint. The edge data is precomputed during model compilation and stored in flex_bending.

PiperOrigin-RevId: 910772638
Change-Id: I3b12c7b7f1ba6ac1875df495d89e8cfec921ca80
2026-05-05 10:33:18 -07:00
Haroon Qureshi a692283db3 Add functions to create context and render.
Rename mjrf_render to mjrf_renderScene to avoid naming collision.
This function is will be removed in a future CL.

PiperOrigin-RevId: 910764245
Change-Id: If4d05e806a9699570ca4bbc882f28bfdd05dbd8d
2026-05-05 10:20:04 -07:00