Commit Graph

3689 Commits

Author SHA1 Message Date
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
Matija Kecman 86ac3a5e28 Update the WASM bindings README
* Removed the caution callout since some internal CI has been implemented.
* Added to clarify the state of bindings build process on Windows.
* Fixed the formatting of a note callout in the Testing section.

PiperOrigin-RevId: 831899135
Change-Id: I9f105b91e924368c8e84da7114e1b1d3e48c185a
2025-11-13 09:47:31 -08:00
Matija Kecman b0e75b7103 Refactor Github actions so that all build steps are implemented as functions in a separate build_steps.sh file.
This reduces the amount to yaml we need to know/write and makes the steps reusable in a clearer way than yaml anchors. Also Made sure that bash commands are executed with -xe set to log the command before executing and to fail the script on the first failing command.

PiperOrigin-RevId: 831823786
Change-Id: I7410c13decb914ef079ac4dd19a49481c452f3ec
2025-11-13 05:56:53 -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
Silvia Cruciani 727347813f Import google-deepmind/mujoco_warp from GitHub.
PiperOrigin-RevId: 831416862
Change-Id: I9ffe9698a3cd4a173189a804998ce8afc16b91f2
2025-11-12 09:18:32 -08:00
Matija Kecman 4722925ff4 Add a github actions job which quickly determines if the WASM build is broken by only testing on one platform
PiperOrigin-RevId: 831395855
Change-Id: I1128ae39b50e0d9d4338b8ea768b2850699aef22
2025-11-12 08:17:22 -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
Tom Power 52478e15c3 Fix issue where contact pairs supported by C back-end are unsupported by MJX:C
PiperOrigin-RevId: 831288268
Change-Id: Ied69be2d69a4cf0c8190bfaf8b6428e1dd8c8a70
2025-11-12 02:09:21 -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
Matias Manevi fa79276290 Remove destructors from Mjs wrapper structs.
PiperOrigin-RevId: 831001833
Change-Id: I54550737a4c1cb504bf62b9bfed12d7a70434233
2025-11-11 11:31:21 -08:00
Google DeepMind 6d261528e0 Enhance error reporting in WASM codegen generators.
In `structs.py`, a `RuntimeError` is now raised when an anonymous struct is encountered but is not present in `STRUCTS_TO_BIND`.

PiperOrigin-RevId: 830978376
Change-Id: Id64720a12c3cce313bd513a40a74ddf57718a7d1
2025-11-11 10:38:39 -08:00
Google DeepMind 8e4a5901c3 Rename internal lists of skipped functions in constants.py.
PiperOrigin-RevId: 830976939
Change-Id: I833ef4c98107e19822f5e96c7541d294e129ac6c
2025-11-11 10:35:22 -08:00
Matias Manevi 54661ab140 Fully generate Emscripten bindings for MuJoCo functions.
PiperOrigin-RevId: 830975595
Change-Id: Ie4d0d16c80f490abaa5ae8218628ac1b3d32c0ef
2025-11-11 10:32:04 -08:00
Google DeepMind ff037f2e78 Make Emscripten binding module names consistent
PiperOrigin-RevId: 830902834
Change-Id: I64e004559cbfdb14fb84bc548f05b1ab49e94d4d
2025-11-11 07:20:45 -08:00
Google DeepMind 5b859327cc Remove unused manually added structs from WASM bindings.
PiperOrigin-RevId: 830901766
Change-Id: If0104a59f7e06a96733feb31f1ce9a93ba3fde42
2025-11-11 07:17:37 -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
Matias Manevi 3e167e0f0b Correctly format constructor initializer lists in struct wrappers.
PiperOrigin-RevId: 830887996
Change-Id: Ibe663fcc17571ad1fd62d70249687c917653618e
2025-11-11 06:38:19 -08:00
Matias Manevi 75774b2a35 Simplify struct header generation by merging the internal _build_struct_header_internal function into build_struct_header
PiperOrigin-RevId: 830878041
Change-Id: I6867984ac6ec091daaf2172fbde0e6ac6f38d1f3
2025-11-11 06:03:13 -08:00
Haroon Qureshi 1b2206fc50 Do not generate mipmaps for textures loaded from KTX files.
PiperOrigin-RevId: 830874812
Change-Id: Ie9dccc52acd5ffd26e5d4f3597f3834f81ebebcb
2025-11-11 05:51:36 -08:00
Haroon Qureshi 2261733aa4 Toggle profiler window using F3.
PiperOrigin-RevId: 830869956
Change-Id: I396f89f95672096f59b909b9415be2168aac6473
2025-11-11 05:33:57 -08:00
Haroon Qureshi 1fbea85ef0 Remove redundant call to GenerateMipMaps.
The Create?Textures will generate the mipmaps themselves if needed.

PiperOrigin-RevId: 830868294
Change-Id: I295e0dac12bc7c31a98242256721f46467f883d6
2025-11-11 05:27:58 -08:00
Haroon Qureshi 4a5a36f3fc Display error when loading model.
PiperOrigin-RevId: 830862449
Change-Id: Iab1e8786d79d55db9a15a788ecb37e0b0418111c
2025-11-11 05:04:48 -08:00
Haroon Qureshi b3deb9dd12 Do not reset camera_id if no tracking object is set.
Otherwise, we can never incrementally move beyond a free camera.

