Commit Graph

3542 Commits

Author SHA1 Message Date
Alessio Quaglino ff7c94de8a Add quadratic interpolation to mju_interpolate3D.
PiperOrigin-RevId: 820252349
Change-Id: I983175eb51d7e1a81da06c0911326fcb8f5fe764
2025-10-16 08:48:20 -07:00
Haroon Qureshi 87adb7e5d6 Use the ImGui OpenGL3 backend.
PiperOrigin-RevId: 820249390
Change-Id: I43fc85bf75a2c01b76218a2ff67a1526ee9e2bdb
2025-10-16 08:39:51 -07:00
Andrea Gesmundo 2893c3344c Allow mjx.ray to exclude multiple bodies.
PiperOrigin-RevId: 820236386
Change-Id: I41229fa52043d844d116b540d60053628d1a842b
2025-10-16 08:03:46 -07:00
Taylor Howell 2fc8306e3d Update .readthedocs.yml.
PiperOrigin-RevId: 820223836
Change-Id: If0567dc022cea8133773c89d738841de2945b049
2025-10-16 07:26:05 -07:00
Alessio Quaglino ffdfe542cf Add mju_interpolate3D.
This is a more general API in preparation of a higher interpolation order

PiperOrigin-RevId: 820174741
Change-Id: I81bd52ab44e0485d72579e21d1c8a48a1b35ec3f
2025-10-16 04:39:24 -07:00
Gabe Oppenheimer 48f10bfcb6 Update MuJoCo to v3.3.8 following the 3.3.7 release.
PiperOrigin-RevId: 819919328
Change-Id: Ib34f959f6f8efd83362d49e784aa8e0594036899
2025-10-15 14:39:05 -07:00
Kyle Bayes 8cbfc42767 Fix issue with zero size cache.
PiperOrigin-RevId: 819773517
Change-Id: Iff1523e17ffbd1dff02bee71db896c64bd8b565c
2025-10-15 08:46:00 -07:00
Yuval Tassa 5715cebbb9 MSAN: Don't clear mjData.sensordata in mj_resetData
This is strictly an out array and should not be read before it is written to. This change improves MSAN coverage of engine code.

