Commit Graph

3748 Commits

Author SHA1 Message Date
Google DeepMind c07e3cb8a8 Internal changes only.
PiperOrigin-RevId: 836814927
Change-Id: I18bde7ae47b5c106ab9c85e434a8b491c8d79d04
2025-11-25 14:36:57 -08:00
Matija Kecman 181dcab6be Combine markers and content and reorganize parts of the WASM template file
PiperOrigin-RevId: 836729951
Change-Id: Ib3bb25a23325cfbd84fd0439243db37ca8236bf3
2025-11-25 10:40:44 -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
Google DeepMind 6e59f61c70 Make WASM codegen output to be alphabetically ordered.
PiperOrigin-RevId: 836680575
Change-Id: I7ddb7267c0db4911b2e84528f948dee6fccdf81d
2025-11-25 08:29:30 -08:00
Taylor Howell 6208730744 MuJoCo Warp documentation: Option.contact_sensor_maxmatch information.
PiperOrigin-RevId: 836670031
Change-Id: I29b11784998d3461ad1d460a6c23cad66df22202
2025-11-25 07:58:08 -08:00
Taylor Howell 5d7b2bd7ca MuJoCo Warp documentation: update information about setting both nconmax and naconmax.
PiperOrigin-RevId: 836666389
Change-Id: I766c717d4c6b98f4383fa396fd9cceaac4b5b561
2025-11-25 07:45:06 -08:00
Taylor Howell 893882171e MuJoCo Warp documentation: Does MJWarp work with multiple GPUs?.
PiperOrigin-RevId: 836642204
Change-Id: I559642b2cb902a704257e7e0344f768b690678a1
2025-11-25 06:26:55 -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
Taylor Howell bdaec5758b Generate MuJoCo Warp documentation with modified types.py.
PiperOrigin-RevId: 836617034
Change-Id: Ia925b88679744267b34504b146fa712d4195eda4
2025-11-25 04:54:01 -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
Google DeepMind 711a388b3d Sort and generate optional struct bindings in WASM.
PiperOrigin-RevId: 836273537
Change-Id: I2af2401969a4780f593df86dc9336adcc285fd1b
2025-11-24 10:18:09 -08:00
Google DeepMind 217317ccba Change WASM generators from classes to functions.
PiperOrigin-RevId: 836257289
Change-Id: I7a3c1d7bb545353a3d278330582e33c0551792cb
2025-11-24 09:36:36 -08:00
Taylor Howell 1c910875d2 MuJoCo Warp documentation: Differentiability.
PiperOrigin-RevId: 836250165
Change-Id: I40c21674c896ed4108f17192f16aaaf2664f03be
2025-11-24 09:13:28 -08:00
Taylor Howell 2ca56179a7 Add Frequently Asked Questions: Learning frameworks to MuJoCo Warp documentation.
PiperOrigin-RevId: 836231961
Change-Id: If3d00e7dfb9ebe49a034ea8936d2ac1dd33d0979
2025-11-24 08:14:53 -08:00
Taylor Howell cb391962ca MuJoCo Warp documentation: Orientation representation.
PiperOrigin-RevId: 836127570
Change-Id: I0f381e57cfb53e1cb623f9c4178d258dfc1f75b6
2025-11-24 02:03:41 -08:00
Kyle Bayes a105042734 Tidy up primitive support functions.
PiperOrigin-RevId: 835329730
Change-Id: I5ad5e85b5e8284bf5e3769ab504686b7859a6ea4
2025-11-21 13:00:49 -08:00
Taylor Howell a359780ca1 Import google-deepmind/mujoco_warp from GitHub.
PiperOrigin-RevId: 835230315
Change-Id: Ifa4f8f66c4e3de1a3074f0897daf93f88e469f06
2025-11-21 08:17:49 -08:00
Kyle Bayes bb488fec29 Remove MPR from comment.
PiperOrigin-RevId: 835224192
Change-Id: I659231b30d4c00d9bf586f0efdac138331862df7
2025-11-21 07:58:26 -08:00
Yuval Tassa f8b92410d4 Add test explaining body_rootid and body_weldid semantics
PiperOrigin-RevId: 835197910
Change-Id: If85ca80d3b576e2469cf0d9900441ddb9fd64462
2025-11-21 06:25:22 -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 c2e9bfa3e8 Clarify semantic of body_rootid and body_weldid
PiperOrigin-RevId: 834827589
Change-Id: I562e0aa374ce59d8b769e8d003e4c63ee434a1fc
2025-11-20 10:54:59 -08:00
Yuval Tassa 7cb2e31f4b Annotate GlobalModel for LSAN
PiperOrigin-RevId: 834784936
Change-Id: I9381a062956df6cd7724402b72c2d2a2d8c49998
2025-11-20 09:03:48 -08:00
Matija Kecman ee8dbd4347 Simplify enum WASM bindings generator
PiperOrigin-RevId: 834725472
Change-Id: I278447145cd8dcdd145f0d50bc3bae649ea2b440
2025-11-20 05:52:02 -08:00
Matija Kecman a0d49ade1b More simplification to functions.py in WASM bindings
PiperOrigin-RevId: 834643175
Change-Id: Iff873f6f0916e0039ff6a44468afd9b4d8f98f37
2025-11-20 01:06:29 -08:00
Matija Kecman 102f382c9d Rename uppercase_first_letter to capitalize
Also rename `lowercase_first_letter` to `decapitalize`

PiperOrigin-RevId: 834622292
Change-Id: I1cfbda1be782ff40dd3fc0726601cc6b1f427345
2025-11-19 23:54:02 -08:00
Matija Kecman 48ecddbe3b Simplify functions.py in WASM bindings generation
PiperOrigin-RevId: 834470193
Change-Id: I3c26d65ea8812fd6a4c78264fbce8353bac6fb2f
2025-11-19 15:35:45 -08:00
Alessio Quaglino a0cb97eb4d Improve attach docs.
PiperOrigin-RevId: 834366494
Change-Id: I9086097990f09e848d0b76d9c22f4fd2bbd70718
2025-11-19 11:08:36 -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
Google DeepMind 49394d57d9 Rename WASM binding wrapper functions and reorder generated code.
PiperOrigin-RevId: 834265965
Change-Id: I58e7d572dcae4f1ca262ae5d876fcd8353af183c
2025-11-19 06:26:03 -08:00
Google DeepMind 10fe5ff07f Generate MjVisual, MjModel, MjData and MjSpec structs declaration
PiperOrigin-RevId: 834264723
Change-Id: Id33d7568a1f9f0cfb1271cf9dd2d8713c00eee34
2025-11-19 06:22:28 -08:00
Taylor Howell 07d8bd5b80 MuJoCo Warp documentation: Add note about nconmax and njmax not being parsed from XML.
PiperOrigin-RevId: 834247810
Change-Id: Iadee0f1713c9322cab781aabfe86954c145932ba
2025-11-19 05:23:12 -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 62872fecd1 Reduce size of mjsTexture.gridlayout (was 13, should be 12)
PiperOrigin-RevId: 833764817
Change-Id: I2655a729d38a8871be2024492ce2a971fc8a0372
2025-11-18 04:49:05 -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
Taylor Howell 695e4c4038 MuJoCo Warp documentation: Command line scripts.
PiperOrigin-RevId: 833405216
Change-Id: I8c1850ea59e2640f14c5be7e09c90aea29622831
2025-11-17 10:46:43 -08:00
Taylor Howell bc169d82c1 Fix MJX plane_cylinder docstring.
PiperOrigin-RevId: 833394724
Change-Id: I80df8bf35bceb97a18a0c4c2f37fab71e31011c2
2025-11-17 10:21:09 -08:00