generated from amazon-archives/__template_Apache-2.0
-
Notifications
You must be signed in to change notification settings - Fork 143
Open
Description
Description
I encounter a PhysX runtime error when trying to apply PhysxRigidBodyAPI and set angular damping for a prim.
The code works for creating the attribute, but during simulation PhysX throws errors related to PxSceneFlag::eENABLE_DIRECT_GPU_API.
Code
prim = stage.GetPrimAtPath(prim_path)
physx_rigid_body = PhysxSchema.PhysxRigidBodyAPI(prim)
if not physx_rigid_body:
physx_rigid_body = PhysxSchema.PhysxRigidBodyAPI.Apply(prim)
angular_attr = physx_rigid_body.CreateAngularDampingAttr()
angular_attr.Set(angular_damping)
Error Log
[Error] [omni.physx.plugin] PhysX error: PxRigidDynamic::setGlobalPose(): it is illegal to call this method if PxSceneFlag::eENABLE_DIRECT_GPU_API is enabled!, FILE /builds/omniverse/physics/physx/source/physx/src/NpRigidDynamic.cpp, LINE 102
[Error] [omni.physx.plugin] PhysX error: PxRigidDynamic::setLinearVelocity(): it is illegal to call this method if PxSceneFlag::eENABLE_DIRECT_GPU_API is enabled!, FILE /builds/omniverse/physics/physx/source/physx/src/NpRigidDynamic.cpp, LINE 239
[Error] [omni.physx.plugin] PhysX error: PxRigidDynamic::setAngularVelocity(): it is illegal to call this method if PxSceneFlag::eENABLE_DIRECT_GPU_API is enabled!, FILE /builds/omniverse/physics/physx/source/physx/src/NpRigidDynamic.cpp, LINE 287
Expected Behavior
Setting the angular damping attribute should not trigger PhysX errors during simulation.
Questions
Is this caused by the PhysX scene running with PxSceneFlag::eENABLE_DIRECT_GPU_API?
Are we not allowed to modify rigid body state (angular damping) when the direct GPU API is enabled?
Is there a recommended way to configure damping parameters for rigid bodies when running GPU PhysX?
Environment
Simulator: Isaac Sim
Framework: Isaac Lab
PhysX backend: GPU PhysX
Python API: `PhysxSchema.PhysxRigidBodyAPI```
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels