ContactSensorImpl#

Fully qualified name: isaacsim::sensors::experimental::physics::ContactSensorImpl

class ContactSensorImpl : public isaacsim::sensors::experimental::physics::IContactSensor#

Public Functions

ContactSensorImpl()#
~ContactSensorImpl()#
virtual void shutdown() override#

Shut down the manager, destroying all sensors and freeing resources.

virtual int64_t createSensor(const char *primPath) override#

Create a contact sensor for the given IsaacContactSensor prim.

Finds the parent rigid body by walking up the prim hierarchy.

Note

Side effect: This method modifies the USD stage by applying PhysxSchemaPhysxContactReportAPI on the parent rigid body (with threshold=0 and sleepThreshold=0). This is required for PhysX getFullContactReport() to return contact data for this body.

Parameters:

primPath – USD path to the IsaacContactSensor prim.

Returns:

Unique sensor ID (>= 0), or -1 on failure.

virtual void removeSensor(int64_t sensorId) override#

Remove a sensor and free its resources.

Parameters:

sensorId – ID returned by createSensor().

virtual ContactSensorReading getSensorReading(
int64_t sensorId,
) override#

Get the latest reading for a sensor.

Parameters:

sensorId – ID returned by createSensor().

Returns:

Sensor reading. isValid is false if sensor is disabled or not found.

virtual void getRawContacts(
int64_t sensorId,
const ContactRawData **outData,
int32_t *outCount,
) override#

Get raw contact data for a sensor’s parent body.

Parameters:
  • sensorId – ID returned by createSensor().

  • outData – Pointer to receive the raw contact data array.

  • outCount – Pointer to receive the number of raw contact entries.