Isaac Sim Version
4.5.0
4.2.0
4.1.0
4.0.0
4.5.0
2023.1.1
2023.1.0-hotfix.1
Other (please specify):
Operating System
Ubuntu 22.04
Ubuntu 20.04
Windows 11
Windows 10
Other (please specify):
GPU Information
- Model:
- Driver Version:
Topic Description
Detailed Description
If I create a Xform and a Mesh and apply Rigid Body with colliders preset from the GUI, it behaves correctly, but I want to be able to turn this on and off via code.
Steps to Reproduce
- Create Xform
- Create Child Cube Mesh
- Run the scripts
# Apply all physics APIs
UsdPhysics.RigidBodyAPI.Apply(prim)
PhysxSchema.PhysxRigidBodyAPI.Apply(prim)
UsdPhysics.CollisionAPI.Apply(prim)
PhysxSchema.PhysxCollisionAPI.Apply(prim)
Demo
The one in the left I used the GUI:
Add > Physics > Rigid body with colliders preset
The on in the right:
# Apply all physics APIs
UsdPhysics.RigidBodyAPI.Apply(prim)
PhysxSchema.PhysxRigidBodyAPI.Apply(prim)
UsdPhysics.CollisionAPI.Apply(prim)
PhysxSchema.PhysxCollisionAPI.Apply(prim)
Why they behave differently? How to achieve the same behavior from code?
Thanks!