PiperOrigin-RevId: 830845627
Change-Id: I07e8639f79efcdae451999ca07b91a41360752ca
2025-11-11 04:03:35 -08:00
Matija Kecman 88e75cd7e6 Remove implot from toolbox/window.cc
PiperOrigin-RevId: 830842619
Change-Id: I39d13508423ad0ba1e12349ceaccab2425d28243
2025-11-11 03:51:38 -08:00
Yuval Tassa 23023edc52 Fix bug in schema
PiperOrigin-RevId: 830819693
Change-Id: I9fd047975895f4a376d28b7eee2c0d38344ce864
2025-11-11 02:28:52 -08:00
Kyle Bayes 39f0321a68 Clean up NativeCCD testing models.
PiperOrigin-RevId: 830733959
Change-Id: Ie7f71c36d2efafd37aecef54ca4897cebd6d091f
2025-11-10 21:31:02 -08:00
Taylor Howell bfcceb583e Import google-deepmind/mujoco_warp from GitHub.
PiperOrigin-RevId: 830506734
Change-Id: I857bf59a34a46bd61fc24953fd6f10b2157febb7
2025-11-10 10:35:00 -08:00
Yuval Tassa f8cef22992 Change mjWarp admonition class from attention to warning
PiperOrigin-RevId: 830452799
Change-Id: I26d7163b4c738a6accd70784863cc2dbdc410927
2025-11-10 08:23:05 -08:00
Taylor Howell e464e173da Update conf.py: "warp only fields" custom section.
PiperOrigin-RevId: 830452471
Change-Id: Ib90afedacf760b3d0584e7d0dd81cdd9e3e35dc9
2025-11-10 08:21:45 -08:00
Yuval Tassa 1c6a05de98 Snap Y-axis range to nice decimal bounds in gl2 figures.
PiperOrigin-RevId: 830355030
Change-Id: I2e9f145fb8c626dd671d286560c8334202586c6b
2025-11-10 03:01:30 -08:00
Matija Kecman 4e46db8903 Refactor WASM binding directory structure
* All tests moved into wasm/codegen/tests folder
* Merged wasm/codegen/helpers/ into wasm/codegen/generators/

PiperOrigin-RevId: 829471173
Change-Id: I2dbc5d9351771817ec260c7ddf87c31e66a9eabe
2025-11-07 09:37:26 -08:00
Matija Kecman 44220fcc51 Refactor WASM bindings in preparation for codegen directory structure update
PiperOrigin-RevId: 829459535
Change-Id: I4045e163a6e7fcee9d9585131d1e5e30f0b50b89
2025-11-07 09:02:43 -08:00
Google DeepMind 59debb50b1 Add SLEEP to EnableBit enum.
This change exposes the `mjENBL_SLEEP` flag from MuJoCo's `mjtEnableBit` in MJX's `EnableBit` type.

PiperOrigin-RevId: 829446801
Change-Id: Ia95b31a3488ecba0431646c889e10a5ae5fb60e8
2025-11-07 08:22:45 -08:00
Matija Kecman 2cd99e2ec6 Update the enums_test.ts using the generation script
PiperOrigin-RevId: 829445412
Change-Id: I8da1f019a4f4ad2278399a2c82d3096ef234240c
2025-11-07 08:18:10 -08:00
Taylor Howell 883836848a Fix box-box distance computation.
PiperOrigin-RevId: 829431553
Change-Id: I9e28bc8eb7687c3c83e5ff68c65e93d8a07378a9
2025-11-07 07:37:03 -08:00
Matija Kecman 45b079cfe8 Various minor cleanups in WASM bindings generation code
PiperOrigin-RevId: 829430835
Change-Id: Iadb0e4f8a197da69e093eccfd75d07cf6db5faaf
2025-11-07 07:34:41 -08:00
Matija Kecman 80a91cfbea Internal change
PiperOrigin-RevId: 829417225
Change-Id: Ib2304c6a40fb7a2a9fed900a587b9f7ed4b3103a
2025-11-07 06:49:00 -08:00
Matias Manevi 6fb4394701 Refactor array initialization for mjData and mjvScene in MuJoCo WASM bindings.
PiperOrigin-RevId: 829406147
Change-Id: Ib93c49e938086fb277e4959ade1f25e6ced5c70d
2025-11-07 06:12:14 -08:00
Yuval Tassa 8734cab366 Add sleeping documentation
https://youtu.be/vct493lGQ8Q

PiperOrigin-RevId: 829390353
Change-Id: I92f85a03be0bb585d2d8e29de1ed1a2e848f247f
2025-11-07 05:12:42 -08:00
Yuval Tassa 769f37b653 Implement sleeping in engine
PiperOrigin-RevId: 829361787
Change-Id: I6f64d8e25c4248cf32c18cd94d37ff5def78946e
2025-11-07 03:33:07 -08:00
Sergei Lebedev 1e0226d360 Ignore pytype errors produced with --use-functools-partial-overlay
PiperOrigin-RevId: 829338416
Change-Id: I1867bd18a7c57e2faf0f121d89dfc4129c5f31b8
2025-11-07 02:08:04 -08:00
Yuval Tassa 252a0d73df Add sleep related data structures
PiperOrigin-RevId: 829055431
Change-Id: I1ccbd77a57044a754ae7db611b4c2c0010fbda53
2025-11-06 12:10:55 -08:00