Commit Graph

4305 Commits

Author SHA1 Message Date
Haroon Qureshi df02fe4bc0 BodyAddChild PopupContext needs to happen immediately upon triggering it.
PiperOrigin-RevId: 881955422
Change-Id: I03675431d78c93550ff2ad6d562daf1a0e3d0d08
2026-03-11 05:20:39 -07:00
Kyle Bayes acf7f030a6 Remove const qualifier from mjData in mj_geomDistance. The function mj_geomDistance will require data stack space as nativeccd memory is determined from opt.ccd_iterations.
PiperOrigin-RevId: 881946592
Change-Id: I524b9fa41018a581e58647d44de6ca3db4c6608b
2026-03-11 04:55:44 -07:00
Copybara-Service 64ee2d041f Merge pull request #3105 from NandiniDhanrale:fix/vfs-move-3098
PiperOrigin-RevId: 881946056
Change-Id: Ide041ff1dcdae00133251d928936920b47cf6c0d
2026-03-11 04:53:57 -07:00
Taylor Howell 6d1c3343af Update MJX documentation reference to MJWarp viewer
PiperOrigin-RevId: 881941624
Change-Id: Ieafb85f5b543a3d9212b33191579c1f7a7c09d16
2026-03-11 04:42:45 -07:00
Michael Moss 3cada28be7 Update changelog for 3.6.0 release.
PiperOrigin-RevId: 881671049
Change-Id: I28a1a3341e6f01d916b35ee9fb3a6c12c627fe89
2026-03-10 16:21:14 -07:00
Sam Haves 6890e133c0 Add mjs_getCompiler C API and compiler property to Python spec elements.
PiperOrigin-RevId: 881488083
Change-Id: I3aa1c0562bf2fd27057b8056048e3156fc1b067c
2026-03-10 09:57:36 -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
Alessio Quaglino f1b305632c Allow mesh with octrees in mjc_distance.
PiperOrigin-RevId: 881355677
Change-Id: I8da9f7c92d6e76f16a5d82e7d16488211a8a65b7
2026-03-10 04:41:34 -07:00
Michael Moss 955d6c0b02 Update MuJoCo version from 3.5.1 to 3.6.0 prior to next release.
The next release will include breaking changes, so this bumps the major
version to reflect that.

PiperOrigin-RevId: 881351265
Change-Id: I970c68a0211651c07fcb8109ebd0b138196cf50a
2026-03-10 04:30:07 -07:00
Alessio Quaglino 713b5524bc Introduces a new "strain" equality mode (flex_edgeequality = 3) for flexcomps with trilinear interpolation. This mode enforces constraints on the three invariants of the Green-Lagrange strain tensor at 8 Gauss quadrature points within each flex element, resulting in 24 equality constraints per flexcomp.
Also fixes a bug when attaching a flex with constraints.

PiperOrigin-RevId: 881349765
Change-Id: I8e6df8239488bfdc87d7e5b473568975e38c737e
2026-03-10 04:26:07 -07:00
Haroon Qureshi fe6c81ed93 Internal changes.
PiperOrigin-RevId: 881291880
Change-Id: I9b43470802651b823507ee2691ba5216126d72ab
2026-03-10 01:56:10 -07:00
Sam Haves dade2d8c3e MJX: Use content-hash for np.ndarray pytree metadata fields
Previously mjx dataclasses would return np.ndarray as bytes for jax tracing to hash since they are not inherently hashable. This meant that any tracing that was cached would hold on to a copy of the numpy arrays in the dataclass. Children such as mjx.Model that store large numpy arrays would end up duplicating that data 3+ times in some cases.

This eliminates O(N * array_size) memory duplication across N cached
pytree traces, saving a lot of memory on models with heavy mesh/texture data.

