Commit Graph

811 Commits

Author SHA1 Message Date
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
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 a771fc6c09 Increase mjNSENS to 3
PiperOrigin-RevId: 788468705
Change-Id: Id22f131bebb6accc9a29c9aa285efa75fa8b2c16
2025-07-29 08:38:13 -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
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 6144a508b5 In Mujoco USD interop, only consider dynamic friction when writing to and parsing from USD.
PiperOrigin-RevId: 783741987
Change-Id: I23c47a6e95c160c5c7d5c513e268c79e4236e2e4
2025-07-16 07:00:18 -07:00
Sam Haves ac0701d582 Add mujoco compiler settings to MjcSceneAPI in mjcPhysics.
PiperOrigin-RevId: 783729333
Change-Id: Ic1c3e4fb47a901de4eebdc2e987d276f4202d9ed
2025-07-16 06:09:36 -07:00
Sam Haves cdf5bcb693 Add inheritrange attribute to mjcPhysics MjcActuator
PiperOrigin-RevId: 783363012
Change-Id: I7d0476aae70c3acc3ed4808a8741b7eb12948dba
2025-07-15 09:30:16 -07:00
Yuval Tassa 576a34bcf2 Add netforce reduction to contact sensor.
PiperOrigin-RevId: 783020713
Change-Id: I0d11ccc4e1fd16d07e6f116d64a26485346d9cf1
2025-07-14 13:27:43 -07:00
Yuval Tassa d0e4771c8c Add contact sensor.
PiperOrigin-RevId: 783011982
Change-Id: Ica56fe9d520fa1d1ee7338e09148b1a55a049912
2025-07-14 13:03:35 -07:00
Sam Haves e441868dad Add missing attributes to MjcCollisionAPI USD schema.
PiperOrigin-RevId: 783006362
Change-Id: I02d51190d62bb9460863025cd16360427afc70c4
2025-07-14 12:47:24 -07:00
Yuval Tassa ef013a0633 Add mjPARTIAL_SORT macro to engine_sort.h
PiperOrigin-RevId: 782999687
Change-Id: I986aec0e1faedae90f1891b5f3233d5262d167f3
2025-07-14 12:26:36 -07:00
Alessio Quaglino 6e7aaacb85 Do not rely on global object lists in mjCBody::NextChild().
PiperOrigin-RevId: 782963753
Change-Id: I0afecbab4b7796f077963ba66eb7140d8f83ad89
2025-07-14 10:47:45 -07:00
Sam Haves 92bcbeb5d3 Add support for UsdPhysicsMaterialAPI and create MjcMaterialAPI for missing attributes.
PiperOrigin-RevId: 782942169
Change-Id: I344b5e47d1d63c9d4e50173cb6a96d0af177ec9e
2025-07-14 09:53:13 -07:00
Sam Haves 11e695b4c2 Rename MjcTransmission to MjcActuator in mjcPhysics schema.
PiperOrigin-RevId: 782352356
Change-Id: I4b74e3131b0fed925c506742c22038231f848909
2025-07-12 09:39:01 -07:00
Sam Haves 3473e4e451 Add group support to mjcPhysics equivalents for sites, geoms, actuators, and joints.
PiperOrigin-RevId: 781945497
Change-Id: I5c409f05e6bae33c181a51c273f260daea6004fc
2025-07-11 05:37:41 -07:00
Yuval Tassa 365cac49f8 Add benchmarks for mjSORT macro.
PiperOrigin-RevId: 781555531
Change-Id: Ia33b5512fbf65b08931037859d8c6062b018d760
2025-07-10 09:00:46 -07:00
Sam Haves fbea72d767 Remove MjcActuatorAPI in favor of typed MjcTransmission.
PiperOrigin-RevId: 781498554
Change-Id: Ib6ce5038645f6ca08638a9d316b0347dc121bc62
2025-07-10 05:58:58 -07:00
Sam Haves e7212d86bc Add maxhullvert attribute to mjcPhysics MeshCollisionAPI.
PiperOrigin-RevId: 781482346
Change-Id: I0d53f9ad99ac842629243b0375907b2f91bd3b61
2025-07-10 04:59:18 -07:00
Alessio Quaglino cef02fabea Remove sdflib plugin and move interpolation to engine_collision_sdf.
Before:
```
 Simulation time      : 1.71 s
 Steps per second     : 5854
 Realtime factor      : 11.71 x
 Time per step        : 170.8 µs

 Newton iters / step  : 2.19
 Contacts / step      : 3.45
 Constraints / step   : 13.79
 Degrees of freedom   : 12
 Dynamic memory usage : 0.2% of 14M
```

