Commit Graph

28 Commits

Author SHA1 Message Date
Google DeepMind 3969cac614 Fix tinyxml include
This came up as a code suggestion, presumably for consistency.

PiperOrigin-RevId: 771966921
Change-Id: Ic29afc9a9eb1e0b87dd7d9ac04a5ad9790f86f0d
2025-06-16 04:26:41 -07:00
Robin Alazard 072c872deb Add helper methods for storing USD prim paths into mjsElements.
This way we fix a previously uncaught casting error due to using different types.

PiperOrigin-RevId: 765177079
Change-Id: I4f817f12c92fe578b25e8c53a94b3c91e22a3db0
2025-05-30 07:10:35 -07:00
Sam Haves b2e8589e7a Add support for actuators to Mujoco USD interop.
PiperOrigin-RevId: 764740692
Change-Id: Ib045653fee840087bc3891ee7e770bdaac08548c
2025-05-29 08:29:46 -07:00
Robin Alazard 6b919162d1 Add write_physics_ as a state variable on ModelWriter.
This way we don't have to worry about passing the write_physics param everywhere.

PiperOrigin-RevId: 764394280
Change-Id: I2c879ae57bdc30f50189960864097c932f967330
2025-05-28 13:33:01 -07:00
Robin Alazard fc69ef1084 Fix authoring type mismatch for geoms sizes attributes.
Fixes wrong sizes being displayed in usdview.
Also introduce a new test to ensure we catch as many of those kinds of errors as possible in the future.

PiperOrigin-RevId: 764388588
Change-Id: Id3c878edd054fe5272c42c9f960c65c850655559
2025-05-28 13:21:19 -07:00
Sam Haves 441ca838a1 Add support for inertia and mass to Mujoco USD interop.
PiperOrigin-RevId: 763737956
Change-Id: I6cdf267d76536a26aeb6327ce90165842e32bd8a
2025-05-27 04:58:09 -07:00
Sam Haves 9e4931b79d Add CollisionAPI and MeshCollisionAPI schemas to mjcPhysics.
PiperOrigin-RevId: 762478906
Change-Id: I9103e8d3cf99492e2df1c6b4af7937b12993f225
2025-05-23 10:26:31 -07:00
Sam Haves 76ddc30072 Make MJCF SdfFileFormat plugin create hierarchy reflecting MJCF instead of sibling rigidbodies.
PiperOrigin-RevId: 762117447
Change-Id: Id13f7a4f4e383a0c9e670e5272836f2fb1099830
2025-05-22 14:04:58 -07:00
Sam Haves 62a9d5b98d Add MjcPhysicsSceneAPI support.
Still missing compiler settings but will follow up in a future CL. Tried to add full coverage for testing setting of attributes to non-default values.

PiperOrigin-RevId: 761636862
Change-Id: Id4b9486645b2600931556cdcb8dc71f28ec309cd
2025-05-21 13:03:46 -07:00
Sam Haves 178fb49c2b Fix namespacing in USD schema.
PiperOrigin-RevId: 759632714
Change-Id: I666ca0e5b7f264f63eae0bbb39f0403654fb1c56
2025-05-16 08:54:24 -07:00
Sam Haves df09980258 Create python module for MjcPhysics.
PiperOrigin-RevId: 759602056
Change-Id: I06e604a5f6b3ca3b1a4bb949589d1b7ab72dd6ad
2025-05-16 07:13:05 -07:00
Sam Haves 81442e06a0 Add MjcPhysicsSiteAPI support and testing.
PiperOrigin-RevId: 759124593
Change-Id: Ic2fa2a00f8384f432ee2eef95c80f5c180aa4ca9
2025-05-15 06:38:03 -07:00
Sam Haves dc4968506b Remove MjcPhysics prefix from schema API types.
PiperOrigin-RevId: 758718987
Change-Id: I8a3a5dc7a990d401a91f5982e62c590e8924472a
2025-05-14 09:39:24 -07:00
Sam Haves 0a5da8db22 Rename MjcSiteAPI to MjcPhysicsSiteAPI for consistency.
PiperOrigin-RevId: 758708231
Change-Id: I75914ba52159996515547aa9e2e93690cadbfc66
2025-05-14 09:10:30 -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
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
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
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
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
Robin Alazard d657e628f0 Fix radius sizes of geom shapes
PiperOrigin-RevId: 752750452
Change-Id: I2ac08ad4014718320f014ed8ba7cc3b87586f6c0
2025-04-29 08:44:50 -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
Google DeepMind 8e7457d7c6 Initial support for writing UsdPhysics data starting with UsdPhysicsRigidbodyAPI support.
The SDF_FORMAT_ARGS `usdMjcfToggleUsdPhysics` is introduced to toggle writing UsdPhysics or not when converting. Off by default

PiperOrigin-RevId: 746467942
Change-Id: I26cb9a4c4ae2eef96163dab967a74f14940a2a6d
2025-04-11 08:19:11 -07:00
Sam Haves 446a8f1742 Add basic site support to Mjcf SdfFileFormat plugin.
We will still need to tag these with a custom API schema to ease round-tripping but that will follow creation of such a schema.

PiperOrigin-RevId: 746421793
Change-Id: I2df2209b4bc90d763718fb4bea8158b8598755c6
2025-04-11 05:28:03 -07:00
Google DeepMind 644b42bee3 Add mujoco/experimental and move USD work there.
PiperOrigin-RevId: 740730698
Change-Id: If9c68798cda502d6d7632906a034437e2557802e
2025-03-26 05:37:45 -07:00