PiperOrigin-RevId: 880985898
Change-Id: I58d4e91fda4112e4c633818f92907d20138e962a
2026-03-09 12:35:16 -07:00
Alessio Quaglino 84f09f3fa6 Add mesh_normalnum to MJX API.
PiperOrigin-RevId: 880957335
Change-Id: Ib3c37afa593c888ec109f520947958a5d47b0be2
2026-03-09 11:34:10 -07:00
Copybara-Service 3a99f6110e Merge pull request #3084 from Ashutosh0x:fix/mingw-stat-localtime
PiperOrigin-RevId: 880906196
Change-Id: I98027e80e9882620cb184766c14110478178ce53
2026-03-09 09:54:10 -07:00
Yuval Tassa 1e1eb48261 No-op refactor of flex interpolation factorization and solve in mj_implicitSkip.
PiperOrigin-RevId: 880867833
Change-Id: I2ab8ce5a027742af07ef0256bc4cdee62289282e
2026-03-09 08:20:24 -07:00
Copybara-Service 79d14035f9 Merge pull request #3158 from mar-yan24:mark-flexcompFix
PiperOrigin-RevId: 880857702
Change-Id: Ic1ad4068312c9a02728ce7f49abb38dea3b97a46
2026-03-09 07:57:21 -07:00
Copybara-Service 3510537bcb Merge pull request #3027 from Adityakk9031:#2982
PiperOrigin-RevId: 880846172
Change-Id: I5b0ccda4b481c079a6bb640ab19756c3fd4b4b26
2026-03-09 07:26:58 -07:00
Copybara-Service 9362031644 Merge pull request #3112 from LouRohanNV:fixUsdEqualities
PiperOrigin-RevId: 880843178
Change-Id: I23e817364772abab6cea9a0b92f7681b1372c2db
2026-03-09 07:19:09 -07:00
Copybara-Service cc9a474ed8 Merge pull request #3148 from LouRohanNV:usd-visual-prim-mesh-inertia
PiperOrigin-RevId: 880822823
Change-Id: Ib1fe2e4b500f64f44e306eb6adacf8b1c5e39ceb
2026-03-09 06:22:17 -07:00
Sam Haves ed0d7ba29f Move STL handling to a mjpDecoder.
PiperOrigin-RevId: 880820344
Change-Id: Ib3a714dd9698335433e518ed6af17d7b8407a8fb
2026-03-09 06:15:04 -07:00
Kyle Bayes 330c36c99b Fix issue in GJK where the tolerance for x_norm was set too low.
PiperOrigin-RevId: 880735671
Change-Id: I324e37e8677d3c7feeb4b8bcf065a2a0122326b6
2026-03-09 02:14:52 -07:00
Taylor Howell 1370a54007 Update changelog with tendon Jacobian changes and memory improvements for tendon Jacobian and actuator moment fields
PiperOrigin-RevId: 880378857
Change-Id: I761bd209c66f41fc39c9aeaf9832dcb95d7d624c
2026-03-08 03:05:48 -07:00
Taylor Howell 32ace6d303 MuJoCo Warp documentation: box-box collisions
PiperOrigin-RevId: 880376073
Change-Id: Ia7f285ff7bfaf5472790a559294e905749575402
2026-03-08 01:55:32 -08:00
Mark Yang 95724d1ec2 Fix vfs load for mesh gmeshs type 2026-03-07 21:45:12 -05:00
Baruch Tabanpour 6bc6c11c49 Add naccdmax to mjx io.
PiperOrigin-RevId: 879780258
Change-Id: I24f9d0b3205577322bebadc3d03796c8dcadde48
2026-03-06 13:02:55 -08:00
Lou Rohan a1bc4f219f Parse UsdPhysicsJoint enabled attr to set equality->active 2026-03-05 15:45:30 -06:00
Lou Rohan 42ee943ec5 Fix USD equality decoding
- handle when body0 or body1 are the default prim/world
- add site-based equalities to the constrainst list so they aren't skipped
- support connect constraints by checking for spherical joints
2026-03-05 13:31:32 -06:00
Taylor Howell 6a0ebac4b1 Update MJX feature parity documentation
PiperOrigin-RevId: 879098992
Change-Id: Ie82749921e373f4c7d032dc8ff77a7022a9e8ae6
2026-03-05 09:07:02 -08:00
Alessio Quaglino 8dc5cc4c70 Skip tangential components in tactile sensor if mesh has only normals.
PiperOrigin-RevId: 879036130
Change-Id: Ic4184dd535700c5099768dabf5009ba96b218542
2026-03-05 06:35:41 -08:00
Copybara-Service fce504beea Merge pull request #3129 from LouRohanNV:UsdContactExcludes
PiperOrigin-RevId: 879028113
Change-Id: I8798761bf40a8e60ef9aba83337bcabd96813cb9
2026-03-05 06:15:59 -08:00
Haroon Qureshi 45c7376ab4 Set actuator limits correctly.
PiperOrigin-RevId: 879012913
Change-Id: I3f03d09a98236ae9a4dc069564d14437ff5d0a2b
2026-03-05 05:35:14 -08:00
Haroon Qureshi 35c0a25cf4 No-op implementation for mjr_ functions.
This can be useful, e.g. writing tests that don't depend on rendering.

