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#
|
|
|---|---|
|
|
Singular |
Plural |
|
|
|
Removed (was unused). |
|
|
|
Removed in 3.0.0. Construct the runtime sensor directly: |
|
Removed in 3.0.0. Use the authoring object: |
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.