Commit Graph

1465 Commits

Author SHA1 Message Date
Yuval Tassa 977f94e9df Delete sparsity structures from mjData, use the ones in mjModel
PiperOrigin-RevId: 795067950
Change-Id: If4f52e40ac49f7c6986b33ef9c8b534199dfd21a
2025-08-14 09:13:02 -07:00
Yuval Tassa 7eb13777f8 Put sparsity structures in mjModel, don't use them yet.
PiperOrigin-RevId: 795032051
Change-Id: I75c69e881980ff9c308acf00bb3a65f4b2ef12f5
2025-08-14 07:37:42 -07:00
Yuval Tassa f077fd00a9 Compute sparse matrix sizes before making the mjModel in the compiler.
PiperOrigin-RevId: 794998215
Change-Id: Ib7d0a2479b18cc8b3168c0656d3c4be0eff43a0f
2025-08-14 05:51:17 -07:00
Alessio Quaglino dcdf0a9c5c Use mj_rayMesh for computing an inexact SDF for mesh-SDF collisions.
PiperOrigin-RevId: 794576123
Change-Id: I3c688056a5ed617a0787ccf1f4aa683f9409040f
2025-08-13 07:50:06 -07:00
Yuval Tassa 84ba12e7b3 Clean up and standardize mj_printFormattedData
PiperOrigin-RevId: 793087071
Change-Id: I99d45ccf6591af02ee26e7f800bfbcc872336eb1
2025-08-09 14:03:13 -07:00
Alessio Quaglino ca4ca173ab Fix oct_distance return value.
PiperOrigin-RevId: 792924045
Change-Id: I42b8d0adaae7282d5c4e787fd1c85162720e977b
2025-08-09 00:33:38 -07:00
Rishi Krishnan ed3ff15870 Update MuJoCo's version number following the 3.3.5 release.
PiperOrigin-RevId: 792806341
Change-Id: Ic68ecceacc48ddbd6b0c741ae8f0791551e1b4dd
2025-08-08 16:45:12 -07:00
Kyle Bayes 50fa598d93 Update x_norm in tetrahedron case in GJK.
This check is never called due to the fallback to gjkIntersection, however it's needed for debugging when disabling the fallback.

PiperOrigin-RevId: 792623394
Change-Id: I7178d9afae697bd22984688e89fd1865d3c6a37f
2025-08-08 07:52:00 -07:00
Yuval Tassa 19781b60a1 Fix a gcc-related compilation error.
PiperOrigin-RevId: 792592986
Change-Id: I6bd49d3c739a58f9b611fe24594bd3f11e757c5b
2025-08-08 06:00:17 -07:00
Yuval Tassa 8b5213c557 Cleanup: extract local functions in compiler for setting datatype and needstage
PiperOrigin-RevId: 792566070
Change-Id: I22d397758f5e8b35899c9461543989e352bd2b96
2025-08-08 04:11:14 -07:00
Yuval Tassa 3c6e4f1ece Clean up engine_core_smooth.c
PiperOrigin-RevId: 792564094
Change-Id: I47b3f1953db5402acc49dac373a039c9c0bf1ad9
2025-08-08 04:05:13 -07:00
Alessio Quaglino eb1da7c43d Compute the interpolation coefficients per vertex rather than per node.
PiperOrigin-RevId: 792124681
Change-Id: Ib0e18d0b59f09c7e3bdb2ef9940a9b7327b92cd3
2025-08-07 06:03:11 -07:00
Alessio Quaglino 781242ae95 Avoid duplicated vertices in the SDF octree.
Before: nnode: 42777, nvert: 342216
After: nnode: 42777, nvert: 77588
PiperOrigin-RevId: 792115571
Change-Id: I17913ed3d22f22a0370dc4cbd2b833a0f5983cda
2025-08-07 05:27:01 -07:00
Alessio Quaglino 840108cf7c Refactor octree in preparation for continuous interpolation.
PiperOrigin-RevId: 792092644
Change-Id: I096ca0989210a00ae0b4556498d96212755d23c7
2025-08-07 04:06:03 -07:00
Alessio Quaglino 132f90b17f Validate mjs_setFrame dest parameter and raise an error if null.
PiperOrigin-RevId: 791742890
Change-Id: I926e6dfb08aa66fac2816b805e156074c37dce99
2025-08-06 10:19:01 -07:00
Alessio Quaglino 49f45a93c8 Guard against division by zero when calculating pressure in tactile sensor.
PiperOrigin-RevId: 791641958
Change-Id: I457bc7f55c0b03e14b9c3944935866ede14f1d51
2025-08-06 05:07:12 -07:00
Yuval Tassa 784c7a419b Improve builtin hemisphere docs
PiperOrigin-RevId: 791271829
Change-Id: I391215b5388f4e9e2a17198dbcdbd0c605fda4b4
2025-08-05 10:25:45 -07:00
Yuval Tassa 705ec6d7fb Adds built-in superellipsoid mesh.
PiperOrigin-RevId: 791196831
Change-Id: I1d864f6e620870f016377a4d9e2e26d1a23fd77e
2025-08-05 07:02:52 -07:00
Sam Haves e74cee652f Add README to mjcPhysics.
PiperOrigin-RevId: 791183563
Change-Id: I4383dcab12128a745e435ac7f2cea52cccc4ce60
2025-08-05 06:18:37 -07:00
Yuval Tassa a5d4d1000e Add built-in supertoroid mesh.
PiperOrigin-RevId: 791180080
Change-Id: I3a70f50ff4a52a1bd4b88fc30334a574895145b4
2025-08-05 06:06:43 -07:00
Kyle Bayes e543ba95c5 Fix comments in meshNormals.
PiperOrigin-RevId: 791169316
Change-Id: I540f06a56862774ae0feb666ab38762853cb1c36
2025-08-05 05:27:41 -07:00
Yuval Tassa 996f0040fd Add built-in sphere mesh.
PiperOrigin-RevId: 791162850
Change-Id: I573a414727e79f1a495e0f2282b2faff48ab3443
2025-08-05 05:05:05 -07:00
Yuval Tassa 5220767457 Add built-in hemisphere mesh.
PiperOrigin-RevId: 791148546
Change-Id: Ic9ff0c9b0f5fa4fd22d5f7f848f150cf74d378ba
2025-08-05 04:16:24 -07:00
Yuval Tassa a5a6379f83 Add built-in cone mesh type.
Also delete `prism` type since it is subsumed by cone.

