[isaacsim.sensors.physx] Isaac Sim PhysX Sensors#
Warning
Deprecation: Extension deprecated since Isaac Sim 6.0.0 in favor of the Experimental extension: isaacsim.sensors.experimental.physics
Version: 2.5.7
Overview#
Deprecated since version 6.0.0: This extension is deprecated in favor of isaacsim.sensors.experimental.physics.
**isaacsim.sensors.physx** provides APIs for creating and working with PhysX-based range sensors in simulation. It focuses on raycast and overlap-based sensing, including rotating lidar, generic range sensors, light beam sensors, and proximity detection zones. The extension is useful when you need simulated distance, point cloud, semantic, or overlap information from USD prims during physics simulation.
Concepts#
Range sensor prims#
Range sensors are represented as USD prims with sensor-specific attributes such as range, field of view, resolution, sampling rate, and visualization options. The command APIs create these prims and support undo by removing the created prim when undone.
Common range sensor settings include:
min_rangeandmax_rangefor valid detection distance.draw_pointsanddraw_linesfor sensor visualization.translationandorientationfor placing the sensor in the stage.
Rotating lidar frames#
RotatingLidarPhysX collects lidar data into a frame dictionary. The frame always tracks timing information such as simulation time and physics step, and you can opt in to specific data types such as depth, intensity, point cloud, azimuth, zenith, and semantics.
Only enabled data types are added to the current frame, which lets you control what the sensor collects.
Proximity zones#
ProximitySensor uses the parent prim transform and scale to define a box-shaped detection zone. It performs physics overlap checks and tracks which collision objects entered, remain inside, or exited the zone.
Each overlap entry can include metadata such as:
duration: time since the overlap began.distance: distance from the sensor origin to the overlapped geometry origin.
Functionality#
Creating range sensors#
The extension provides command classes for creating several sensor prim types:
RangeSensorCreateLidarcreates a rotating lidar sensor with field of view, resolution, rotation rate, range, visualization, yaw offset, and optional semantics.RangeSensorCreateGenericcreates a generic range sensor with a configurable sampling rate.IsaacSensorCreateLightBeamSensorcreates a light beam sensor with one or more rays, curtain length, direction axes, and range settings.RangeSensorCreatePrimis the base command used to create range sensor prims with shared attributes.
These commands are intended to be executed through **omni.kit.commands.execute**, which returns the created schema object when successful.
import omni.kit.commands
from pxr import Gf
result, lidar = omni.kit.commands.execute(
"RangeSensorCreateLidar",
path="/Lidar",
parent=None,
translation=Gf.Vec3d(0, 0, 0),
orientation=Gf.Quatd(1, 0, 0, 0),
min_range=0.4,
max_range=100.0,
draw_points=False,
draw_lines=False,
horizontal_fov=360.0,
vertical_fov=30.0,
horizontal_resolution=0.4,
vertical_resolution=4.0,
rotation_rate=20.0,
high_lod=False,
yaw_offset=0.0,
enable_semantics=False,
)
Collecting lidar data#
RotatingLidarPhysX is a BaseSensor implementation for rotating lidar data acquisition. It can create or attach to a lidar prim path, then collect data during physics steps.
You can configure the sensor with either rotation_frequency or rotation_dt, but not both.
from isaacsim.sensors.physx import RotatingLidarPhysX
lidar = RotatingLidarPhysX(
prim_path="/World/Lidar",
name="rotating_lidar_physX",
rotation_frequency=20.0,
fov=(360.0, 30.0),
resolution=(0.4, 4.0),
valid_range=(0.4, 100.0),
)
lidar.initialize()
lidar.add_depth_data_to_frame()
lidar.add_intensity_data_to_frame()
lidar.add_point_cloud_data_to_frame()
frame = lidar.get_current_frame()
The sensor can be paused and resumed without destroying it:
lidar.pause()
if lidar.is_paused():
lidar.resume()
Tracking proximity overlaps#
ProximitySensor detects overlapping physics objects using box overlap queries. The parent prim provides the sensor pose, and the parent prim scale defines the detection box dimensions.
Callbacks can be supplied for enter, inside, and exit events. Each callback receives the ProximitySensor instance.
from isaacsim.sensors.physx import ProximitySensor
def on_enter(sensor):
print("Entered:", sensor.get_entered_zones())
def on_inside(sensor):
print("Overlapping:", sensor.get_active_zones())
def on_exit(sensor):
print("Exited:", sensor.get_exited_zones())
sensor = ProximitySensor(
parent=my_sensor_prim,
callback_fns=[on_enter, on_inside, on_exit],
exclusions=["/World/IgnoreThisPrim"],
)
sensor.update()
overlapping, data = sensor.status()
print(overlapping)
print(data)
The proximity sensor also provides direct accessors for active, entered, and exited zones:
if sensor.is_overlapping():
print(sensor.get_data())
sensor.reset()
Key Components#
RotatingLidarPhysX#
RotatingLidarPhysX provides rotating lidar simulation with configurable field of view, resolution, rotation rate, and valid range. It supports optional frame data channels including depth, linear depth, intensity, zenith, azimuth, point cloud, and semantics.
It also includes visualization controls:
lidar.enable_visualization(
high_lod=False,
draw_points=True,
draw_lines=True,
)
lidar.disable_visualization()
RangeSensorCreateLidar#
RangeSensorCreateLidar creates a lidar sensor prim through the command system. It is the main creation command when you need a lidar prim with explicit horizontal and vertical field of view, resolution, rotation rate, and optional semantic output.
RangeSensorCreateGeneric#
RangeSensorCreateGeneric creates a generic range sensor prim. Use it when you need a configurable sampling rate but do not need the rotating lidar-specific settings.
import omni.kit.commands
from pxr import Gf
result, sensor = omni.kit.commands.execute(
"RangeSensorCreateGeneric",
path="/GenericSensor",
parent=None,
translation=Gf.Vec3d(0, 0, 0),
orientation=Gf.Quatd(1, 0, 0, 0),
min_range=0.4,
max_range=100.0,
draw_points=False,
draw_lines=False,
sampling_rate=60,
)
IsaacSensorCreateLightBeamSensor#
IsaacSensorCreateLightBeamSensor creates a light beam sensor prim. It supports single-ray and multi-ray style setups through num_rays, curtain_length, forward_axis, and curtain_axis.
import omni.kit.commands
from pxr import Gf
result, light_beam = omni.kit.commands.execute(
"IsaacSensorCreateLightBeamSensor",
path="/LightBeam_Sensor",
parent=None,
translation=Gf.Vec3d(0, 0, 0),
orientation=Gf.Quatd(1, 0, 0, 0),
num_rays=1,
curtain_length=0.0,
forward_axis=Gf.Vec3d(1, 0, 0),
curtain_axis=Gf.Vec3d(0, 1, 0),
min_range=0.4,
max_range=100.0,
draw_points=False,
draw_lines=False,
)
ProximitySensor#
ProximitySensor is used for overlap-based detection rather than raycast range measurement. It is useful for trigger volumes, detection zones, and workflows where the important event is whether another physics object is inside a region.
The sensor tracks state transitions across updates, so callers can distinguish newly entered objects, currently active overlaps, and objects that just exited.
Relationships#
RotatingLidarPhysX inherits from **isaacsim.core.api.sensors.base_sensor.BaseSensor**, so it follows the same sensor pattern for initialization, reset behavior, and frame access.
The range sensor creation APIs are **omni.kit.commands.Command** classes. They are executed through **omni.kit.commands.execute** and provide do and undo behavior for creating and removing sensor prims.
The proximity workflow uses USD prims for sensor placement and PhysX overlap queries for detection. The parent Usd.Prim defines the proximity sensor transform, while its scale defines the query box size.
The extension is backed by a Carbonite C++ plugin and a _range_sensor Python binding module. The plugin exposes the underlying sensor query interfaces (LidarSensorInterface, GenericSensorInterface, and LightBeamSensorInterface) that the Python sensor classes acquire to read raycast results during simulation.
Enable Extension#
The extension can be enabled (if not already) in one of the following ways:
Define the next entry as an application argument from a terminal.
APP_SCRIPT.(sh|bat) --enable isaacsim.sensors.physx
Define the next entry under [dependencies] in an experience (.kit) file or an extension configuration (extension.toml) file.
[dependencies]
"isaacsim.sensors.physx" = {}
Open the Window > Extensions menu in a running application instance and search for isaacsim.sensors.physx.
Then, toggle the enable control button if it is not already active.
Commands#
Public command API for module isaacsim.sensors.physx:
IsaacSensorCreateLightBeamSensor#
Command class to create a light beam sensor.
Arguments#
path: Path for the new prim.
parent: Parent prim path.
translation: Translation vector for the prim.
orientation: Orientation quaternion for the prim.
num_rays: Number of rays for the light beam sensor.
curtain_length: Length of the curtain for multi-ray sensors.
forward_axis: Forward direction axis.
curtain_axis: Curtain direction axis.
min_range: Minimum range of the sensor.
max_range: Maximum range of the sensor.
draw_points: Whether to draw points for visualization.
draw_lines: Whether to draw lines for visualization.
Usage#
import omni.kit.commands
from pxr import Gf
# Create a light beam sensor with multiple rays.
# Note: curtain_length must be greater than 0 when num_rays > 1.
success, light_beam_sensor = omni.kit.commands.execute(
"IsaacSensorCreateLightBeamSensor",
path="/World/LightBeam_Sensor",
parent=None,
translation=Gf.Vec3d(0.0, 0.0, 1.0),
orientation=Gf.Quatd(1.0, 0.0, 0.0, 0.0),
num_rays=5,
curtain_length=2.0,
forward_axis=Gf.Vec3d(1.0, 0.0, 0.0),
curtain_axis=Gf.Vec3d(0.0, 0.0, 1.0),
min_range=0.1,
max_range=10.0,
draw_points=True,
draw_lines=True,
)
RangeSensorCreateGeneric#
Command class to create a generic range sensor.
Typical usage example:
.. code-block:: python
result, prim = omni.kit.commands.execute( “RangeSensorCreateGeneric”, path=”/GenericSensor”, parent=None, translation=Gf.Vec3d(0, 0, 0), orientation=Gf.Quatd(1, 0, 0, 0), min_range=0.4, max_range=100.0, draw_points=False, draw_lines=False, sampling_rate=60, )
Arguments#
path: Path for the new prim.
parent: Parent prim path.
translation: Translation vector for the prim.
orientation: Orientation quaternion for the prim.
min_range: Minimum range of the sensor.
max_range: Maximum range of the sensor.
draw_points: Whether to draw points for visualization.
draw_lines: Whether to draw lines for visualization.
sampling_rate: Sampling rate of the sensor in Hz.
Usage#
import omni.kit.commands
from pxr import Gf
# Create a generic range sensor prim at /World/GenericSensor.
# The command returns (success, schema_object).
success, generic_sensor = omni.kit.commands.execute(
"RangeSensorCreateGeneric",
path="/World/GenericSensor",
parent=None,
translation=Gf.Vec3d(0.0, 0.0, 1.0),
orientation=Gf.Quatd(1.0, 0.0, 0.0, 0.0),
min_range=0.4,
max_range=50.0,
draw_points=True,
draw_lines=False,
sampling_rate=60,
)
RangeSensorCreateLidar#
Command class to create a lidar sensor.
Typical usage example:
.. code-block:: python
result, prim = omni.kit.commands.execute( “RangeSensorCreateLidar”, path=”/Lidar”, parent=None, translation=Gf.Vec3d(0, 0, 0), orientation=Gf.Quatd(1, 0, 0, 0), min_range=0.4, max_range=100.0, draw_points=False, draw_lines=False, horizontal_fov=360.0, vertical_fov=30.0, horizontal_resolution=0.4, vertical_resolution=4.0, rotation_rate=20.0, high_lod=False, yaw_offset=0.0, enable_semantics=False, )
Arguments#
path: Path for the new lidar sensor prim.
parent: Parent prim path.
translation: Translation vector for the lidar sensor.
orientation: Orientation quaternion for the lidar sensor.
min_range: Minimum range of the sensor.
max_range: Maximum range of the sensor.
draw_points: Whether to draw points for visualization.
draw_lines: Whether to draw lines for visualization.
horizontal_fov: Horizontal field of view in degrees.
vertical_fov: Vertical field of view in degrees.
horizontal_resolution: Horizontal resolution in degrees per sample.
vertical_resolution: Vertical resolution in degrees per sample.
rotation_rate: Rotation rate of the sensor in Hz.
high_lod: Whether to enable high level of detail rendering.
yaw_offset: Yaw offset in degrees.
enable_semantics: Whether to enable semantic segmentation.
Usage#
import omni.kit.commands
from pxr import Gf
# Create a LiDAR range sensor prim.
success, lidar_schema = omni.kit.commands.execute(
"RangeSensorCreateLidar",
path="/World/Lidar",
parent=None,
translation=Gf.Vec3d(0.0, 0.0, 1.0),
orientation=Gf.Quatd(1.0, 0.0, 0.0, 0.0),
min_range=0.4,
max_range=100.0,
draw_points=True,
draw_lines=False,
horizontal_fov=360.0,
vertical_fov=30.0,
horizontal_resolution=0.4,
vertical_resolution=4.0,
rotation_rate=20.0,
high_lod=False,
yaw_offset=0.0,
enable_semantics=False,
)
if success and lidar_schema:
lidar_prim = lidar_schema.GetPrim()
print(f"Created LiDAR sensor at: {lidar_prim.GetPath()}")
RangeSensorCreatePrim#
Base command for creating range sensor prims.
This command is used to create each range sensor prim and handles undo operations so that individual prim commands don’t have to implement their own undo logic.
Arguments#
path: Path for the new prim.
parent: Parent prim path.
schema_type: Schema type to use for the prim.
translation: Translation vector for the prim.
orientation: Orientation quaternion for the prim.
visibility: Whether the prim is visible.
min_range: Minimum range of the sensor.
max_range: Maximum range of the sensor.
draw_points: Whether to draw points for visualization.
draw_lines: Whether to draw lines for visualization.
Usage#
import omni.kit.commands
import omni.isaac.RangeSensorSchema as RangeSensorSchema
from pxr import Gf
# Create a base range sensor prim using the Lidar schema.
success, sensor_schema = omni.kit.commands.execute(
"RangeSensorCreatePrim",
path="/World/MyRangeSensor",
parent="",
schema_type=RangeSensorSchema.Lidar,
translation=Gf.Vec3d(0.0, 0.0, 1.0),
orientation=Gf.Quatd(1.0, 0.0, 0.0, 0.0),
visibility=False,
min_range=0.4,
max_range=100.0,
draw_points=True,
draw_lines=False,
)
if success and sensor_schema:
prim = sensor_schema.GetPrim()
print(f"Created range sensor prim at: {prim.GetPath()}")
Python API#
Commands
Base command for creating range sensor prims. |
|
Command class to create a LiDAR sensor. |
|
Command class to create a generic range sensor. |
|
Command class to create a light beam sensor. |
Sensors
A physics-based proximity sensor that detects overlapping objects using PhysX collision queries. |
|
A rotating lidar sensor using PhysX simulation for range detection. |
Commands#
- class RangeSensorCreatePrim(*args: Any, **kwargs: Any)#
Bases:
CommandBase command for creating range sensor prims.
This command is used to create each range sensor prim and handles undo operations so that individual prim commands do not have to implement their own undo logic.
- Parameters:
path – Path for the new prim.
parent – Parent prim path.
schema_type – Schema type to use for the prim.
translation – Translation vector for the prim.
orientation – Orientation quaternion for the prim.
visibility – Whether the prim is visible.
min_range – Minimum range of the sensor.
max_range – Maximum range of the sensor.
draw_points – Whether to draw points for visualization.
draw_lines – Whether to draw lines for visualization.
- class RangeSensorCreateLidar(*args: Any, **kwargs: Any)#
Bases:
CommandCommand class to create a LiDAR sensor.
Typical usage example:
result, prim = omni.kit.commands.execute( "RangeSensorCreateLidar", path="/Lidar", parent=None, translation=Gf.Vec3d(0, 0, 0), orientation=Gf.Quatd(1, 0, 0, 0), min_range=0.4, max_range=100.0, draw_points=False, draw_lines=False, horizontal_fov=360.0, vertical_fov=30.0, horizontal_resolution=0.4, vertical_resolution=4.0, rotation_rate=20.0, high_lod=False, yaw_offset=0.0, enable_semantics=False, )
- Parameters:
path – Path for the new LiDAR sensor prim.
parent – Parent prim path.
translation – Translation vector for the LiDAR sensor.
orientation – Orientation quaternion for the LiDAR sensor.
min_range – Minimum range of the sensor.
max_range – Maximum range of the sensor.
draw_points – Whether to draw points for visualization.
draw_lines – Whether to draw lines for visualization.
horizontal_fov – Horizontal field of view in degrees.
vertical_fov – Vertical field of view in degrees.
horizontal_resolution – Horizontal resolution in degrees per sample.
vertical_resolution – Vertical resolution in degrees per sample.
rotation_rate – Rotation rate of the sensor in Hz.
high_lod – Whether to enable high level of detail rendering.
yaw_offset – Yaw offset in degrees.
enable_semantics – Whether to enable semantic segmentation.
- class RangeSensorCreateGeneric(*args: Any, **kwargs: Any)#
Bases:
CommandCommand class to create a generic range sensor.
Typical usage example:
result, prim = omni.kit.commands.execute( "RangeSensorCreateGeneric", path="/GenericSensor", parent=None, translation=Gf.Vec3d(0, 0, 0), orientation=Gf.Quatd(1, 0, 0, 0), min_range=0.4, max_range=100.0, draw_points=False, draw_lines=False, sampling_rate=60, )
- Parameters:
path – Path for the new prim.
parent – Parent prim path.
translation – Translation vector for the prim.
orientation – Orientation quaternion for the prim.
min_range – Minimum range of the sensor.
max_range – Maximum range of the sensor.
draw_points – Whether to draw points for visualization.
draw_lines – Whether to draw lines for visualization.
sampling_rate – Sampling rate of the sensor in Hz.
- class IsaacSensorCreateLightBeamSensor(*args: Any, **kwargs: Any)#
Bases:
CommandCommand class to create a light beam sensor.
- Parameters:
path – Path for the new prim.
parent – Parent prim path.
translation – Translation vector for the prim.
orientation – Orientation quaternion for the prim.
num_rays – Number of rays for the light beam sensor.
curtain_length – Length of the curtain for multi-ray sensors.
forward_axis – Forward direction axis.
curtain_axis – Curtain direction axis.
min_range – Minimum range of the sensor.
max_range – Maximum range of the sensor.
draw_points – Whether to draw points for visualization.
draw_lines – Whether to draw lines for visualization.
**kwargs – Additional keyword arguments.
Sensors#
- class ProximitySensor( )#
Bases:
objectA physics-based proximity sensor that detects overlapping objects using PhysX collision queries.
The sensor performs box overlap queries to detect when other physics objects enter, remain within, or exit its detection zone. It provides callback functionality for handling entry, ongoing overlap, and exit events, along with tracking overlap duration and distance measurements.
The sensor uses the parent prim’s scale property to define the detection box size and performs continuous overlap detection through the PhysX scene query interface. It maintains internal state to track zone transitions and provides detailed overlap metadata including duration and distance.
- Parameters:
parent – The USD prim that defines the sensor’s position, orientation, and scale. The prim’s transform determines the sensor’s world position and the scale property defines the detection box dimensions.
callback_fns – Three callback functions [on_enter, on_inside, on_exit]. Each callback receives the sensor instance as a parameter. Callbacks can be None to disable specific callbacks.
exclusions – Prim paths to exclude from overlap detection. Objects at these paths will not trigger sensor events or appear in overlap data.
- check_for_overlap() int#
Performs a physics overlap box query to detect collisions.
Uses the parent prim’s transform and scale to create a box overlap query that detects collisions with other geometry in the physics scene.
- Returns:
Number of hits from the overlap query.
- get_active_zones() list[str]#
Returns a list of the prim paths of all the collision meshes the tracker is inside of.
- Returns:
Prim paths as strings.
- get_data() dict[str, dict[str, float]]#
Returns dictionary of overlapped geometry and respective metadata.
key: prim_path of overlapped geometry val: dictionary of metadata:
“duration”: float of time since overlap “distance”: distance from origin of tracker to origin of overlapped geometry
- Returns:
Overlapped geometry and metadata.
- get_entered_zones() list[str]#
Returns a list of the prim paths of all the collision meshes the tracker just entered.
- Returns:
Prim paths as strings.
- get_exited_zones() list[str]#
Prim paths of all the collision meshes the tracker just exited.
- Returns:
Prim paths as strings.
- is_overlapping() bool#
Whether the proximity sensor is currently overlapping with any geometry.
- Returns:
True if overlapping with any collision meshes.
- report_hit(hit: object) bool#
Reports a hit from the physics overlap query.
Processes a collision hit by adding the collided prim to active zones and starting a timer for duration tracking.
- Parameters:
hit – The physics hit result from the overlap query.
- Returns:
True to continue the physics query.
- reset() None#
Resets the proximity sensor to its initial state.
Clears all active zones, entered zones, exited zones, and overlap data, and sets the internal overlapping state to false.
- status() tuple[bool, dict[str, dict[str, float]]]#
Current overlapping status and data.
- Returns:
A tuple containing the overlapping boolean state and the overlap data dictionary.
- to_string() str#
String representation of the proximity sensor state.
- Returns:
A formatted string containing the tracker path, name, and active zone information with duration and distance details.
- class RotatingLidarPhysX(
- prim_path: str,
- name: str = 'rotating_lidar_physX',
- rotation_frequency: float | None = None,
- rotation_dt: float | None = None,
- position: ndarray | None = None,
- translation: ndarray | None = None,
- orientation: ndarray | None = None,
- fov: tuple[float, float] | None = None,
- resolution: tuple[float, float] | None = None,
- valid_range: tuple[float, float] | None = None,
Bases:
BaseSensorA rotating lidar sensor using PhysX simulation for range detection.
This sensor provides rotating lidar functionality with configurable field of view, resolution, and rotation frequency. It captures depth, intensity, point cloud, and other lidar data types during simulation. The sensor can create a new lidar prim at the specified path or use an existing one.
- Parameters:
prim_path – Path to the lidar prim in the USD stage.
name – Name identifier for the sensor.
rotation_frequency – Rotation frequency of the lidar in Hz. Cannot be specified together with rotation_dt.
rotation_dt – Time step for rotation in seconds. Cannot be specified together with rotation_frequency.
position – Position of the sensor in 3D space.
translation – Translation offset for the sensor.
orientation – Orientation of the sensor as a quaternion or rotation matrix.
fov – Field of view as (horizontal_fov, vertical_fov) in degrees.
resolution – Resolution as (horizontal_resolution, vertical_resolution) in degrees.
valid_range – Valid detection range as (min_range, max_range) in meters.
- Raises:
Exception – If both rotation_frequency and rotation_dt are specified.
- add_azimuth_data_to_frame() None#
Adds azimuth angle data to the current lidar frame for collection during data acquisition.
- add_depth_data_to_frame() None#
Enable depth data collection in the sensor frame.
Adds a ‘depth’ key to the current frame dictionary for storing depth measurements.
- add_intensity_data_to_frame() None#
Enable intensity data collection in the sensor frame.
Adds an ‘intensity’ key to the current frame dictionary for storing intensity measurements.
- add_linear_depth_data_to_frame() None#
Enable linear depth data collection in the sensor frame.
Adds a ‘linear_depth’ key to the current frame dictionary for storing linear depth measurements.
- add_point_cloud_data_to_frame() None#
Adds point cloud data to the current lidar frame for collection during data acquisition.
- add_semantics_data_to_frame() None#
Adds semantic segmentation data to the current lidar frame for collection during data acquisition.
Automatically enables semantics on the lidar sensor if not already enabled.
- add_zenith_data_to_frame() None#
Adds zenith angle data to the current lidar frame for collection during data acquisition.
- apply_visual_material(
- visual_material: VisualMaterial,
- weaker_than_descendants: bool = False,
Apply visual material to the held prim and optionally its descendants.
- Parameters:
visual_material – Visual material to be applied to the held prim. Currently supports PreviewSurface, OmniPBR and OmniGlass.
weaker_than_descendants – True if the material shouldn’t override the descendants materials, otherwise False.
Example:
>>> from isaacsim.core.api.materials import OmniGlass >>> >>> # create a dark-red glass visual material >>> material = OmniGlass( ... prim_path="/World/material/glass", # path to the material prim to create ... ior=1.25, ... depth=0.001, ... thin_walled=False, ... color=np.array([0.5, 0.0, 0.0]) ... ) >>> prim.apply_visual_material(material)
- disable_visualization() None#
Disables point cloud and line visualization for the lidar sensor data.
- enable_visualization(
- high_lod: bool = False,
- draw_points: bool = True,
- draw_lines: bool = True,
Enables visualization of the lidar sensor data.
- Parameters:
high_lod – Whether to use high level of detail for visualization.
draw_points – Whether to draw point cloud visualization.
draw_lines – Whether to draw line visualization.
- get_applied_visual_material() VisualMaterial#
Return the current applied visual material if it was applied using apply_visual_material or is one of the following materials that was already applied before: PreviewSurface, OmniPBR and OmniGlass.
- Returns:
The current applied visual material if its type is currently supported.
Example:
>>> # given a visual material applied >>> prim.get_applied_visual_material() <isaacsim.core.api.materials.omni_glass.OmniGlass object at 0x7f36263106a0>
- get_current_frame() dict#
Current frame data from the lidar sensor.
- Returns:
Current frame data with keys like ‘time’, ‘physics_step’, and any enabled data types.
- get_default_state() XFormPrimState#
Get the default prim states (spatial position and orientation).
- Returns:
An object that contains the default state of the prim (position and orientation).
Example:
>>> state = prim.get_default_state() >>> state <isaacsim.core.utils.types.XFormPrimState object at 0x7f33addda650> >>> >>> state.position [-4.5299529e-08 -1.8347054e-09 -2.8610229e-08] >>> state.orientation [1. 0. 0. 0.]
- get_fov() tuple[float, float]#
Field of view of the lidar sensor.
- Returns:
Horizontal and vertical field of view in degrees as (horizontal_fov, vertical_fov).
- get_local_pose() tuple[ndarray, ndarray]#
Get prim’s pose with respect to the local frame (the prim’s parent frame).
- Returns:
First index is the position in the local frame (with shape (3, )). Second index is quaternion orientation (with shape (4, )) in the local frame.
Example:
>>> # if the prim is in position (1.0, 0.5, 0.0) with respect to the world frame >>> position, orientation = prim.get_local_pose() >>> position [0. 0. 0.] >>> orientation [0. 0. 0.]
- get_local_scale() ndarray#
Get prim’s scale with respect to the local frame (the parent’s frame).
- Returns:
Scale applied to the prim’s dimensions in the local frame. shape is (3, ).
Example:
>>> prim.get_local_scale() [1. 1. 1.]
- get_num_cols() int#
Total number of columns in the lidar sensor.
- Returns:
The total number of columns.
- get_num_cols_in_last_step() int#
Number of columns processed in the last physics step.
- Returns:
The number of columns that were ticked in the last step.
- get_num_rows() int#
Number of vertical resolution rows in the lidar sensor.
- Returns:
The number of rows configured for the lidar sensor.
- get_resolution() float#
Resolution of the lidar sensor.
- Returns:
Horizontal and vertical resolution in degrees per sample as (horizontal_resolution, vertical_resolution).
- get_rotation_frequency() int#
Rotation frequency of the lidar sensor in rotations per second.
- Returns:
The current rotation rate.
- get_valid_range() tuple[float, float]#
Valid range of the lidar sensor.
- Returns:
Tuple of (minimum_range, maximum_range) in meters.
- get_visibility() bool#
Get the visibility of the prim in stage.
- Returns:
True if the prim is visible in stage. False otherwise.
Example:
>>> # get the visible state of a visible prim on the stage >>> prim.get_visibility() True
- get_world_pose() tuple[ndarray, ndarray]#
Get prim’s pose with respect to the world’s frame.
- Returns:
First index is the position in the world frame (with shape (3, )). Second index is quaternion orientation (with shape (4, )) in the world frame.
Example:
>>> # if the prim is in position (1.0, 0.5, 0.0) with respect to the world frame >>> position, orientation = prim.get_world_pose() >>> position [1. 0.5 0. ] >>> orientation [1. 0. 0. 0.]
- get_world_scale() ndarray#
Get prim’s scale with respect to the world’s frame.
- Returns:
Scale applied to the prim’s dimensions in the world frame. shape is (3, ).
Example:
>>> prim.get_world_scale() [1. 1. 1.]
- initialize(physics_sim_view: object = None) None#
Initialize the rotating lidar sensor with physics simulation callbacks.
Sets up physics step callbacks for data acquisition and event observers for stage and timeline events.
- Parameters:
physics_sim_view – Physics simulation view for initialization.
- is_paused() bool#
Pause state of the lidar sensor.
- Returns:
True if the sensor is paused, False if it is actively collecting data.
- is_semantics_enabled() bool#
Whether semantic data collection is enabled for the lidar sensor.
- Returns:
True if semantics are enabled, False otherwise.
- is_valid() bool#
Check if the prim path has a valid USD Prim at it.
- Returns:
True if the current prim path corresponds to a valid prim in stage. False otherwise.
Example:
>>> # given an existing and valid prim >>> prims.is_valid() True
- is_visual_material_applied() bool#
Check if there is a visual material applied.
- Returns:
True if there is a visual material applied. False otherwise.
Example:
>>> # given a visual material applied >>> prim.is_visual_material_applied() True
- pause() None#
Pauses lidar data acquisition.
Stops the sensor from collecting new data while keeping it initialized.
- post_reset() None#
Reset the lidar sensor state after simulation reset.
Resets time and physics step counters to zero.
- remove_azimuth_data_from_frame() None#
Removes azimuth angle data from the current lidar frame to stop collecting this data type.
- remove_depth_data_from_frame() None#
Disable depth data collection in the sensor frame.
Removes the ‘depth’ key from the current frame dictionary.
- Raises:
KeyError – If depth data collection is not enabled in the current frame.
- remove_intensity_data_from_frame() None#
Disable intensity data collection in the sensor frame.
Removes the ‘intensity’ key from the current frame dictionary.
- Raises:
KeyError – If intensity data collection is not enabled in the current frame.
- remove_linear_depth_data_from_frame() None#
Disable linear depth data collection in the sensor frame.
Removes the ‘linear_depth’ key from the current frame dictionary.
- Raises:
KeyError – If linear depth data collection is not enabled in the current frame.
- remove_point_cloud_data_from_frame() None#
Removes point cloud data from the current lidar frame to stop collecting this data type.
- remove_semantics_data_from_frame() None#
Removes semantic segmentation data from the current lidar frame and disables semantics on the sensor.
- remove_zenith_data_from_frame() None#
Removes zenith angle data from the current lidar frame to stop collecting this data type.
- resume() None#
Resumes lidar data acquisition.
Unpauses the sensor to continue collecting data during physics steps.
- set_default_state( ) None#
Set the default state of the prim (position and orientation), that will be used after each reset.
- Parameters:
position – Position in the world frame of the prim. shape is (3, ). If None, the position is left unchanged.
orientation – Quaternion orientation in the world frame of the prim. Quaternion is scalar-first (w, x, y, z). shape is (4, ). If None, the orientation is left unchanged.
Example:
>>> # configure default state >>> prim.set_default_state(position=np.array([1.0, 0.5, 0.0]), orientation=np.array([1, 0, 0, 0])) >>> >>> # set default states during post-reset >>> prim.post_reset()
- set_fov(value: tuple[float, float]) None#
Sets the field of view for the lidar sensor.
- Parameters:
value – Horizontal and vertical field of view in degrees as (horizontal_fov, vertical_fov).
- set_local_pose( ) None#
Set prim’s pose with respect to the local frame (the prim’s parent frame).
Warning
This method will change (teleport) the prim pose immediately to the indicated value
- Parameters:
translation – Translation in the local frame of the prim (with respect to its parent prim). shape is (3, ).
orientation – Quaternion orientation in the local frame of the prim. quaternion is scalar-first (w, x, y, z). shape is (4, ).
Hint
This method belongs to the methods used to set the prim state
Example:
>>> prim.set_local_pose(translation=np.array([1.0, 0.5, 0.0]), orientation=np.array([1., 0., 0., 0.]))
- set_local_scale(
- scale: Sequence[float] | None,
Set prim’s scale with respect to the local frame (the prim’s parent frame).
- Parameters:
scale – Scale to be applied to the prim’s dimensions. shape is (3, ).
Example:
>>> # scale prim 10 times smaller >>> prim.set_local_scale(np.array([0.1, 0.1, 0.1]))
- set_resolution(value: float) None#
Sets the resolution for the lidar sensor.
- Parameters:
value – Horizontal and vertical resolution in degrees per sample as (horizontal_resolution, vertical_resolution).
- set_rotation_frequency(value: int) None#
Sets the rotation frequency of the lidar sensor.
- Parameters:
value – Rotation rate in rotations per second.
- set_valid_range(value: tuple[float, float]) None#
Sets the valid range of the lidar sensor.
- Parameters:
value – Tuple of (minimum_range, maximum_range) in meters.
- set_visibility(visible: bool) None#
Set the visibility of the prim in stage.
- Parameters:
visible – Flag to set the visibility of the USD prim in stage.
Example:
>>> # make prim not visible in the stage >>> prim.set_visibility(visible=False)
- set_world_pose( ) None#
Set prim’s pose with respect to the world’s frame.
Warning
This method will change (teleport) the prim pose immediately to the indicated value
- Parameters:
position – Position in the world frame of the prim. shape is (3, ).
orientation – Quaternion orientation in the world frame of the prim. quaternion is scalar-first (w, x, y, z). shape is (4, ).
Hint
This method belongs to the methods used to set the prim state
Example:
>>> prim.set_world_pose(position=np.array([1.0, 0.5, 0.0]), orientation=np.array([1., 0., 0., 0.]))
- property name: str | None#
Name given to the prim when instantiating it.
- Returns:
Name given to the prim when instantiating it. Otherwise None.
- property non_root_articulation_link: bool#
Whether the prim is a non-root articulation link.
- Returns:
True if the prim itself is a non-root link.
Example:
>>> # for a wrapped articulation (where the root prim has the Physics Articulation Root property applied) >>> prim.non_root_articulation_link False
- property prim: pxr.Usd.Prim#
USD Prim object that this object holds.
- Returns:
USD Prim object that this object holds.
- property prim_path: str#
Prim path in the stage.
- Returns:
Prim path in the stage.
Omnigraph Nodes#
The extension exposes the following Omnigraph nodes: