Commit Graph

136 Commits

Author SHA1 Message Date
Saran Tunyasuvunakool 2345663efb Change title to "MuJoCo Live" and respect system colour scheme.
PiperOrigin-RevId: 916183118
Change-Id: I760be720cb001038e993383a5e523a2de8496a7c
2026-05-15 14:26:48 -07:00
Saran Tunyasuvunakool a03191b9e8 Add a github: resource provider scheme to MuJoCo Live.
This resolves to https://raw.githubusercontent.com/... under the hood.

PiperOrigin-RevId: 916050807
Change-Id: I1630e29a5b5aad0e39cdd8aa4cfc1ff1a71f19d9
2026-05-15 09:48:22 -07:00
Saran Tunyasuvunakool e47809d50d Refactor MuJoCo Live to separate out HTML, CSS, and JS components.
PiperOrigin-RevId: 915340338
Change-Id: Ic62b9d640af9967a59a77fa59a3556b916d5a24c
2026-05-14 03:39:42 -07:00
Saran Tunyasuvunakool f7e00d041e Add commit hash and remove "Upload File" button from MuJoCo Live.
PiperOrigin-RevId: 914909503
Change-Id: I084d888eb5093b4278e758697bff43ff941c79d0
2026-05-13 09:34:47 -07:00
Haroon Qureshi 69a1087e9e Disable window resizing on load as it breaks on some platforms.
PiperOrigin-RevId: 914774489
Change-Id: I9aea71b386de93f4d2fc3da5310dd7a3018c8c1c
2026-05-13 03:59:46 -07:00
Haroon Qureshi 5d818306ef Save/restore window size in UX settings.
PiperOrigin-RevId: 913695007
Change-Id: I3366b11a5de53292d4ffe0e4c46f866381624788
2026-05-11 07:44:09 -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
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 7ade42ca88 Internal changes.
PiperOrigin-RevId: 911871922
Change-Id: I82452ffb4c96dca0206d2284193e0756e3dc830e
2026-05-07 03:49:14 -07:00
Yuval Tassa 22ca5fe0df studio: improve behavior of help window
PiperOrigin-RevId: 908132295
Change-Id: Iac0aead82a575dffbe35e3be8ba06af13986d1a2
2026-04-30 06:21:10 -07:00
Yuval Tassa 9796345888 Add font scaling to studio, bound to CTRL+MINUS/PLUS
PiperOrigin-RevId: 907491215
Change-Id: I144467c3ff0e3d11f4a5bfb6ed2b1e4e88b8693d
2026-04-29 03:42:07 -07:00
Yuval Tassa 6f275b79c6 Studio: toolbar cosmetic improvements
- Remove hard-coded button sizes (48×32) from toolbar icons; buttons now use default ImGui sizing, matching the existing copy-camera button.
- Remove the Unload button (available via menu).
- Add ImGui_ColorButtonEx widget with per-corner rounding via ImDrawFlags, enabling segmented button-group visuals.
- Use segmented rounding for the pause/viscous/play triplet: rounded-left, square, rounded-right.
- Make pause and play buttons 40% wider than the viscous button for emphasis.
- Replace the theme combo dropdown with a cycling button.
- Reduce toolbar height from 48px to 34px and vertically center content via WindowPadding.
- Zero out table CellPadding in the toolbar for precise vertical centering.
- Remove the speed combo's inflated vertical padding.

PiperOrigin-RevId: 906853958
Change-Id: I6e4ec7243adb9e0f1f06f8779fa896a6865c46c7
2026-04-28 03:12:55 -07:00
Matija Kecman 9cd89eec2f Make Studio's monitoring charts responsive and full-window
* **Dynamic Full-Window Scaling**: Charts in the Performance and Solver panels now expand to fill the entire pane, automatically arranging side-by-side or stacked based on window orientation to eliminate scrollbars.

  * **Responsive Decorators**: Added reusable C++ ImPlot helper functions that auto-hide titles, legends, and tick labels when the plot surface is small.

  * **Cleaner Visualization**: Refined chart titles (e.g., "CPU msec vs frame", "Convergence vs iter") and removed redundant axis labels for improved scannability.

These changes were based on the plot behavior of //third_party/mujoco/src/experimental/py/sample/implot.py This is an incremental improvement, we can make the plots even nicer in future.

PiperOrigin-RevId: 906351914
Change-Id: I8cb19c19bf807f0107c717066250a71bcf7e325f
2026-04-27 07:42:56 -07:00
Yuval Tassa 2e3205229c Studio: various panel usability improvements
- Reorder Physics section, move Actuator Groups to end.
- Rename "Physics Settings" → "Physics", "Rendering Settings" → "Rendering".
- Reduce IndentSpacing from 20 to 6.
- Reduce FramePadding Y from 6 to 2 for narrower buttons and popups.
- Remove explicit Unindent/Indent overrides in Rendering and Visibility Groups
  sections so buttons are naturally indented under their tree nodes.