After:
```
 Simulation time      : 1.41 s
 Steps per second     : 7093
 Realtime factor      : 14.19 x
 Time per step        : 141.0 µs

 Newton iters / step  : 2.19
 Contacts / step      : 3.45
 Constraints / step   : 13.79
 Degrees of freedom   : 12
 Dynamic memory usage : 0.2% of 14M
```

PiperOrigin-RevId: 781087896
Change-Id: Iaf69dccc5e95af5bac862344683c74f962162186
2025-07-09 09:29:47 -07:00
Yuval Tassa a3d251f552 Add mjModel.sensor_intprm, integer parameters of sensors
PiperOrigin-RevId: 781053754
Change-Id: I90e5ef1cab3f87b894dbc70dccfc8bf0046ce1b6
2025-07-09 08:00:21 -07:00
Yuval Tassa e6c5715903 Add insidesite sensor for detecting when an object is inside the volume of a site.
PiperOrigin-RevId: 780993257
Change-Id: I2dcfc840d222680adc3b934344a0819f4d78b6eb
2025-07-09 04:56:42 -07:00
Sam Haves 14972d2490 Add mj_loadUSD function. Change simulate to use that instead of manual spec compilation.
PiperOrigin-RevId: 780608874
Change-Id: I333238c756fe76b371518a7cdf9452b93da3540a
2025-07-08 10:04:08 -07:00
Sam Haves be3c3ef8a9 Add missing gravity attribute authoring to Mjcf SdfFileFormat plugin.
PiperOrigin-RevId: 779239797
Change-Id: I039b1089e5b436498d14df384c1aee830fd4b48a
2025-07-04 11:25:49 -07:00
Robin Alazard e69b6cc5f3 Fix wrong extent authoring for Cube.
PiperOrigin-RevId: 779230125
Change-Id: I96c3d5daa7a760cd87a714a14ea74a15faf3d7db
2025-07-04 10:39:32 -07:00
Robin Alazard 21a852504c Make sure we never apply the ArticulationRoot API more than once.
PiperOrigin-RevId: 779185190
Change-Id: If441d0e2ba24191883839977b46864db2b4b8204
2025-07-04 07:36:05 -07:00
Alessio Quaglino af7d20c035 Change mjs_nextChild to be DFS to match XML parsing.
PiperOrigin-RevId: 778915232
Change-Id: I5e290f47b7d2530597bb6c85b66ff2ae807e5510
2025-07-03 10:07:13 -07:00
Alessio Quaglino 69ce5dbd05 Consolidate tree traversal tests in the C and Python APIs.
PiperOrigin-RevId: 778883024
Change-Id: I0d30ed011e60a6da7148cebc1f715895fd0c6fd6
2025-07-03 07:25:23 -07:00
Alessio Quaglino 594e17074a Replace name attribute with setters and getters in the C API of mjSpec.
PiperOrigin-RevId: 778816015
Change-Id: Ieffb7a5bce37e887ff009f9a02d2434435e79ca1
2025-07-03 02:30:56 -07:00
Sam Haves 1d613b9b9a Add support for mjcPhysics keyframes to USD interop.
PiperOrigin-RevId: 778552679
Change-Id: I04026599f7a2836e3fe1cf0d553bcc86a5795f98
2025-07-02 10:17:41 -07:00
Robin Alazard 9dc67b50cd Write new Mujoco-specific JointAPI data to USD.
PiperOrigin-RevId: 778035661
Change-Id: I945aa38fc58973023d78ab0ab5fad7783d23e1ef
2025-07-01 07:35:34 -07:00
Alessio Quaglino 5c1f1f9dba Add octree to meshes of SDF geoms.
PiperOrigin-RevId: 777634862
Change-Id: I3210c2f8d73fd30ceecb0a11abd1d82e086b3d5d
2025-06-30 10:50:15 -07:00
Yuval Tassa 1c98dfd86e Remove unused header
PiperOrigin-RevId: 777505320
Change-Id: I39d4ccf47a49bfb6f74090e59c68373e76a0bcf5
2025-06-30 04:09:10 -07:00
Yuval Tassa 57b3d6d0f4 Make island discovery compatible with flex
PiperOrigin-RevId: 777490642
Change-Id: Iae2f4e8297cc24bded833e04ebfe32895f3a5460
2025-06-30 03:16:57 -07:00
Alessio Quaglino e97e5d31d0 Replace box SDF with a smooth approximation.
This approximation is equivalent to the exact SDF on the surface and externally, but it is smooth on the inside, rotating the gradient from radial at the box center to normal to the faces at the surface, and interpolated linearly (using two Euler angles) in between. This enables stable contact gradients for deeper penetrations.

