Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug Report] Bug title PhysX error: The application needs to increase PxGpuDynamicsMemoryConfig::totalAggregatePairsCapacity #981

Open
hanlin-ga opened this issue Sep 12, 2024 · 5 comments
Labels
question Further information is requested

Comments

@hanlin-ga
Copy link

hanlin-ga commented Sep 12, 2024

Hello, I am running "./isaaclab.sh -p source/standalone/workflows/rsl_rl/train.py --task Isaac-Lift-Cube-Franka-v0 --headless --device cuda:0". I modified the script of "joint_pos_env_cfg.py" to make Franka to pick up a 006_mustard_bottle from YCB dataset. It was ok to train the model to pick up a dex_cube_instanceable.usd, but when I changed to 006_mustard_bottle.usd, it shows the error:

[Error] [omni.physx.plugin] PhysX error: The application needs to increase PxGpuDynamicsMemoryConfig::totalAggregatePairsCapacity to 16790 , otherwise, the simulation will miss interactions
, FILE /builds/omniverse/physics/physx/source/gpubroadphase/src/PxgAABBManager.cpp, LINE 1287

My modified code snippet of joint_pos_env_cfg.py is here:

    self.scene.object = RigidObjectCfg(
        prim_path="{ENV_REGEX_NS}/Object",
        init_state=RigidObjectCfg.InitialStateCfg(pos=[0.5, 0, 0.055], rot=[0.7071068, -0.7071068, 0, 0]),   #rot=[0.7071068, -0.7071068, 0, 0]
        spawn=UsdFileCfg(
            usd_path=f"{ISAAC_NUCLEUS_DIR}/Props/YCB/Axis_Aligned_Physics/006_mustard_bottle.usd",
            # usd_path=f"{ISAAC_NUCLEUS_DIR}/Props/Blocks/DexCube/dex_cube_instanceable.usd",
            scale=(0.8, 0.8, 0.8),
            rigid_props=RigidBodyPropertiesCfg(
                solver_position_iteration_count=16,
                solver_velocity_iteration_count=1,
                max_angular_velocity=1000.0,
                max_linear_velocity=1000.0,
                max_depenetration_velocity=5.0,
                disable_gravity=False,
            ),
        ),
    )

I am using RTX 4090 GPU by the way. How to solve this problem?

@martinmatak
Copy link
Contributor

multiplier = max(1, batch_size // 256)
n_pairs = simulation_context.get_physics_context().get_gpu_found_lost_aggregate_pairs_capacity()
simulation_context.get_physics_context().set_gpu_found_lost_aggregate_pairs_capacity(n_pairs * multiplier)

this works for me

@hanlin-ga
Copy link
Author

hanlin-ga commented Sep 12, 2024

multiplier = max(1, batch_size // 256)
n_pairs = simulation_context.get_physics_context().get_gpu_found_lost_aggregate_pairs_capacity()
simulation_context.get_physics_context().set_gpu_found_lost_aggregate_pairs_capacity(n_pairs * multiplier)

this works for me

Thanks for the reply, did you add this in manager_based_env.py? @martinmatak

@martinmatak
Copy link
Contributor

simulation_context variable above is an instance of omni.isaac.core.SimulationContext, it doesn't depend on a particular filename

@hanlin-ga
Copy link
Author

hanlin-ga commented Sep 12, 2024

Thank you, the error is gone now. @martinmatak

@Mayankm96
Copy link
Contributor

@Mayankm96 Mayankm96 added the question Further information is requested label Sep 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants