MuJoCo Mesh Collision API#
Code |
MUJOCO.COL.002 |
|---|---|
Validator |
MuJoCoMeshCollisionAPIChecker |
Compatibility |
other |
Tags |
🔑 |
Summary#
MuJoCo mesh collision data must use valid MjcMeshCollisionAPI and convex-hull mesh collision authoring.
Description#
The official MuJoCo USD schema defines MjcMeshCollisionAPI for mesh collider metadata. The MJCF-to-USD converter also writes USD mesh collision geoms with physics:approximation = "convexHull" because MuJoCo uses convex hulls for mesh collision.
When mesh collision data is authored for MuJoCo:
MjcMeshCollisionAPImust be authored only onUsdGeom.Meshprimsmjc:inertia, when authored, must be one oflegacy,convex,exact, orshellmjc:maxhullvert, when authored, must be an integer greater than or equal to-1mesh collision shapes that apply both
UsdPhysics.MeshCollisionAPIandMjcCollisionAPImust authorphysics:approximation = "convexHull"
Why is it required?#
Keeps MuJoCo mesh collider metadata on mesh prims.
Matches MuJoCo’s convex-hull mesh collision behavior.
Catches invalid mesh inertia and hull settings before MuJoCo import.
Examples#
def Mesh "collision_mesh" (
prepend apiSchemas = ["PhysicsCollisionAPI", "PhysicsMeshCollisionAPI", "MjcCollisionAPI"]
)
{
uniform token physics:approximation = "convexHull"
}
def Mesh "source_mesh" (
prepend apiSchemas = ["MjcMeshCollisionAPI"]
)
{
uniform token mjc:inertia = "convex"
uniform int mjc:maxhullvert = -1
}
How to comply#
Apply
MjcMeshCollisionAPIonly to mesh prims.Use the schema-defined
mjc:inertiatokens.Use convex-hull approximation for MuJoCo mesh collision geoms.