Proximity Sensor

Python Example

First create a physics scene and a Cube first.

Then use snippet below to add sensor

1from omni.isaac.proximity_sensor import Sensor, register_sensor, clear_sensors
2import carb
3import omni
4half_extent = carb.Float3(25,25,25)
5stage = omni.usd.get_context().get_stage()
6parent = stage.GetPrimAtPath("/World/Cube")
7s = Sensor(half_extent, parent)

To retrieve sensor data, check status, and reset sensor

1[duration, distance] = s.get_data()
2[overlapping_bool, data] s.status()