Physics Sensors#
isaacsim.sensors.experimental.physics replaces the deprecated isaacsim.sensors.physics extension. The replacement keeps the same sensor concepts (ContactSensor, IMUSensor, EffortSensor), adds two new sensors (RaycastSensor, JointStateSensor), and reshapes the Python application programming interface (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 |
|
|
|
Isaac Sim 6.0 removes this parameter (unused). |
|
|
|
Construct the runtime sensor
directly: |
|
Version 3.0.0 removes these methods. Use the authoring object: |
Runtime Behavior#
Physics sensor migration is not complete when constructors import. Validate the runtime loop as well:
Do not use deprecated
sensorPeriodand frequency-style controls as migrated timing controls. Physics sensors read on physics steps.Gate reads with the returned reading’s validity flag before consuming data.
Start or play the timeline before assuming raycast sensors have captured all authored attributes.
Re-author old rotating or generic PhysX Lidar behavior with the physics raycast schemas and ray time offsets when the scan pattern affects the downstream result.
Validate one physics step with known gravity, known contact, or known raycast geometry before comparing application-level outputs.
Code Examples#
IMU sensor — create and read
Isaac Sim 5.x:
import omni.kit.commands
from isaacsim.sensors.physics import IMUSensor
from pxr import Gf
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,
)
sensor = IMUSensor(prim_path="/World/Cube/Imu_Sensor")
frame = sensor.get_current_frame()
Isaac Sim 6.0:
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
Isaac Sim 5.x:
import omni.kit.commands
from pxr import Gf
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),
)
Isaac Sim 6.0:
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
Isaac Sim 5.x (raw readings come from the _sensor Carbonite interface):
from isaacsim.sensors.physics import _sensor
imu_interface = _sensor.acquire_imu_sensor_interface()
reading = imu_interface.get_sensor_reading("/World/Cube/Imu_Sensor", read_gravity=True)
Isaac Sim 6.0:
from isaacsim.sensors.experimental.physics import IMUSensor
sensor = IMUSensor("/World/Cube/Imu")
reading = sensor.get_sensor_reading(read_gravity=True)
frame = sensor.get_data(read_gravity=True)
For the full per-sensor API, refer to 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 PhysX Lightbeam. For timing guidance across sensor families, see Sensor Timing and RTX Lidar Asset Migration.