Commit Graph

1676 Commits

Author SHA1 Message Date
Haroon Qureshi ed69fe85f1 Only build fonts when using filament backend.
PiperOrigin-RevId: 837054382
Change-Id: I7ef3b6b954738776f266533f4c48ac4e3c43b4bf
2025-11-26 04:00:34 -08:00
Kyle Bayes ae24034f24 Refactor hfield-convex collision code. This should be a no-op.
PiperOrigin-RevId: 837045492
Change-Id: I82851615c7f69774da83cab361316e5a6e9982c6
2025-11-26 03:26:56 -08:00
Haroon Qureshi fcad41a5b1 Implement solver stats charts.
PiperOrigin-RevId: 837045292
Change-Id: I1dfe1e10bb6d62f4d994a82c9b645b471fca5500
2025-11-26 03:25:45 -08:00
Matija Kecman 011166a13a Update the studio/README.md to summarize platform support.
PiperOrigin-RevId: 837038187
Change-Id: I00882e0a9882947af7c684e2d5521356ad1468ce
2025-11-26 02:58:05 -08:00
Haroon Qureshi 4ce0ee2011 Update texture handling due to recent ImGui upgrade.
PiperOrigin-RevId: 837030453
Change-Id: I042c4a7df7dc6c7e07c40eb5f32e5031e5b1d60a
2025-11-26 02:36:02 -08:00
Haroon Qureshi a1579ac3e1 Use static_cast instead of reinterpret_cast.
PiperOrigin-RevId: 836990495
Change-Id: I276b5d83e18cc87364f8f2cae0c585b6673c738e
2025-11-26 00:25:32 -08:00
Google DeepMind c07e3cb8a8 Internal changes only.
PiperOrigin-RevId: 836814927
Change-Id: I18bde7ae47b5c106ab9c85e434a8b491c8d79d04
2025-11-25 14:36:57 -08:00
Gabe Oppenheimer b6e162d6fa Update MuJoCo version from 3.3.8 to 3.4.0
PiperOrigin-RevId: 836719207
Change-Id: I28cbc90cee42aebfb5a4201561289ef6747cdc83
2025-11-25 10:16:02 -08:00
Haroon Qureshi d8712808b9 Allow users to access mjrContext.
PiperOrigin-RevId: 836641787
Change-Id: I2f2aee30a047336d1adbe33b7996fee3ec845213
2025-11-25 06:25:14 -08:00
Haroon Qureshi f28bcc4346 Allow binding to arbitrary textures.
PiperOrigin-RevId: 836625847
Change-Id: If02ea708f49bdfd9be5be7d9a273340ba2f082f0
2025-11-25 05:26:04 -08:00
Haroon Qureshi 589e013d9b Fonts should have const data.
PiperOrigin-RevId: 836624808
Change-Id: I984c94cc34ef22b875ddda87c59893aa7f38a8a3
2025-11-25 05:22:54 -08:00
Kyle Bayes b98379372e Refactor epaWitness.
PiperOrigin-RevId: 836597852
Change-Id: Ib75dae07bda47764f937f32a9476ef3266f02056
2025-11-25 03:44:57 -08:00
Haroon Qureshi 9b0f8dd963 Update CMakeLists.txt to add/remove files.
PiperOrigin-RevId: 836591285
Change-Id: I17745ad5055b861721c10daec33adc1f6f11ea32
2025-11-25 03:18:57 -08:00
Yuval Tassa 888d3a7b07 Add mj_copyState
PiperOrigin-RevId: 836588419
Change-Id: I7609e121dc0ac697d4d015d4244bdd5962650def
2025-11-25 03:10:30 -08:00
Haroon Qureshi eac8e60037 Merge Physics functionality into App.
The Physics class is no longer needed. This makes Studio similar to
other toolbox-based apps (like web demo and python viewer) which
manage their own mjModel and mjData instances.

PiperOrigin-RevId: 836588076
Change-Id: I3f695b49bf6a7bba1a2b639d3d75d0c996582f06
2025-11-25 03:09:21 -08:00
Haroon Qureshi 67b09f9afb Refactor simulation state history tracking into a SimHistory class.
PiperOrigin-RevId: 836578736
Change-Id: I94a852b2d2a36cdd081371f25385dbb466dd8d4b
2025-11-25 02:38:09 -08:00
Haroon Qureshi 6d9d59cb98 Move pause handling into StepControl.
Also moves perturbation handling up to the App.

Combined, this makes Physics::Update only about advancing the StepControl and resonding to its Status.

PiperOrigin-RevId: 836569506
Change-Id: I148c787f0e1c18baac3e3038ee6ad0e337eb92a8
2025-11-25 02:08:08 -08:00
Kyle Bayes a105042734 Tidy up primitive support functions.
PiperOrigin-RevId: 835329730
Change-Id: I5ad5e85b5e8284bf5e3769ab504686b7859a6ea4
2025-11-21 13:00:49 -08:00
Kyle Bayes bb488fec29 Remove MPR from comment.
PiperOrigin-RevId: 835224192
Change-Id: I659231b30d4c00d9bf586f0efdac138331862df7
2025-11-21 07:58:26 -08:00
Matija Kecman 7e6cb642a3 Improve formatting of percent real time selection
PiperOrigin-RevId: 835192366
Change-Id: I17057f61b96d6380dea6156dcef867b1845e6abf
2025-11-21 06:05:53 -08:00
Haroon Qureshi a2002eb3d7 Various UX improvements including:
- Add Toolbar and StatusBar.
- Reconfigure sections into Settings and Inspector groupings.
- Use docking for Settings/Inspector panels.
- Rename "Free" camera to "Tumble"; add WASD-based free camera.
- More dynamic layout of table-based elements.
- Remove "non-classic" UX mode.
- Switch to light mode by default.

PiperOrigin-RevId: 835174573
Change-Id: I1855caa79f00002e44ed2516631675727bdcb9f6
2025-11-21 04:58:20 -08:00
Yuval Tassa ae8272787f Rollback of 7cb2e31f4b
PiperOrigin-RevId: 834865905
Change-Id: Iade490754ca30a97f696bcb09525f9b4c37dbeff
2025-11-20 12:30:48 -08:00
Yuval Tassa 7cb2e31f4b Annotate GlobalModel for LSAN
PiperOrigin-RevId: 834784936
Change-Id: I9381a062956df6cd7724402b72c2d2a2d8c49998
2025-11-20 09:03:48 -08:00
Yuval Tassa d1317fd1a5 Add ray normal computation for primitives (currently private)
PiperOrigin-RevId: 834294539
Change-Id: I176f13a8f91dede589338fc44e099a16bac0b580
2025-11-19 08:01:02 -08:00
Yuval Tassa 86a77ff8eb Change mjtSize from uint64_t to int64_t.
This change makes `mjtSize` a signed, rather than unsigned 64-bit integer. While sizes are non-negative, the type promotion rules for unsigned integers can lead to unituitive downstream bugs, and 8 billion terabytes are enough bytes.

PiperOrigin-RevId: 834292964
Change-Id: Iea9c47c2a5d80fde63851a543d59ed0549db0f01
2025-11-19 07:55:54 -08:00
Alessio Quaglino 3aa973894c Fast flex: Interpolate contact points directly.
For each contact point, we used to first compute the vertex weights on a triangle and then add a contact point per vertex using the flex interpolation (trilinear or quadratic), obtaining the total weight by multiplying the vertex weight and the basis function value at that vertex. After this change, each contact point is added directly by evaluating the basis function directly a the point.

PiperOrigin-RevId: 834218909
Change-Id: Ic0fdb03fc0ef5478798c293df99204fd33116fd1
2025-11-19 03:40:17 -08:00
Haroon Qureshi a2fd5fdd4a Move profiler logic into a separate class.
PiperOrigin-RevId: 834200782
Change-Id: Ida050a5c055237c4e0a0c725a1277c9239a89538
2025-11-19 02:35:35 -08:00
Yuval Tassa e18e35f967 Fix normal only for libccd during hfield collisions.
PiperOrigin-RevId: 833933161
Change-Id: I3a4ff044276d9c7305154da09b440168f0f22305
2025-11-18 12:55:56 -08:00
Haroon Qureshi 7569ac960d Create material instances for each draw call rather than for each clip rect.
This fixes a bug where the wrong instance was being used in some cases.

PiperOrigin-RevId: 833818151
Change-Id: If8b0cb90017ee0b89cde98a5ae64c36704c7338c
2025-11-18 08:16:55 -08:00
Alessio Quaglino 971e73ab04 Remove unused argument from mj_vertBodyWeight.
PiperOrigin-RevId: 833744032
Change-Id: I26049003b1f45f8cac60c7ebc0b5abca5526177f
2025-11-18 03:28:25 -08:00
Haroon Qureshi 8077a6819c Add support for OpenSans and font-awesome fonts.
PiperOrigin-RevId: 833666932
Change-Id: I5f0207c3331705b9078a1297b3e7b2a8d363ad60
2025-11-17 23:14:47 -08:00
Haroon Qureshi e882399eb0 Use mjTHREADLOCAL macro instead of intrinsic.
Fixes #2927.