PiperOrigin-RevId: 819767673
Change-Id: I57500c8147f4774d326cf87ea3bac5420e4dd54d
2025-10-15 08:31:03 -07:00
Taylor Howell 99d93124f0 Update .readthedocs.yml.
PiperOrigin-RevId: 819751628
Change-Id: Idf88c9169c63b80e6ae608b6e89911adbc7cb0b4
2025-10-15 07:47:07 -07:00
Matija Kecman fec7a576ad Revert the Eigen3 version due to an [upstream bug in Eigen](https://gitlab.com/libeigen/eigen/-/issues/2986)
PiperOrigin-RevId: 819709602
Change-Id: I948daf46419547a598b23810c2c4a7adca74fb05
2025-10-15 05:47:03 -07:00
Haroon Qureshi 9174c87203 Minor fixes.
PiperOrigin-RevId: 819680566
Change-Id: Ie2480eab3c974227268222190fdb84ed671303f2
2025-10-15 04:07:36 -07:00
Baruch Tabanpour 0d4f6231be Make JAX-Warp FFI more robust. Prepare for warp-lang 1.10. Fix #2894
PiperOrigin-RevId: 819381906
Change-Id: I1f16abcbe02884445725c3087aa97af941131533
2025-10-14 13:48:43 -07:00
Alessio Quaglino b6f25ca623 Check mjs_getName return value in XML parser. Fixes #2898.
PiperOrigin-RevId: 819351410
Change-Id: I0807d71328068f6388991ae15274c7d61b4d3e53
2025-10-14 12:40:28 -07:00
Taylor Howell 67960543a0 Updates for MJX viewer to help avoid graph recapture when impl='warp'.
PiperOrigin-RevId: 819312078
Change-Id: I2f94eff9720fac8d06017123a51770d39743f2d6
2025-10-14 11:14:59 -07:00
Haroon Qureshi f1d45bd542 Fix minor formatting issues and use nullptr consistently.
PiperOrigin-RevId: 819178621
Change-Id: I3f6bfb6888075188d49e32110af2074b07c6b918
2025-10-14 06:15:57 -07:00
Gabe Oppenheimer f7708954cb Update changelog to version 3.3.7 and reformat lists.
We won't be bumping the minor version until the next release.

PiperOrigin-RevId: 818748607
Change-Id: I34d0ac8836eeb6512f8dde112980f49f17125400
2025-10-13 11:16:16 -07:00
Gabe Oppenheimer ae1febd83f Automated g4 rollback of changelist 818694877.
*** Reason for rollback ***

BEGIN_PUBLIC
Holding off on a minor version bump until the next release.

*** Original change description ***

#mujoco update the version to 3.4.0 ahead of the 3.4.0 release.

Bump the version to 3.4.0 ahead of the next release.

***

PiperOrigin-RevId: 818748143
Change-Id: I722e9beb80c61a48bd997da6a1840777a81d5036
2025-10-13 11:14:42 -07:00
Gabe Oppenheimer 27e8736fc7 This CL updates the changelog to mark the release of MuJoCo 3.4.0. It also updates the versions of Eigen3, Abseil, and benchmark used in the CMake build.
PiperOrigin-RevId: 818719010
Change-Id: I865b0f647003d579af9d6c87fa081c4f7cbe34d0
2025-10-13 10:13:01 -07:00
Gabe Oppenheimer 02d2d4d49a Bump the version to 3.4.0 ahead of the next release.
PiperOrigin-RevId: 818694877
Change-Id: I42e261956a0219e549bec6a54cbf330a74f02f9f
2025-10-13 09:22:49 -07:00
Yuval Tassa bbeb0b95a7 Reset contact efc_address in mj_clearEfc, fixes #2869
The truth is that all these solver-related values should be moved out of `mjContact` altogether, but that can be done in a future followup.

PiperOrigin-RevId: 818624976
Change-Id: I5b9e63927098cdf26b9f8acfdd9d86e75d6ce331
2025-10-13 06:18:41 -07:00
Haroon Qureshi 9b7e7e471d Add line and linebox geom primitives.
PiperOrigin-RevId: 818570050
Change-Id: If02873dd878a23b442368ce69bc024e0310e9d02
2025-10-13 02:59:13 -07:00
Haroon Qureshi 66a1c22cae Label all bodies, not just selected bodies, when mjLABEL_BODY is set.
An earlier refactor incorrectly assumed that only selected bodies needed
labels.

PiperOrigin-RevId: 818568645
Change-Id: I7aea07c5342673dd589e1891d0db1f2b0c489fe4
2025-10-13 02:54:34 -07:00
Taylor Howell d9399d6f84 Update doc/conf.py.
PiperOrigin-RevId: 818544892
Change-Id: I4bb14309ebb4abe9eca1a61fa91b1bba6992a1e5
2025-10-13 01:47:09 -07:00
Yuval Tassa a7fe06c717 Further simplification to mj_crb
PiperOrigin-RevId: 818241421
Change-Id: I67dd2a60f415eb17b41f5ee553939118ab124123
2025-10-12 01:43:30 -07:00
Yuval Tassa 12f0e3df9a Quick return for static bodies in mj_object{Velocity,Acceleration}
PiperOrigin-RevId: 818238459
Change-Id: I340a2f61439db2a149cc64a5fee543680fdcad0f
2025-10-12 01:25:05 -07:00
Kyle Bayes 9e0885a4fa Handle exceptions in VFS C API.
PiperOrigin-RevId: 817688877
Change-Id: Ia2e306fe4cd1848eb5731212aa4e959080a9d377
2025-10-10 10:03:36 -07:00
Haroon Qureshi b63252e4bb Render labels for any geom with a label, not just label geoms.
PiperOrigin-RevId: 817686605
Change-Id: I030626dd942e50eef33e0de7e9d0f314fd2f457d
2025-10-10 09:58:21 -07:00
Taylor Howell 5f55e96810 Fix _get_data_into_warp.
PiperOrigin-RevId: 817681130
Change-Id: Iceb622e5655021ac25388ec28f1f78fe61f58ddc
2025-10-10 09:44:35 -07:00
Matija Kecman 624ae0ac26 Silence warning/error relating to not using a const-ref in a for loop.
PiperOrigin-RevId: 817652277
Change-Id: Ia700c67fe2c163c7a1e6e35fbbaed632cca213c3
2025-10-10 08:22:11 -07:00
Haroon Qureshi ff7c613c79 Initial implementation of the filament rendering backend for mujoco.
This is intended as a drop-in replacement for mjr_render to enable high
quality, physically-based rendering (PBR) using the filament render engine.

This is a work-in-progress and, as such, some features may be missing. This
is also a code-only drop; build files (including instructions on how to
generate the filament materials) will be provided at a later date.

This library is intended to be run with the experimental studio app.

PiperOrigin-RevId: 817593684
Change-Id: Ib9cd14c1881e4897c1111275bd749aa38ebb5317
2025-10-10 05:01:39 -07:00
Matija Kecman bd68f0c6cc Update CMake to use C++20
PiperOrigin-RevId: 817573868
Change-Id: I22c98515763623d7411fd12910cf88cdaa336e6e
2025-10-10 03:54:47 -07:00
Matija Kecman 59a5a7bf5f Improve error messages in LoadMujocoModel
PiperOrigin-RevId: 817565307
Change-Id: I367298cdf77d26b6f8deb5c6a0d5c3cab1e4d065
2025-10-10 03:24:50 -07:00
Taylor Howell 38af2e2d00 Export mujoco_warp/pyproject.toml.
PiperOrigin-RevId: 817541914
Change-Id: I271f66c26699c1c9d15133420e189d5c525deae6
2025-10-10 02:02:57 -07:00
Baruch Tabanpour 192da87475 Remove _full_compat from MJX io.
PiperOrigin-RevId: 817337868
Change-Id: Ic61b8d57937452371b85416c624ff2672c908aac
2025-10-09 14:26:19 -07:00
Erik Frey 50e163748d Use correct tile sizes in 3p mujoco_warp now that launch_tiled bugs are fixed.
PiperOrigin-RevId: 817310391
Change-Id: I652509ba8d6dcd514b264eb450952e6980e48f1e
2025-10-09 13:18:45 -07:00
Taylor Howell a9632a9825 MuJoCo Warp feature parity documentation.
PiperOrigin-RevId: 817123818
Change-Id: I21e4fd64943d68ffd714a1d84309ed5085764d6a
2025-10-09 04:33:24 -07:00
Haroon Qureshi abe88202d0 Remove redundant flags argument.
PiperOrigin-RevId: 817115667
Change-Id: I4e5096206d7c24f5861e1bb9e8049149803dceeb
2025-10-09 04:07:43 -07:00
Alessio Quaglino 98682ae284 Do not modify mesh position when fitting a geom to the mesh AABB.
Also, unify the meaning of fitting a geom to an AABB: it now means to find the smallest geom such that its AABB contains the mesh AABB.

Fixes #2881.

PiperOrigin-RevId: 817097544
Change-Id: I883c686feffa803bd16ba461db24a474dfec7712
2025-10-09 03:05:00 -07:00
Sam Haves 3a299c49ca Remove use of usdaFileFormat from mjcf_file_format.
Previously this was just used for the USDA file format token, which we can confidently just construct ourselves.

Since [this PR in OpenUSD](https://github.com/PixarAnimationStudios/OpenUSD/commit/5bb9ad1fb2a034e1f9b48c7db936f296b5b78e25) the file lives in a different place now and public usage will be deprecated anyways.

PiperOrigin-RevId: 816801204
Change-Id: I42e92d2af52b0f9ff0a679ecb96f3d2dbf623531
2025-10-08 11:54:44 -07:00
Haroon Qureshi 1335ec87e4 Move font assets data targets into toolbox library.
PiperOrigin-RevId: 816654994
Change-Id: Ic56fab2b0af0c8d85682f8b233342a0d088d5cca
2025-10-08 05:09:42 -07:00
Haroon Qureshi 8e4932170a Remove unused params.
PiperOrigin-RevId: 816654011
Change-Id: Ib26bc90dcda167e8acf1feaa3b015acb5aa7aceb
2025-10-08 05:05:59 -07:00
Haroon Qureshi e7e331b11e Update sensor decor elements to be of type mjOBJ_SENSOR.
PiperOrigin-RevId: 816640568
Change-Id: I838608c0482ec1ee499fe9598ddb33aa6c5331e9
2025-10-08 04:17:40 -07:00
Haroon Qureshi 7b9f6a5cc1 Invert early-out checks to reduce nesting.
PiperOrigin-RevId: 816606107
Change-Id: I325d3f4695cdeb189694088d8a81b198d65f96ea
2025-10-08 02:21:14 -07:00
Baruch Tabanpour b56cf98e41 Import google-deepmind/mujoco_warp from GitHub. Update MJX io.py.
PiperOrigin-RevId: 816431884
Change-Id: I54881e7e350fbe5b2be1833e66745894b122f374
2025-10-07 16:43:30 -07:00
Saran Tunyasuvunakool f83ee3fd73 Update mujoco_warp.
Also remove mujoco_warp tests and test data from this repo.

PiperOrigin-RevId: 816239754
Change-Id: Ie89ef043d40bb43d1e1150acd33b5f4cbf162ab8
2025-10-07 09:50:21 -07:00
Haroon Qureshi fbab761627 Cleanup how different rendering backends are selected.
PiperOrigin-RevId: 816169098
Change-Id: I915aa45fa3a6d45a5178d3ff7bfdd0f1b1e01789
2025-10-07 17:48:23 +01:00
Taylor Howell fd9b989bf8 Import google-deepmind/mujoco_warp from GitHub.
PiperOrigin-RevId: 816099854
Change-Id: I6302a97c2f5d4594a08ebf4bc53a180b804360e6
2025-10-07 17:47:55 +01:00
Yuval Tassa 414888b716 Mark some mjData fields as mutable.
PiperOrigin-RevId: 815819490
Change-Id: I1a62fda556b4197aec451f2747c69f34bab13220
2025-10-06 11:43:38 -07:00
Yuval Tassa 52eff3da0f Fix mismatched argument format in mju_mulInertVec declaration.
PiperOrigin-RevId: 815818142
Change-Id: Id9caa581962705095f227a113505fc3e3ddd1054
2025-10-06 11:40:32 -07:00
Yuval Tassa ab9575d8a6 Refactor and speed up mj_crb and add a benchmark.
This is a no-op "prefactor" of `mj_crb` to reduce the number of lines changed in the upcoming sleeping CL. The main change here is that `mj_crb` now avoids accessing the model and data pointer repeatedly, but instead has the input and output pointers explicitly declared as local variables. A benchmark test found a healthy **14% perf bump** due to two changes:
- Adding `restrict` to `mju_mulInertVec`
- The function-local pointers.

Adding `restrict` to the local pointers had no effect. Note that `mj_crb` is not a particularly expensive function so these speed bumps are not significant per se, but rather indicative of possible future gains with these techniques.

```
Benchmark                Time(ns)        CPU(ns)     Iterations
---------------------------------------------------------------

ORGINAL BASELINE
BM_CRB_BASELINE_mean         4325           4348         993200  230.052k items/s

BASELINE + RESTRICT
BM_CRB_BASELINE_mean         4057           4090        1186150  244.573k items/s

LOCAL POINTERS + RESTRICT
BM_CRB_mean                  3772           3800        1001750  263.209k items/s
```

PiperOrigin-RevId: 815798225
Change-Id: Iffdf57b544e8e10562807c617f73ca4ccd1c614f
2025-10-06 10:54:01 -07:00