```{csv-table}
**Extension**: {{ extension_version }},**Documentation Generated**: {sub-ref}`today`
```

# Overview

The isaacsim.sensors.experimental.physics extension provides experimental physics-based sensors for Isaac Sim robotics applications. It offers four types of sensors - contact sensors for detecting collisions and forces, effort sensors for measuring joint torque and force, IMU sensors for capturing inertial measurements, and joint state sensors for reading full articulation DOF state - each with high-level wrapper classes and programmatic creation commands.

```{image} ../../../../source/extensions/isaacsim.sensors.experimental.physics/data/preview.png
---
align: center
---
```


## Key Components

### Contact Sensor

[ContactSensor](isaacsim.sensors.experimental.physics/isaacsim.sensors.experimental.physics.ContactSensor) provides collision detection and force measurement capabilities with configurable thresholds and radius filtering. The sensor automatically handles prim creation if it doesn't exist and applies the necessary PhysxContactReportAPI to enable contact reporting.

```python
from isaacsim.sensors.experimental.physics import ContactSensor

# Create sensor with custom parameters
sensor = ContactSensor(
    "/World/Robot/foot/contact_sensor",
    min_threshold=1.0,
    max_threshold=1000.0,
    radius=0.05
)

# Get current contact data
frame = sensor.get_current_frame()
if frame["in_contact"]:
    print(f"Contact force: {frame['force']}")
```

The sensor returns structured frame data including contact status, force magnitude, simulation time, and optional raw contact details when enabled via `add_raw_contact_data_to_frame()`.

### Effort Sensor

[EffortSensor](isaacsim.sensors.experimental.physics/isaacsim.sensors.experimental.physics.EffortSensor) measures joint effort (torque or force) from articulated bodies using the physics tensor API. It requires a valid articulation hierarchy and monitors specific degrees of freedom within joints.

```python
from isaacsim.sensors.experimental.physics import EffortSensor

# Create sensor for a robot joint
sensor = EffortSensor("/World/Robot/joint_1")

# Read joint effort
reading = sensor.get_sensor_reading()
if reading.is_valid:
    print(f"Joint torque: {reading.value}")
```

The sensor provides [EffortSensorReading](isaacsim.sensors.experimental.physics/isaacsim.sensors.experimental.physics.EffortSensorReading) objects containing validity status, simulation time, and effort values. It supports configurable data buffering and dynamic DOF name updates.

### IMU Sensor

[IMUSensor](isaacsim.sensors.experimental.physics/isaacsim.sensors.experimental.physics.IMUSensor) captures inertial measurements including linear acceleration, angular velocity, and orientation. It supports configurable rolling average filters for each measurement type to reduce noise.

```python
from isaacsim.sensors.experimental.physics import IMUSensor

# Create sensor with filtering
sensor = IMUSensor(
    "/World/Robot/body/imu",
    linear_acceleration_filter_size=5
)

# Get current IMU data
frame = sensor.get_current_frame()
print(f"Linear acceleration: {frame['linear_acceleration']}")
print(f"Angular velocity: {frame['angular_velocity']}")
print(f"Orientation: {frame['orientation']}")
```

The sensor returns structured frame data with filtered measurements and supports gravity inclusion control for acceleration readings.

### Joint State Sensor

[JointStateSensor](isaacsim.sensors.experimental.physics/isaacsim.sensors.experimental.physics.JointStateSensor) reads positions, velocities, and efforts for every degree of freedom in an articulation in a single call, analogous to a ROS2 JointState message. It is backed by the C++ IJointStateSensor plugin and requires a valid articulation root prim.

```python
from isaacsim.sensors.experimental.physics import JointStateSensor

# Create sensor for an articulation
sensor = JointStateSensor("/World/Robot")

# After playing the simulation, get full joint state
reading = sensor.get_sensor_reading()
if reading.is_valid:
    for name, pos in zip(reading.dof_names, reading.positions):
        print(f"{name}: {pos:.4f} rad")
```

The sensor returns [JointStateSensorReading](isaacsim.sensors.experimental.physics/isaacsim.sensors.experimental.physics.JointStateSensorReading) objects with validity, simulation time, DOF names, and arrays for positions (rad or m), velocities (rad/s or m/s), efforts (Nm or N), and per-DOF joint types. It supports pause/resume via the `enabled` property.

## Functionality

### Programmatic Sensor Creation

The extension provides command-based sensor creation through [IsaacSensorExperimentalCreateContactSensor](isaacsim.sensors.experimental.physics/isaacsim.sensors.experimental.physics.IsaacSensorExperimentalCreateContactSensor) and [IsaacSensorExperimentalCreateImuSensor](isaacsim.sensors.experimental.physics/isaacsim.sensors.experimental.physics.IsaacSensorExperimentalCreateImuSensor). These commands handle USD prim creation, schema application, and attribute configuration with full undo support.

### Frame-Based Data Access

All sensors implement a consistent frame-based data interface through `get_current_frame()`, returning dictionaries with measurement values, timestamps, and validity information. This standardized approach simplifies sensor data processing across different sensor types.

### Sensor Control

Each sensor supports pause/resume functionality for runtime control of data collection, and provides methods for querying and modifying sensor-specific parameters like thresholds, filter sizes, and detection radius.

## Integration

The extension integrates with isaacsim.core.experimental.prims for prim management, using XformPrim and Articulation base classes. It leverages **omni.timeline** for simulation synchronization and requires the physics simulation framework for sensor data generation.