PiperOrigin-RevId: 833336768
Change-Id: I62bfdc7018853fc8459e03ba079fc6a15e97c7d0
2025-11-17 07:50:02 -08:00
Matija Kecman 85b6194f91 Add a README with instructions for how to build and run MuJoCo Studio externally
PiperOrigin-RevId: 833336577
Change-Id: Ib5f5ef33abe820796559a9da352360f57ea64bc8
2025-11-17 07:49:00 -08:00
Matija Kecman 8eca9926dc Fix various MuJoCo Studio build issues on Windows, MacOS and Linux
PiperOrigin-RevId: 833313973
Change-Id: I7ec181374e0bb49c32420d025044c31f6fc3c657
2025-11-17 06:35:43 -08:00
Yuval Tassa a66cf303f8 Clean up ray functions
PiperOrigin-RevId: 833299985
Change-Id: I30aabe889ccc5900ff0e50a578e98e176d3effa4
2025-11-17 05:47:44 -08:00
Haroon Qureshi 999344c998 Use the path of the loaded model as the base path for all further load/save operations.
PiperOrigin-RevId: 832358035
Change-Id: I44fdf8cd31d755087ebd5ec9f84f5faabe5d0702
2025-11-14 10:00:43 -08:00
Haroon Qureshi 3f69deb328 Correctly initialize mjrContext before creation.
PiperOrigin-RevId: 832233427
Change-Id: I5e7301637e73a739f141d4a3207b27ae1676f6b6
2025-11-14 02:41:56 -08:00
Haroon Qureshi 83363f41ee Fix arrow positioning.
PiperOrigin-RevId: 832233204
Change-Id: I10b780c261bf5c0b4891309559fa7aab4d47d32c
2025-11-14 02:40:31 -08:00
Haroon Qureshi 6c15c711ee Make mjv_cameraFrame and mjv_cameraFrustum public.
PiperOrigin-RevId: 832187804
Change-Id: I74d05d7fe03bc81bd05a823c7c9791bca12e3079
2025-11-14 00:03:18 -08:00
Kyle Bayes 8b9fa2674c Use std::vector instead of array in MJCF schema.
PiperOrigin-RevId: 831787681
Change-Id: I8093b8b10260daecb830e49319eda798e2dd2da5
2025-11-13 03:41:54 -08:00
Matija Kecman 26c1622ac8 Internal change
PiperOrigin-RevId: 831782555
Change-Id: I1dda7700e1c1def21c0b0879a5452ddf96d45aa8
2025-11-13 03:22:47 -08:00
Yuval Tassa 042c5223a6 Change mj_sizeModel return type to mjtSize.
PiperOrigin-RevId: 831768095
Change-Id: I079fbadc403b32a3ce8a73fe21b2cd66391401c3
2025-11-13 02:32:18 -08:00
Kyle Bayes a168b3ef7f Refactor hill climbing support function.
PiperOrigin-RevId: 831754211
Change-Id: I77c89c52fde86183b8e2e61a1fc71764119f208e
2025-11-13 01:47:27 -08:00
Yuval Tassa b8512b9d1f Fix bug related to sleeping static children of mocap bodies.
PiperOrigin-RevId: 831376685
Change-Id: I8891a1d7dc6efc037e9ade5c7e8dd5c35c7e455e
2025-11-12 07:20:03 -08:00
Haroon Qureshi 7b52d3034e Fix crash if Renderer is destroyed without having been Init'ed.
PiperOrigin-RevId: 831375559
Change-Id: Ia1d0334e32dbbd0582d4f75723867d6ea47bf9da
2025-11-12 07:15:39 -08:00
Haroon Qureshi 28c536bd93 Remove support for custom fonts for OSS project for now.
PiperOrigin-RevId: 831294808
Change-Id: I3f366ceafc1181e0624d1b26ef09fd64ed6275b4
2025-11-12 02:30:23 -08:00
Yuval Tassa 414d6d80ac Update model memory footprint reporting in mj_printModel.
PiperOrigin-RevId: 831015711
Change-Id: I7cb5aba019ed99e239b6fadbaf162cbd6fd9d9fb
2025-11-11 12:08:22 -08:00
Yuval Tassa bc83bfb076 Restructure AAMM storage for improved cache locality in broadphase, ~35% speedup (of broadphase).
PiperOrigin-RevId: 831007564
Change-Id: I1a72ca02f5a50194bb7770d5765c6140adde1852
2025-11-11 11:46:08 -08:00
Haroon Qureshi aa7cf15cc4 Set textures before assigning a material.
PiperOrigin-RevId: 830899288
Change-Id: I42029157e7be006d4dc18d0c84e27bf908af6f47
2025-11-11 07:10:18 -08:00
Yuval Tassa 22c0b68903 Improve logic and documentation for sleeping sensors
PiperOrigin-RevId: 830891115
Change-Id: Ife8309b165c085b54c9f668d825d69ed12a9a8f0
2025-11-11 06:45:56 -08:00