Commit Graph

22 Commits

Author SHA1 Message Date
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
Sam Haves f1b3897ea7 Fix missing namespace in test_utils.
PiperOrigin-RevId: 773354912
Change-Id: Ic19ba6f1ed4c3ae37a9c143f64da8b7ddc3b3e86
2025-06-19 08:29:34 -07:00
Google DeepMind ea949f1cee Add support for ORM maps in mujoco file format plugin
The ORM texture is a packed-channel map, with ambient occlusion in Red, roughness in Green, and metallic in Blue channel.

PiperOrigin-RevId: 772367369
Change-Id: I88a4dee2477daa1e3c0b00197bfbe2b276ba9937
2025-06-17 01:45:10 -07:00
Google DeepMind bb1b2db3a9 Add support for normal maps in mujoco file format plugin
PiperOrigin-RevId: 771992722
Change-Id: Ifeae9e12f1071018112e697402361caa84095ff2
2025-06-16 06:01:18 -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 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 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 81442e06a0 Add MjcPhysicsSiteAPI support and testing.
PiperOrigin-RevId: 759124593
Change-Id: Ic2fa2a00f8384f432ee2eef95c80f5c180aa4ca9
2025-05-15 06:38:03 -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 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
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