- Dynamically adjust convergence and counts plot X-axis limits based on actual
  solver iterations instead of hardcoded 20.

PiperOrigin-RevId: 906244477
Change-Id: Ic3e6e6e793395158c8cb6692af885884ca3f7f50
2026-04-27 03:11:51 -07:00
Saran Tunyasuvunakool 1465d8b6ce Initial implementation of MuJoCo Live.
This is a combination of minor tweaks to the existing Studio WASM application, CMake cleanup to make it buildable, and integration with GitHub Actions for deployment.

The new features added are drag-and-drop, model specification through `?model=` URL parameter, HTTP and HTTPS resource provider, and a user-visible loading message while the model is loading.

PiperOrigin-RevId: 904594610
Change-Id: I3a73b1ca0fcd6fc9ba192469942b2dab010a9308
2026-04-23 12:56:12 -07:00
Matija Kecman 2b211e1ce6 Detect wayland sessions and report a clear error prompting users to switch to X11 or choose a different graphics mode
PiperOrigin-RevId: 904460146
Change-Id: I9324f403cb09787833c06f863ac157059eea60e7
2026-04-23 08:02:29 -07:00
Matija Kecman f91ce9a627 Remove window dependency from PipGui
PiperOrigin-RevId: 901115560
Change-Id: I85183a91fd07682f17f43fcfad593dececdde28c
2026-04-17 00:11:59 -07:00
Matija Kecman 9289905c9a Make StepControlGui a reusable component and refactor/simplify the implementation
PiperOrigin-RevId: 900045404
Change-Id: I9976ece042710ddce0a7c5d99a6ac85a0ef06d2f
2026-04-15 02:48:11 -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 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
Matija Kecman f1715e67bd Fix studio web so that single file xml model can be loaded in a single-threaded wasm build
model_holder.cc modified to disable multi-threaded compilation for WASM builds. index.html `animate()` function modified so the animation rendering loop executes asynchronously with async/await calls. These changes are sufficient to make xml files without references work (e.g., humanoid.xml), more work is needed to make the vfs work so multi-file models can load.

PiperOrigin-RevId: 885537402
Change-Id: I3469cae48e7268073be334b99bf907c5ed8c27a7
2026-03-18 05:31:29 -07:00
Haroon Qureshi bc1f9513be Add flag for software rendering.
This flag is currently unused.

PiperOrigin-RevId: 885453938
Change-Id: Ia2112410ff12c7b18ad154f18887d4d795bafa3d
2026-03-18 01:48:15 -07:00
Haroon Qureshi db9ab94555 Refactor parts of the toolbar GUI into the GUI library.
PiperOrigin-RevId: 882024591
Change-Id: I3ac73247973666f4d60e9d8d028d20d3ef709bcc
2026-03-11 08:23:12 -07:00
Haroon Qureshi d6aac2041e Make filament-opengl the default graphics mode for studio.
PiperOrigin-RevId: 881362074
Change-Id: Iaa42ddf915b8b146775b2cf0263152b94c586c49
2026-03-10 04:59:03 -07:00
Haroon Qureshi 5506fbf506 Rename member history_ to sim_history_.
PiperOrigin-RevId: 878906079
Change-Id: I1327f0216bc5042e62c598f2b7f15f6a26c192dc
2026-03-05 01:23:39 -08:00
Haroon Qureshi 64597f45d3 Move function that parses the graphics mode from a string into graphics_mode.cc.
PiperOrigin-RevId: 878482669
Change-Id: I8b713bc740c5711b9c7cc9ea63c21bad42cd2943
2026-03-04 07:30:23 -08:00
Haroon Qureshi 13d164063c Remove separate targets for classic and filament renderer.
The platform::Renderer now supports both implementations at
runtime.

PiperOrigin-RevId: 878427862
Change-Id: I2997c197c6eddbe177c77b435cc5848fd80f1839
2026-03-04 04:56:15 -08:00
Haroon Qureshi 84682a46b0 Refactor spec editing logic into its own class.
The SpecEditor improves spec editing by keeping
track of what's being edited and how it changes
over time.

PiperOrigin-RevId: 878410011
Change-Id: I7c323eeb30178dad31946095a727a21b3955f19a
2026-03-04 04:01:56 -08:00
Haroon Qureshi 73f73d94f7 Merge renderer+offscreen mode into unified graphics mode.
Allow Studio app to switch between graphics modes dynamically.