PiperOrigin-RevId: 879012859
Change-Id: Ifb8d7d5bb06a2456c1b4543f0bf4945fe8155039
2026-03-05 05:34:19 -08:00
Copybara-Service f1bcac2952 Merge pull request #2893 from joanllobera:fix/passive-attribute-droped
PiperOrigin-RevId: 878958794
Change-Id: I2d1fe080bd02b5c3e685cefbf36d45821cdfb46d
2026-03-05 03:18:10 -08:00
Haroon Qureshi aef44210cb Rename render to render/classic.
This will allow us to add additional renderers to the `render` folder.

PiperOrigin-RevId: 878913300
Change-Id: I205ae41250cbbcded406ad303d4e801d4cff892e
2026-03-05 01:43:21 -08:00
Haroon Qureshi 5506fbf506 Rename member history_ to sim_history_.
PiperOrigin-RevId: 878906079
Change-Id: I1327f0216bc5042e62c598f2b7f15f6a26c192dc
2026-03-05 01:23:39 -08:00
Copybara-Service 870f9fea24 Merge pull request #3150 from kevinzakka:fix/principal-point-frustum-sign
PiperOrigin-RevId: 878610460
Change-Id: I82e1c30c9c263a9981c619d6a401b417f95c39a2
2026-03-04 12:22:39 -08:00
Copybara-Service b129248be4 Merge pull request #3142 from kevinzakka:simulate-fix
PiperOrigin-RevId: 878575288
Change-Id: Ib3f820d84b0b9bfa25141e4360ddc339abbf0d50
2026-03-04 11:09:19 -08:00
Taylor Howell df3c8a2c28 Update MJX documentation headers
PiperOrigin-RevId: 878568549
Change-Id: I8951211b39bf306082fd8c6631c2afddbf34951d
2026-03-04 10:53:59 -08:00
Sam Haves b25f8433fe Refactor USD connect and weld equality decoding to align with MuJoCo's relpose semantics.
The relpose in mujoco represents the anchor in body1 space and the relative orientation of body2 in body1 space. Previously we were computing it as the relative position of body2 from body1 space.

Further, we now properly account for the setting of strictly the anchor and not the relpos by setting localPos0 *only*.

PiperOrigin-RevId: 878506356
Change-Id: I83fc7e97cd1a891e17f0bb091f8950b581be0e01
2026-03-04 08:34:09 -08:00
Haroon Qureshi 8ddb5ff97b Re-add ${CMAKE_ARGS} to script which was removed by mistake.
PiperOrigin-RevId: 878491532
Change-Id: Idc2a3b17617ca2b44f279c97d8d56917f6c1bf54
2026-03-04 07:56:49 -08:00
Lou Rohan 1378ab6d58 Fix indentation 2026-03-04 09:55:59 -06: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 c70b05e037 Make Renderer more self-contained.
The Renderer should configure the context and flip the image when
in classic mode and not rely on the Window to do so.

PiperOrigin-RevId: 878480986
Change-Id: I1af899107647469659662abd85527cdf66f507f4
2026-03-04 07:26:34 -08:00
Alessio Quaglino 15d8fc13b9 Add user sensor visualization in simulate. This is triggered when the product of sensor_intprm[0] and sensor_intprm[1] is equal to the sensor data dimension divided by 3 (the RGB channels).
PiperOrigin-RevId: 878473154
Change-Id: Icb3d7e9b766c49e3a9abe3f8bceea57e18e43328
2026-03-04 07:09:01 -08:00
Alessio Quaglino 4e83e813d7 Update tactile sensor docs.
PiperOrigin-RevId: 878468033
Change-Id: I0f36589877f3a93b596a9f848468f11a1ada9dfb
2026-03-04 06:52:48 -08:00
Haroon Qureshi 20efb8ee8d Add missing files.
PiperOrigin-RevId: 878445886
Change-Id: Ied34a5517c3aefc0985bef100431081a4cbfb640
2026-03-04 05:51:36 -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
Kevin Zakka 77ce80bc63 Fix swapped vertical frustum bounds for cameras with principal point offset.
The frustum_top and frustum_bottom assignments in mjv_updateCamera used
the wrong elements of the zver array, causing the principal point cy
offset to be applied with an inverted sign. This shifted the rendered
image vertically by 2*cy pixels.
2026-03-04 01:03:55 -08:00