PiperOrigin-RevId: 790992343
Change-Id: I7a9c6f2a4377489173acd64b23086c748d2cee8e
2025-08-04 19:35:32 -07:00
Yuval Tassa 7b9f5bdae7 Fix bug in raycast to hfield. Fixes #2765
PiperOrigin-RevId: 790784429
Change-Id: Ib2319722796ed510afed960bbf5cebc86cf185a9
2025-08-04 09:40:59 -07:00
Kyle Bayes f2a2afeb03 Fix address bug in meshEdgeNormals in doing edge multiccd with meshes.
PiperOrigin-RevId: 790731924
Change-Id: Ia475b1f01731518166f229c25ebffd1fbf7c7939
2025-08-04 07:03:14 -07:00
Alessio Quaglino 7baaa39846 Add SDF geom to test/testdata/model.xml.
Also, when a mesh has both an octree and a bvh, render only the octree.

PiperOrigin-RevId: 790680831
Change-Id: Iaf3896933f6728af4db1eaa83ff5b06558ab0d19
2025-08-04 03:53:51 -07:00
Alessio Quaglino 100b1a06fd Decrease opacity of taxels with zero value.
This prevents the taxels from being occluded by the convex hull for meshes that do not provide face connectivity.

PiperOrigin-RevId: 790420616
Change-Id: I543fd7b52e4625d921b6b5b5b77b4720020df42a
2025-08-03 08:36:39 -07:00
Alessio Quaglino 80befd64ae Do not cull mjGEOM_TRIANGLE.
PiperOrigin-RevId: 789723631
Change-Id: I8a5aaa78a9fe63458c07b823c7550846c14413b1
2025-08-01 05:28:30 -07:00
Matija Kecman ee63b82e1c Fix the format string when printing uintptr_t
PiperOrigin-RevId: 789333383
Change-Id: I32b190ffa6579a93970650df58865083aa0a18ab
2025-07-31 07:50:45 -07:00
Matija Kecman 23fa7c00d5 Remove usage of size_t types in mjModel, use mjtSize (uint64_t) instead to improve portabilty of MJB files to WASM.
PiperOrigin-RevId: 789321991
Change-Id: Ic25fab876c347fc75f5ca24cad09e8fd972f035f
2025-07-31 07:08:33 -07:00
Sam Haves 4c288c19ac Remove physics schema authoring toggle from MJCF SdfFileFormat plugin.
PiperOrigin-RevId: 789321573
Change-Id: Ib29bb426f8598a58f7b34c048b154fa8ada589ef
2025-07-31 07:07:18 -07:00
Sam Haves b5368a3385 Add displayColor authoring to site geometry when converting MJCF to USD.
PiperOrigin-RevId: 789311878
Change-Id: I70027cd5d8d02f4ee26043f3b9fb03311e38984b
2025-07-31 06:28:42 -07:00
Bogdan Graur 82cf27992d Initialize variables in copyM2Sparse
PiperOrigin-RevId: 788875024
Change-Id: I87068a3878e0b6bc5227bb61e84c07e75e448eea
2025-07-30 06:16:17 -07:00
Alessio Quaglino 51babec9c5 Move tactile sensor to the engine.
PiperOrigin-RevId: 788863133
Change-Id: I3172ebb7641fa8146469da25cba7db794760e7b1
2025-07-30 05:27:44 -07:00
Alessio Quaglino 89f4789085 Add mjs_makeMesh to create a builtin mesh.
PiperOrigin-RevId: 788538127
Change-Id: I999733399a1a0da07b0f915f34d31364ab8b3b52
2025-07-29 11:31:18 -07:00
Yuval Tassa 46dc67b7eb Add function mjs_sensorDim to user API.
Note: change to (unreleased) contact sensor mjSpec API
PiperOrigin-RevId: 788507423
Change-Id: Ie639afb7ed01dc3f7bab43a3e812e8e0b0c67d07
2025-07-29 10:20:27 -07:00
Alessio Quaglino 4575089f48 Prevent ray casting from stopping at the SDF bounding box.
The SDF value of the closest point on the bounding box is added to the distance from the bounding box when the query point is outside of it.

