[Isaac 4.1] How can I add contact reporter?

I try to follow the contact sensor tutorial.
https://docs.omniverse.nvidia.com/isaacsim/latest/advanced_tutorials/tutorial_advanced_isaac_contact_sensor.html#isaac-sim-app-tutorial-advanced-isaac-contact-sensor
But I cannot get sensor value and following error.

2024-08-06 15:49:06 [147,630ms] [Error] [omni.isaac.sensor.plugin] *** error: /World/Cube/Contact_Sensor parent prim is missing contact report API, automatically adding contact report API, stop and play the simulation for this change to take effect

After restart, I can get the sensor value. But I cannot understand how to add contact report API manually.
How can I add contact reporter?

I found [Add] → [Physics] → [Contact Reporter].

Please add this to the document.

Thanks for pointing this out. An internal ticket has been created to update the document.

Hi, I meet the similar problem in initialize the contact sensor on my cube with the code:

        self.sensor = ContactSensor(
            prim_path="/World/random_cube/Contact_Sensor",
            name="Contact_Sensor",
            frequency=60,
            translation=np.array([0, 0, 0]),
            min_threshold=0,
            max_threshold=10000000,
            radius=1
        )
        self.sensor_prim = "/World/random_cube/Contact_Sensor"

I created my cube with:

        self._cube = world.scene.add(DynamicCuboid(prim_path="/World/random_cube",                                            
 name="fancy_cube", position=np.array([4, 2, 0.5]), scale=np.array([0.515, 0.515, 0.515]), color=np.array([4, 2, 1.0])))

I got the same error report in terminal after setting up my scene:

but the contact reporter could be found under the cube:

After I start playing, I got the results of nothing contact with the cube even the cube is on the ground or contact with different things in my scene:


This is the results from:
cs_raw_data = self._contact_sensor_interface.get_contact_sensor_raw_data(self.sensor_prim) print(str(cs_raw_data)) value = self.sensor.get_current_frame() print(value)

I am not sure whether I miss something important in the setup of scene, but now the contact sensor seems work but can’t get the correct results.

Hey @yufan.lin. Since this post has a solution, I created a new post for your issue.

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