Contact sensor not working when enabling GPU

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: NVIDIA GeForce RTX 3090 Ti
  • Driver Version: 535.183.01

Topic Description

Detailed Description

I’m trying to get the contact information of the rigid body (here I use DynamicCuboid) under GPU simulation. It always detect no contact.

Steps to Reproduce

franka_new.zip (1.9 KB)

Screenshots or Videos

image

Additional Information

What I’ve Tried

I’ve tried 3 different methods (can be found in get_box_contact) to get contact but they all output in_contact=False.

  1. ContactSensor
for contact_sensor in contact_sensors:
    frame = contact_sensor.get_current_frame()
  1. _sensor.acquire_contact_sensor_interface()
_contact_sensor_interface = _sensor.acquire_contact_sensor_interface()
data = _contact_sensor_interface.get_sensor_reading("/World/envs/env_0/tumor/contact_sensor", use_latest_data = True)
raw_data = _contact_sensor_interface.get_contact_sensor_raw_data("/World/envs/env_0/tumor/contact_sensor")
  1. get_physx_simulation_interface().get_contact_report()
contact_headers, contact_data = get_physx_simulation_interface().get_contact_report()
for contact_header in contact_headers:
    print("Got contact header type: " + str(contact_header.type))
    print("Actor0: " + str(PhysicsSchemaTools.intToSdfPath(contact_header.actor0)))
    print("Actor1: " + str(PhysicsSchemaTools.intToSdfPath(contact_header.actor1)))
    print("Collider0: " + str(PhysicsSchemaTools.intToSdfPath(contact_header.collider0)))
    print("Collider1: " + str(PhysicsSchemaTools.intToSdfPath(contact_header.collider1)))
    print("StageId: " + str(contact_header.stage_id))
    print("Number of contacts: " + str(contact_header.num_contact_data))
  1. If I switch back to CPU then the contact sensor can detect the contact successfully.
    world = World(stage_units_in_meters=1.0, device='cpu', backend='numpy)

Related Issues

When will the deformable object have contact information supported?

Additional Context

I upgraded from version 4.2.0 and it worked using the same code under GPU.