PiperOrigin-RevId: 788377943
Change-Id: Id8e489a1d112918c484f5615223d557f2d14b822
2025-07-29 03:10:02 -07:00
Sam Haves a04e0385e4 Add USD content type support in MJCF.
PiperOrigin-RevId: 788075561
Change-Id: If37cc254cab0411454de7663e0b3ff9f2b263281
2025-07-28 10:53:49 -07:00
Baruch Tabanpour 3434f5d9c7 Compute convex hull for collision pairs.
build / windows-2025 (push) Has been cancelled
build / ubuntu-22.04-clang-13 (push) Has been cancelled
build / ubuntu-22.04-clang-14 (push) Has been cancelled
build / ubuntu-22.04-clang-15 (push) Has been cancelled
build / ubuntu-24.04-clang-16 (push) Has been cancelled
build / ubuntu-24.04-clang-17 (push) Has been cancelled
build / ubuntu-24.04-clang-18 (push) Has been cancelled
build / ubuntu-22.04-gcc-10 (push) Has been cancelled
build / ubuntu-22.04-gcc-11 (push) Has been cancelled
build / ubuntu-22.04-gcc-12 (push) Has been cancelled
build / ubuntu-24.04-gcc-13 (push) Has been cancelled
build / ubuntu-24.04-gcc-14 (push) Has been cancelled
build / macos-15-arm64 (push) Has been cancelled
build / macos-15-x86_64 (push) Has been cancelled
PiperOrigin-RevId: 788074030
Change-Id: I3d4bbe71f824db82e998e374d95a5c49995af806
2025-07-28 10:49:50 -07:00
Yuval Tassa 9e7979e492 Add checks for contact sensor when constructing with mjSpec Python bindings.
PiperOrigin-RevId: 788008233
Change-Id: I14518b8cce1a7dad4fd24933478e0cc1bb75e350
2025-07-28 07:50:56 -07:00
Alessio Quaglino 8db2413c84 Fix a bug in triangle-box filter that caused missing Octree leaves.
PiperOrigin-RevId: 787955811
Change-Id: I40ad0f9219cbe5d5757b9345b1de495cba50d306
2025-07-28 04:41:02 -07:00
Sam Haves 541c56b46f Create mjcPhysics ImageableAPI for visual, non physical visual entities.
PiperOrigin-RevId: 786366034
Change-Id: Ifb72d2daf8f5963bb7007dda1685da94b456ff41
2025-07-23 11:48:17 -07:00
Sam Haves 7da32d186f Add basic visual material parsing support to USD interop.
For this first iteration we only support simple UsdPreviewSurface spec node graphs.

PiperOrigin-RevId: 786309455
Change-Id: I2e5501a65b22aca6da570bc94394514c67bd100a
2025-07-23 09:21:56 -07:00
Sam Haves 8383bd439c Add support for parsing 'st' primvar from USD.
PiperOrigin-RevId: 786277487
Change-Id: Id99e6bf6a656b623950c363597da3930ee4c00e3
2025-07-23 07:47:50 -07:00
Copybara-Service 6416e548aa Merge pull request #2348 from jjyyxx:patch-3
PiperOrigin-RevId: 785518837
Change-Id: I2bbdcb6aea0ff3edfa354389ef758c2d34b93f68
2025-07-21 11:49:39 -07:00
Kyle Bayes 3283fb8655 Fix sign in cylinder support function.
PiperOrigin-RevId: 785394029
Change-Id: I010edab0ba8734a9b91626669fa309a0ddb346e5
2025-07-21 05:12:16 -07:00
Kyle Bayes db72d0d53c Clamp dist in mj_geomDistanceCCD. Closes #2710
PiperOrigin-RevId: 785393424
Change-Id: I508cd2ad6f47ca022cc54f228247ca498fda691f
2025-07-21 05:09:38 -07:00
Sam Haves c2820941aa Convert UsdPhysicsRevoluteJoint from degres to radians if compiler option is set.
PiperOrigin-RevId: 784574716
Change-Id: I58f65816edb782fcb41bbc721f7bed5a27741639
2025-07-18 07:18:17 -07:00
Sam Haves 46b713ef2d Remove pedantic designated initializers in USD parsing.
PiperOrigin-RevId: 784544836
Change-Id: Ie36136b2a0b8105ccb4a4679883120638ec80699
2025-07-18 05:10:12 -07:00