Alessio Quaglino
2386dfd7da
Add touch sensor for estimating the surface contact stresses from the SDF.
...
PiperOrigin-RevId: 758556339
Change-Id: Ib56d76fab084b530fd68d61a29294cb6f1d05f3f
2025-05-14 00:45:58 -07:00
Alessio Quaglino
23865c7491
Skip cow.xml from xml_native_writer_test.
...
Including it caused tests to become flaky.
PiperOrigin-RevId: 758414305
Change-Id: I6a5b6b20df7faf736bb3dd8610019b9c9a23d633
2025-05-13 16:10:18 -07:00
Yuval Tassa
4186589738
Use mjData.M where appropriate
...
PiperOrigin-RevId: 758374391
Change-Id: I9de7af7be8e41b5c300d0a04ea99082b4cefdec6
2025-05-13 14:22:41 -07:00
Yuval Tassa
79c74d7eae
Add mjData.M, not yet used.
...
PiperOrigin-RevId: 758351796
Change-Id: I0786966b2f2c2e699db845cda6940a8821b23f49
2025-05-13 13:28:03 -07:00
Yuval Tassa
1e02d66c3d
Remove M matrix structure from mjData.
...
Introduced in March 2025 as a temporary measure, this is not considered a breaking change.
PiperOrigin-RevId: 758311298
Change-Id: Ia08857c18b791f6a62a2d8d136b45fc075507b93
2025-05-13 11:47:18 -07:00
Baruch Tabanpour
6bc0bbf7df
internal change
...
PiperOrigin-RevId: 758287280
Change-Id: I8b99a5d44910d5b2e7857b808b1696f244778a26
2025-05-13 10:53:25 -07:00
Yuval Tassa
627fffdef9
Switch mjData.{qH,qLD} from full ("M") to reduced ("C") inertia matrix structure.
...
PiperOrigin-RevId: 758273074
Change-Id: If1a2e663ea70044694af985e0119afd6d58115ac
2025-05-13 10:20:32 -07:00
Yuval Tassa
436b5a8e1f
Add mju_addToSymSparse
...
- Internal engine function to add a symmetric sparse matrix to a dense matrix.
- Also minor refactors to related functions.
PiperOrigin-RevId: 757954336
Change-Id: I8d8a48bcbbd5d6c618ae097a87df2bc1e6f5ef1d
2025-05-12 16:19:43 -07:00
Yuval Tassa
755564a348
Remove unused code related to legacy island implementation.
...
Also fix a docstring.
PiperOrigin-RevId: 757939564
Change-Id: I3a970fd38c63886d34cd23b1fb45617a9ce5c147
2025-05-12 15:39:16 -07:00
Alessio Quaglino
8a7c42c747
Add SDF functions to public API.
...
PiperOrigin-RevId: 757829339
Change-Id: I81ee7c3f33acf234835bf34cbb632e23cb9e284e
2025-05-12 10:53:39 -07:00
Alessio Quaglino
d77126dc58
Add vertcollide option for adding spheres at flex vertices.
...
PiperOrigin-RevId: 757789990
Change-Id: I8ccba52b13e8c02a7be78f992297d6f414d98f8e
2025-05-12 09:13:48 -07:00
Sam Haves
09bf5409ab
Add code generated files for mjcPhysics schema.
...
PiperOrigin-RevId: 757784741
Change-Id: Iacef6ef78c8e95ce51c5546562ad5b679f460deb
2025-05-12 09:00:45 -07:00
Yuval Tassa
b53ed63b5f
Use 2humanoid100.xml model in a benchmark test.
...
PiperOrigin-RevId: 757784271
Change-Id: I7da11ab85ba9f5e023cdbe3c77d31224f3444ca5
2025-05-12 08:59:14 -07:00
Sam Haves
bd5cb88211
Change mjPhysics schema library name from mujocoPhysics to mjcPhysics.
...
PiperOrigin-RevId: 757777584
Change-Id: I6c8661aac3018892f113e65fada1b27903635200
2025-05-12 08:37:10 -07:00
Yuval Tassa
dfe22f7ef7
Remove stale reference to uncompressed sparse matrix.
...
PiperOrigin-RevId: 757775265
Change-Id: Ic18c0c89ab84285a7d93e24c65e50832ebc53c6f
2025-05-12 08:30:43 -07:00
Saran Tunyasuvunakool
6a977d073b
Fix GitHub Actions builds.
...
PiperOrigin-RevId: 757765160
Change-Id: Idaf86f80a24bc480ce35711cb706a4702a249d31
2025-05-12 08:00:43 -07:00
Yuval Tassa
9ac5fff41d
Move local function to top of test file.
...
PiperOrigin-RevId: 757722664
Change-Id: Ief7d8ca9fda990bf582ca0feaa4b645f0a4bb6e7
2025-05-12 05:36:38 -07:00
Sam Haves
af088adaee
Add mjPhysics schemas, starting with MjcPhysicsSceneAPI and MjcPhysicsSiteAPI
...
PiperOrigin-RevId: 757710745
Change-Id: Ia920abecdf8c6a05f61dd0fd3a8e6bc001ccc7d0
2025-05-12 04:57:52 -07:00
Yuval Tassa
85dd78d6f3
Add private function mj_makeM.
...
PiperOrigin-RevId: 757689756
Change-Id: Ie8bb49d9f18a95da2e3fd8622e30f9266a1ced98
2025-05-12 03:52:38 -07:00
Taylor Howell
9accc7ae51
Update mj_energyPos.
...
PiperOrigin-RevId: 757678945
Change-Id: If236b9e8f376a2673abc87e818326e9188f6c15a
2025-05-12 03:14:43 -07:00
Taylor Howell
b0b2c48190
Update comment in mj_energyPos.
...
PiperOrigin-RevId: 757670899
Change-Id: I3827089f4298b3800c20ed64ca0ccfcf3ed83d92
2025-05-12 02:45:45 -07:00
Sam Haves
924ee3070a
Modify user values in mujoco to allow users to provide cleanup functions to avoid memory leaks.
...
For the MJCF -> USD plugin, and I suspect other usecases for user values, it's necessary to give ownership of the object to Mujoco. However since they get type erased, we can't clean up the data automatically for the user. Instead this allows c++ clients to provide a cleanup function with their data.
PiperOrigin-RevId: 756832010
Change-Id: I80b8e7822e1a0e399a0d19dcaa57ee69b3ccc16a
2025-05-09 11:03:06 -07:00
Taylor Howell
baf84265b8
Improve wrap_circle.
...
PiperOrigin-RevId: 756704385
Change-Id: Id44ba317c6072790763a958f4227a76278d3ab74
2025-05-09 04:13:14 -07:00
Alessio Quaglino
ad80a4625b
Always generate a BVH in flex.
...
The BVH is used also for computing normalized vertex coordinates in the trilinear interpolation, so we need to compute it also when the flex cannot collide.
PiperOrigin-RevId: 756349244
Change-Id: Ib397c472e31251df5a7ea85850d83a62f3b2c949
2025-05-08 09:46:47 -07:00
Kyle Bayes
f4774a5449
Fix bug in cached meshes where convex hull was missing. Previously if a mesh was copied from the cache it would not have its convex hull if the original mesh that was cached didn't previously compute it.
...
Fixes #2609
PiperOrigin-RevId: 756223337
Change-Id: I54705456636c270607a17340b249047e0df75d0b
2025-05-08 02:42:15 -07:00
Baruch Tabanpour
6cfea71985
Allow for different MJX backend implementations.
...
PiperOrigin-RevId: 755935704
Change-Id: Ic135cd00137c2857c73c683ed9fdc5ac4418715d
2025-05-07 11:28:39 -07:00
Baruch Tabanpour
421c487d9d
Set mocap_pos/quat in make_data. Fixes #2606 .
...
PiperOrigin-RevId: 755903897
Change-Id: Ied04e9bd3febfe1bbbba24ed1f52b3c0c6e50f38
2025-05-07 10:13:17 -07:00
Yuval Tassa
ecb769fc3a
Refactor islands to be memory contiguous.
...
PiperOrigin-RevId: 755803476
Change-Id: I41972b07e0d5ef5d0117c94f565b93367b87458b
2025-05-07 05:06:27 -07:00
Alessio Quaglino
449de73430
Do not skip cow and touch_grid during WriteReadCompare.
...
PiperOrigin-RevId: 755370618
Change-Id: I90dfe66b20c316b19c943eab8d031f5aef187fa7
2025-05-06 07:54:39 -07:00
Robin Alazard
253abad210
Add MeshCollisionAPI to collider Meshes with convexHull approximation.
...
PiperOrigin-RevId: 754014642
Change-Id: I44cff505a2b9b7120a38f8c896b2c6560ce51c43
2025-05-02 08:35:15 -07:00
Sam Haves
ab63a7e824
Add CMakeLists for usdMjcf file format plugin.
...
This adds an option MUJOCO_BUILD_USD_PLUGINS to the top level CMakeLists which allows us to build the usdMjcf file format plugin with the rest of mujoco.
In this first version, we allow building against either standalone USD or against Houdini (DCC) since it has it's own fork of USD. When building against standalone USD we also build the file format tests.
PiperOrigin-RevId: 753969974
Change-Id: If691eecbddf45d18b7c4ff76f7650999d42e99c5
2025-05-02 05:48:33 -07:00
Robin Alazard
02656532c2
Fix Mesh PhysicsCollisionAPI by accounting for how it's referenced/instanced.
...
Because we introduce an additional parent scope when referencing a `Mesh` prim (required for instancing), we need to create an `over` prim that allows to actually operate on the to-be-referenced Mesh.
PiperOrigin-RevId: 753941355
Change-Id: I829be9e82fe650802afcbc46f4b2f4c81eb53bd1
2025-05-02 03:47:31 -07:00
Sam Haves
6c319310b8
On Darwin archs, add ArchConstructEntry using to placate compile errors.
...
PiperOrigin-RevId: 753235230
Change-Id: I621fd879ba1a0e6b7668454386f35ae76a190c13
2025-04-30 11:01:41 -07:00
Sam Haves
bb07fa0c78
Move Mujoco USD test fixture out of MJCF plugin directory and rename to test_utils.
...
PiperOrigin-RevId: 753183581
Change-Id: Iedd6594ac679ca026f8af29c647d18ae93003a53
2025-04-30 08:44:14 -07:00
Sam Haves
177fce9fa1
Remove absl dep and custom MujocoTest from usd plugin tests.
...
PiperOrigin-RevId: 753144576
Change-Id: I3d4fd470c698967a50b189b99c1bb808a9a80306
2025-04-30 06:34:52 -07:00
Robin Alazard
45d3fef2fc
Add initial support for colliders
...
By default every geom is a collider unless contype=conaffinity=0.
PiperOrigin-RevId: 753108713
Change-Id: I0e1a81b254c41e9103c34f69696205ff5c0bd6dc
2025-04-30 04:15:39 -07:00
Yuval Tassa
7742f62803
Add mju_mulSymVecSparse, private engine function
...
Multiply sparse symmetric matrix (only lower triangle represented) by vector
PiperOrigin-RevId: 752926934
Change-Id: I5aaae1266256aa88aee8c25e242b7a7c51ea8dd7
2025-04-29 16:33:54 -07:00
Yuval Tassa
1766a388cc
Improve warmstarting if island structure exists.
...
PiperOrigin-RevId: 752901506
Change-Id: I062d14df7da7d9dc1a2c1c30a16d0db7215af336
2025-04-29 15:18:14 -07:00
Yuval Tassa
4c92c60988
Remove time from test model keyframe
...
PiperOrigin-RevId: 752847956
Change-Id: Iebc28c4c73d39c3d37c5fa7abd53ea8a9e11f7f9
2025-04-29 12:56:40 -07:00
Yuval Tassa
8078a45727
Add private functions mju_blockDiag and mju_blockDiagSparse
...
PiperOrigin-RevId: 752815446
Change-Id: Ia7f73160315ce57b78a2c34bc781f00e1b0f05c4
2025-04-29 11:31:03 -07:00
Robin Alazard
d657e628f0
Fix radius sizes of geom shapes
...
PiperOrigin-RevId: 752750452
Change-Id: I2ac08ad4014718320f014ed8ba7cc3b87586f6c0
2025-04-29 08:44:50 -07:00
Alessio Quaglino
3e9d130092
Add mjs_getPluginAttributes.
...
PiperOrigin-RevId: 752691116
Change-Id: Ib503a99f8d10661b8bf92410ccf471420f924986
2025-04-29 05:19:09 -07:00
Yuval Tassa
2545ec5383
Don't call getchar on error.
...
PiperOrigin-RevId: 752680097
Change-Id: Idce87a3e33ebce703bf3eedc18026f6a13d05f35
2025-04-29 04:37:22 -07:00
Alessio Quaglino
75f196c7ef
Add missing PointToLocal call in mjCPlugin copy constructor.
...
PiperOrigin-RevId: 752486555
Change-Id: I08b14476b9098e6473a4c00918ef3f9a287f35f6
2025-04-28 16:23:45 -07:00
Google DeepMind
4137a4c774
Bump version to 3.3.3 following the 3.3.2 release
...
PiperOrigin-RevId: 752482043
Change-Id: I3dae8a0b9de2be4d456e856825c18f16f62bf51a
2025-04-28 16:09:25 -07:00
Google DeepMind
1dc5bcb04a
Update changelog for 3.3.2 release
...
PiperOrigin-RevId: 752389725
Change-Id: I0976279bece09a099b6a34029575b24ba2d8fd1b
2025-04-28 11:46:41 -07:00
Alessio Quaglino
fb30e0e00c
Add docs for mjSpec serialization.
...
PiperOrigin-RevId: 752230683
Change-Id: Id237ccc1b265e99bf15892f8fd208ba38f4c6ded
2025-04-28 02:58:46 -07:00
Google DeepMind
d3bc0544d3
Add basic support for geom rgba.
...
Adds primvar:displayColor/primvar:displayOpacity to the geom prim if its rgba attribute differs from the default (0.5, 0.5, 0.5, 1.0). This sets the color and opacity directly on the prim with no need for an external material, making it consistent with how rgba is used in mujoco.
PiperOrigin-RevId: 751013128
Change-Id: I059943ec5b266e62c3696d9a0ac4f2033db9e07f
2025-04-24 08:59:02 -07:00
Google DeepMind
8df3614781
Add support for plane geometry.
...
PiperOrigin-RevId: 750994019
Change-Id: Ia3b085bed5b8e2fcdb00ffc69dd5551a7fa3c30d
2025-04-24 07:54:56 -07:00
Kyle Bayes
9e72874801
Remove EPA tolerance in the discrete case in nativeccd.
...
PiperOrigin-RevId: 750649926
Change-Id: I8ab317cd6b227c9486a2916ae9c6445906c23401
2025-04-23 10:52:14 -07:00