PiperOrigin-RevId: 878396966
Change-Id: I666fe3d2452de5404b9be2bd1d017eabec789aef
2026-03-04 03:19:58 -08:00
Haroon Qureshi 55d7226b06 Improve error handling of spec editor compilation.
PiperOrigin-RevId: 875703124
Change-Id: Idf4a90a48d75185ad03e4469cee9098104751d67
2026-02-26 06:59:31 -08:00
Haroon Qureshi a9675fbaa6 Add an Editor panel.
The editor panel allows you to add, remove, and modify spec elements
as well as recompiling and loading the spec.

Also includes utilities for handling vertically split panels.

PiperOrigin-RevId: 875658785
Change-Id: I18b10971d587db5eb1e65a033e1dc042faac7f1d
2026-02-26 04:51:02 -08:00
Haroon Qureshi ae7efead09 Show MuJoCo version in the help menu.
PiperOrigin-RevId: 875061430
Change-Id: I4d4ce32eebd8ca4af4622e9b4d1cd50d180d0b96
2026-02-25 03:11:13 -08:00
Haroon Qureshi 1d6ff2cece Display Bodies as a tree in Spec Explorer.
Display all other elements under "Elements" or "Assets" group.

Show properties for mjSpec, mjModel, and mjData for selected
elements.

PiperOrigin-RevId: 874614195
Change-Id: I128c2bec844983ac5d35a3a0b1e58b8a5b0109cb
2026-02-24 07:57:44 -08:00
Haroon Qureshi 0083cf7fa8 Refactor the projectile launcher into a plugin.
Add a simple GUI for it that allows users to enable/disable
the key binding as well as control some parameters.

PiperOrigin-RevId: 872816645
Change-Id: I8abb2803e17b4f6195d447220c436d4701b24db8
2026-02-20 03:19:53 -08:00
Haroon Qureshi 28ad603f6b Use templates and macros to reduce boilerplate.
PiperOrigin-RevId: 872805912
Change-Id: I6fc1abe283bc809a95d660abc072906b0810aaeb
2026-02-20 02:42:52 -08:00
Haroon Qureshi f0bf403254 Add a delete button to the highlighted element.
PiperOrigin-RevId: 872795277
Change-Id: I63afa9c87b425ebed5d20126e9909ad95532d559
2026-02-20 02:09:36 -08:00
Haroon Qureshi 82694b520b Re-apply changes that were accidentally deleted.
PiperOrigin-RevId: 872782055
Change-Id: If2f403835cd2d90c88abe9ed82380dfca5b3d9c8
2026-02-20 01:27:57 -08:00
Matija Kecman ca0552c83b Cleanup Studio toolbar
PiperOrigin-RevId: 872618794
Change-Id: I2e8f99dc47937416c8516ed1df7821369211b12f
2026-02-19 16:34:38 -08:00
Haroon Qureshi 6b197e198a Reset free camera when loading a new model.
PiperOrigin-RevId: 871622663
Change-Id: I1f1a4681752f7436c7bc7adbe64dcea286c5620c
2026-02-17 20:08:02 -08:00
Haroon Qureshi 767e52fb5b Fire projectiles when hitting "Ctrl+Shift+Enter".
PiperOrigin-RevId: 871215312
Change-Id: Ie22699d5446a49ea6997594b2800cf72840554c1
2026-02-17 02:53:31 -08:00
Haroon Qureshi 4ce9fb53ee Re-enable MJZ support.
Disabled on Windows until we can make plugins work correctly.

PiperOrigin-RevId: 871214280
Change-Id: I831238704c2807e70f4347989d642a189764e53c
2026-02-17 02:51:14 -08:00
Haroon Qureshi 989b6e63c7 Add ability to delete bodies.
PiperOrigin-RevId: 871200603
Change-Id: I08bc786ca8106ef13cfcbe89e8cc42e9ad2c99d5
2026-02-17 02:14:54 -08:00
Matija Kecman 1808079c62 Implement viscous pause in Studio
Viscous pause is like pause but the simulation continues with zero gravity, high viscosity and passive springs disabled. It is useful to move things like cabinets with shelves---just move the shelf and the drawers come along as well.

* Updated the simulation control widgets
* Added Ctrl-space shortcut to toggle play/viscous pause

PiperOrigin-RevId: 869810053
Change-Id: Icf649e1f2631c2a64a5d2f25af9537b6a12bdf2c
2026-02-13 11:11:15 -08:00
Haroon Qureshi be93e8eeb2 Give Resource Providers a chance to load files.
File resolution only checks local file system. Resource providers may still
be able to load from a path even if it is not resolved.

PiperOrigin-RevId: 867534134
Change-Id: I802566136b965ad839393f56a4d4924dda2e1973
2026-02-09 04:23:44 -08:00
Haroon Qureshi 3e8a81383a Move mjSpec/mjModel/mjData management into a separate class.
PiperOrigin-RevId: 866327584
Change-Id: I72f6ec656e193f67dee22214fe01c517432f87e5
2026-02-06 00:51:15 -08:00