PiperOrigin-RevId: 776574022
Change-Id: I562976e9f0535b0067aa12b2bc9d48eccb6472e9
2025-06-27 07:21:30 -07:00
Sam Haves 24789f8fe5 Apply articulation API to the correct body when converting to USD.
PiperOrigin-RevId: 776206773
Change-Id: I84b5687a9900b42fd208124414ac98feaaa9f8c4
2025-06-26 11:07:11 -07:00
Sam Haves 1e319aebed Support joint actuator authoring in Mjcf SdfFileFormat plugin.
PiperOrigin-RevId: 776202325
Change-Id: I8503dd98c1b64502550b879e70039ae568517508
2025-06-26 10:55:49 -07:00
Yuval Tassa 21bae3a388 Report which body has too-small mass/inertia in compilation error.
PiperOrigin-RevId: 776196017
Change-Id: Ib81efb170347a57cdc4b446c14cd7b8f5357958c
2025-06-26 10:40:40 -07:00
Sam Haves afc35451a0 Expose ability to go from USD stage to MjSpec.
PiperOrigin-RevId: 776184388
Change-Id: I0325b347c9896183d148a196897e1e5d0c4bbde2
2025-06-26 10:09:55 -07:00
Robin Alazard 3441e0aa03 mj_usd plugin: add joints export.
Note that ball joint is missing, will come later.

PiperOrigin-RevId: 776057523
Change-Id: I8d13c3ea9e7f3d894af73a4640eb93202f8a2a03
2025-06-26 03:02:17 -07:00
Google DeepMind da831f5d3e Add support for separate occlusion, roughness and metallic textures
PiperOrigin-RevId: 775632047
Change-Id: I40ba0b3d4ecb0c0a03534b8d93f85d279febbc9c
2025-06-25 04:37:19 -07:00
Google DeepMind 81d16b7ccc Add some comments to the material construction code
Grouped similar lines together, since they have become separated.

PiperOrigin-RevId: 775595031
Change-Id: Id75e87e07eb2e6b745698a57ea048daaff34f35c
2025-06-25 02:22:42 -07:00
Sam Haves 9089059517 Move headers from src/experimental/usd to include/experimental/usd
PiperOrigin-RevId: 775269423
Change-Id: Ifca6c3ead32b9fb3f02784ed38a9efae300be410
2025-06-24 09:33:26 -07:00
Google DeepMind 78df2ae7fa Add support mjcf emissive layer materials
Mujoco supports emission as a constant coefficient, and emissive, an rgb texture. This cl supports the rgb emissive texture for usd.

PiperOrigin-RevId: 775236677
Change-Id: I0e2ce1d9f68d79b6e9d2c28eecab22b2692f061c
2025-06-24 08:06:32 -07:00
Yuval Tassa 2707eadc00 Refactor mj_crb and mj_tendonArmature to use CSR M.
PiperOrigin-RevId: 774077388
Change-Id: Id57118a5d66c074766f5c69fd3b889ebc625cbf7
2025-06-21 04:49:06 -07:00
Yuval Tassa e23b39fbfa Increase test tolerance in engine_solver_test
PiperOrigin-RevId: 773647308
Change-Id: I11605518c4bb1d257763b7f3334de358bacc194c
2025-06-20 04:48:09 -07:00
Alessio Quaglino 0488d9f4eb Replace mjs_detachBody and mjs_detachDefault with mjs_detach.
In a follow-up, mjs_detach will be changed to only remove without deleting an element.

PiperOrigin-RevId: 773637351
Change-Id: I9ee4d3584ba88ccc225591337cf036bab806e25c
2025-06-20 04:12:27 -07:00
Yuval Tassa 4ce6293217 Fix bug in inverse dynamics when tendon armature is present.
PiperOrigin-RevId: 773604419
Change-Id: Iaffe3d831c6a5aba8a0a99c05aa76cbd862745f5
2025-06-20 02:25:04 -07:00