In add physics menu, "rigid body" "rigid body with colliders preset" in gray

I have three questions about this:

  1. When we apply the “rigid” attribute to Xform, I guess it was applied to the “mesh” which is the child of Xform? or applied to the Xform?

  2. why in add physics menu, “rigid body” and “rigid body with colliders preset” in gray?

  3. Usually , the collision bound created in Omni is red, But I import the URDF with collison description, it is in green.
    If I can not create “rigid body” because it inherited greed collision boundy from original URDF? How can I remove the green bound box?

Thank you !

Hi,

  1. Rigid body is applied to the prim that you have selected, rigid body requires to have xformOp stack so the prim should inherit from xformable. The mesh will have collision properties.
  2. It is grey out because:
    a) it was already applied there and the API exists
    b) there is a rigid body API already on some child or parent, nesting rigid bodies is not allowed
  3. Green means that the collision belongs a rigid body. So there already is rigid body applied, most likely on the xform that you have selected. Red means its just a collider (static body wont move).

Regards,
Ales

Hello,

For 3. how do you get the collision bounds to show? I’ve used Physics Debug>Simulation Debug Visualization>Collision Shapes, but the bounds are drawn in pink instead of green or red.

Thanks!

I guess green bound was inherited from URDF, but not inherit collision from omni system.

Describe the collision in URDF.

1 Like

You would have to use the inbuild collision visualization based on USD data:

The Physics Debug>Simulation Debug Visualization>Collision Shapes actually displays debug visualization coming directly from PhysX SDK, those colors come from the SDK directly.

Ales

Hi,

I wonder how to use python code to set collider to visual and collision mesh. Thank you.

Hi,
defining collisions is using open USD - UsdPhysics: Universal Scene Description: UsdPhysics : USD Physics Schema
You can check this section to see how to apply colliders from python: Omni PhysX — omni_physics 105.0 documentation

In general what you want to do use UsdPhysics.CollisionAPI.Apply(prim).

Regards,
Ales

1 Like