Physics Sensors#

The deprecated isaacsim.sensors.physics extension is replaced by isaacsim.sensors.experimental.physics. The replacement keeps the same sensor concepts (ContactSensor, IMUSensor, EffortSensor, RaycastSensor, JointStateSensor) but reshapes the Python API to mirror isaacsim.sensors.experimental.rtx — array-form transforms, no command-based creation, and a single runtime class per sensor.

Concept mapping#

isaacsim.sensors.physics (deprecated)

isaacsim.sensors.experimental.physics

omni.kit.commands.execute("IsaacSensorCreateImuSensor", ...) (and the contact/raycast equivalents)

IMU.create(path, ...), Contact.create(...), Raycast.create(...) authoring class methods, then wrap with the runtime: IMUSensor(IMU.create(...)). No command registration. Mirrors isaacsim.sensors.experimental.rtx where create() lives only on authoring classes.

Singular translation=Gf.Vec3d(x, y, z), orientation=Gf.Quatd(w, x, y, z) constructor args

Plural translations=[[x, y, z]] (or positions=... for world-frame), orientations=[[w, x, y, z]] arrays. Shape (N, 3) / (N, 4); only N=1 is supported per sensor.

position (world-frame) and translation (local-frame) accepted on the same call

positions and translations are mutually exclusive — passing both raises ValueError.

name= constructor parameter

Removed (was unused).

sensor.get_current_frame()

sensor.get_data() (returns the same dict). get_current_frame() was removed in 3.0.0.

ImuSensorBackend(path), ContactSensorBackend(path), RaycastSensorBackend(path), EffortSensorBackend(path), JointStateSensorBackend(path) (lightweight reader handles)

Removed in 3.0.0. Construct the runtime sensor directly: IMUSensor(path), ContactSensor(path), RaycastSensor(path), EffortSensor(path), JointStateSensor(path). Each runtime now owns the C++ interface and exposes both get_data() (dict) and get_sensor_reading() (raw C++ struct).

ContactSensor.set_min_threshold(v) / set_max_threshold(v) / set_radius(v) (and matching getters)

Removed in 3.0.0. Use the authoring object: sensor.contact.set_min_threshold(v), sensor.contact.get_radius(), etc.

Code examples#

IMU sensor — create and read

# Old (isaacsim.sensors.physics)
from pxr import Gf
import omni.kit.commands

_, sensor = omni.kit.commands.execute(
    "IsaacSensorCreateImuSensor",
    path="/Imu_Sensor",
    parent="/World/Cube",
    translation=Gf.Vec3d(0, 0, 0),
    orientation=Gf.Quatd(1, 0, 0, 0),
    linear_acceleration_filter_size=10,
)

frame = sensor.get_current_frame()
# New (isaacsim.sensors.experimental.physics)
import numpy as np
from isaacsim.sensors.experimental.physics import IMU, IMUSensor

sensor = IMUSensor(
    IMU.create(
        "/World/Cube/Imu_Sensor",
        translations=np.array([[0.0, 0.0, 0.0]]),
        orientations=np.array([[1.0, 0.0, 0.0, 0.0]]),
        linear_acceleration_filter_size=10,
    )
)

frame = sensor.get_data()

Contact sensor — create

# Old
omni.kit.commands.execute(
    "IsaacSensorCreateContactSensor",
    path="/Contact_Sensor",
    parent="/World/Cube",
    min_threshold=0.0,
    max_threshold=100000.0,
    translation=Gf.Vec3d(0, 0, 0),
)
# New
from isaacsim.sensors.experimental.physics import Contact

Contact.create(
    "/World/Cube/Contact_Sensor",
    min_threshold=0.0,
    max_threshold=100000.0,
    translations=[[0.0, 0.0, 0.0]],
)

Reading raw sensor data

# Old (separate Backend class for low-level reads)
from isaacsim.sensors.physics import ImuSensorBackend  # before 3.0.0

backend = ImuSensorBackend("/World/Cube/Imu")
reading = backend.get_sensor_reading(read_gravity=True)
# New (runtime sensor owns the C++ interface)
from isaacsim.sensors.experimental.physics import IMUSensor

sensor = IMUSensor("/World/Cube/Imu")
reading = sensor.get_sensor_reading(read_gravity=True)   # raw C++ struct
frame = sensor.get_data(read_gravity=True)               # structured dict

For the full per-sensor API, see IMU sensor, Contact sensor, Physics raycast sensor, Effort sensor, and Joint state sensor. For migrating from the older PhysX SDK raycast sensors (isaacsim.sensors.physx), see PhysX Lidar, PhysX Generic Sensor, and Migrating to the physics raycast sensor.