How to increase the PxgDynamicsMemoryConfig::foundLostAggregatePairsCapacity buffer in python

I set 5 by 7 spheres on the fingertip as tactile contact points, the number of envs is 32, and I got this GPU memory error.

More details:
The application needs to increase PxgDynamicsMemoryConfig::foundLostAggregatePairsCapacity buffers to 1536, otherwise, the simulation will miss interactions, FILE /buildAgent/work/74336105e89c4a74/source/gpubroadphase/src/PxgAABBManager.cpp, LINE 1153
2023-11-01 15:26:39 [26,986ms] [Error] [omni.physx.plugin] PhysX error: The application needs to increase PxgDynamicsMemoryConfig::foundLostAggregatePairsCapacity to 5760 , otherwise, the simulation will miss interactions
, FILE /buildAgent/work/74336105e89c4a74/source/gpubroadphase/src/PxgAABBManager.cpp, LINE 1145
2023-11-01 15:26:39 [27,028ms] [Error] [omni.physx.plugin] PhysX error: Please select Physics Scene (create one if there is none), navigate to GPU section and increase “Gpu Found Lost Aggregate Pairs Capacity” value to at least 5248.

Anybody knows how to solve it? Thanks!

Hi,
yes this is possible to tune through the extended PhysxSchema.PhysxSceneAPI parameters added to a regular UsdPhysics.Scene.
Here is the python code, you need to know your path to the UsdPhysics.Scene:

scenePrim = stage.GetPrimAtPath("/World/PhysicsScene")
physxSceneAPI = PhysxSchema.PhysxSceneAPI.Apply(scenePrim)
physxSceneAPI.CreateGpuFoundLostAggregatePairsCapacityAttr().Set(10 * 1024)

You can check the PhysxSchema.PhysxSceneAPI here in the schema documentation:
http://omniverse-docs.s3-website-us-east-1.amazonaws.com/omni_usd_schema_physics/105.1/class_physx_schema_physx_scene_a_p_i.html

Regards,
Ales

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.