Range Based Sensor Simulation [omni.isaac.range_sensor]

This extension provides a set simulated range based sensors like lidar, ultrasonic, generic and interfaces to access them in the simulator.

Lidar Sensor

This submodule provides an interface to a simulated lidar sensor. A simplified command is provided to create a lidar sensor in the stage:

commands.RangeSensorCreateLidar(parent=None, min_range: float = 0.4, max_range: float = 100.0, draw_points: bool = False, draw_lines: bool = False, horizontal_fov: float = 360.0, vertical_fov: float = 30.0, horizontal_resolution: float = 0.4, vertical_resolution: float = 4.0, rotation_rate: float = 20.0, high_lod: bool = False, yaw_offset: float = 0.0, enable_semantics: bool = False)

Commands class to create a lidar sensor.

Typical usage example:

result, prim = omni.kit.commands.execute(
    "RangeSensorCreateLidar",
    path="/Lidar",
    parent=None,
    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,
)

Once a lidar sensor is in the stage you can use this interface to interact with the simulated lidar data. You must first call the acquire interface function. It is also recommended to use the is_lidar_sensor function to check if a lidar sensor exists at the given USD path

from omni.isaac.range_sensor._range_sensor import acquire_lidar_sensor_interface
lidar_sensor_interface = acquire_lidar_sensor_interface()
if lidar_sensor_interface.is_lidar_sensor("/World/Lidar"):
    print("lidar sensor is valid")
_range_sensor.acquire_lidar_sensor_interface(plugin_name: str = None, library_path: str = None) omni.isaac.range_sensor._range_sensor.LidarSensorInterface
_range_sensor.release_lidar_sensor_interface(arg0: omni.isaac.range_sensor._range_sensor.LidarSensorInterface) None
class LidarSensorInterface
get_azimuth_data(self: omni.isaac.range_sensor._range_sensor.LidarSensorInterface, arg0: str) object
Parameters

arg0 (str) – USD path to sensor as a string

Returns

The azimuth angle in radians for each column

Return type

numpy.ndarray

get_depth_data(self: omni.isaac.range_sensor._range_sensor.LidarSensorInterface, arg0: str) object
Parameters

arg0 (str) – USD path to sensor as a string

Returns

The distance from the sensor to the hit for each beam in uint16 and scaled by min and max distance

Return type

numpy.ndarray

get_intensity_data(self: omni.isaac.range_sensor._range_sensor.LidarSensorInterface, arg0: str) object
Parameters

arg0 (str) – USD path to sensor as a string

Returns

The observed specular intensity of each beam, 255 if hit, 0 if not

Return type

numpy.ndarray

get_linear_depth_data(self: omni.isaac.range_sensor._range_sensor.LidarSensorInterface, arg0: str) object
Parameters

arg0 (str) – USD path to sensor as a string

Returns

The distance from the sensor to the hit for each beam in meters

Return type

numpy.ndarray

get_num_cols(self: omni.isaac.range_sensor._range_sensor.LidarSensorInterface, arg0: str) int
Parameters

arg0 (str) – USD path to sensor as a string

Returns

The number of vertical scans of the sensor, 0 if error occurred

Return type

int

get_num_cols_ticked(self: omni.isaac.range_sensor._range_sensor.LidarSensorInterface, arg0: str) int
Parameters

arg0 (str) – USD path to sensor as a string

Returns

The number of vertical scans the sensor completed in the last simulation step, 0 if error occurred. Generally only useful for lidars with a non-zero rotation speed

Return type

int

get_num_rows(self: omni.isaac.range_sensor._range_sensor.LidarSensorInterface, arg0: str) int
Parameters

arg0 (str) – USD path to sensor as a string

Returns

The number of horizontal scans of the sensor, 0 if error occurred

Return type

int

get_point_cloud_data(self: omni.isaac.range_sensor._range_sensor.LidarSensorInterface, arg0: str) object
Parameters

arg0 (str) – USD path to sensor as a string

Returns

The hit position in xyz relative to the sensor origin, not accounting for individual ray offsets

Return type

numpy.ndarray

get_prim_data(self: omni.isaac.range_sensor._range_sensor.LidarSensorInterface, arg0: str) object
Parameters

arg0 (str) – USD path to sensor as a string

Returns

The prim path of the hit for each beam as a string

Return type

list

get_semantic_data(self: omni.isaac.range_sensor._range_sensor.LidarSensorInterface, arg0: str) object
[Deprecated]
Args:

arg0 (str): USD path to sensor as a string

Returns:

numpy.ndarray: The semantic id of the hit for each beam in uint16

get_zenith_data(self: omni.isaac.range_sensor._range_sensor.LidarSensorInterface, arg0: str) object
Parameters

arg0 (str) – USD path to sensor as a string

Returns

The zenith angle in radians for each row

Return type

numpy.ndarray

is_lidar_sensor(self: omni.isaac.range_sensor._range_sensor.LidarSensorInterface, arg0: str) bool
Parameters

arg0 (str) – USD path to sensor as a string

Returns

True if a sensor exists at the give path, False otherwise

Return type

bool

Ultrasonic Sensor

Warning

The ultrasonic sensor is deprecated and will be removed in a future release.

This submodule provides an interface to a simulated ultrasonic sensor.

commands.RangeSensorCreateUltrasonicArray(parent=None, min_range: float = 0.4, max_range: float = 100.0, draw_points: bool = False, draw_lines: bool = False, horizontal_fov: float = 360.0, vertical_fov: float = 30.0, rotation_rate: float = 20.0, horizontal_resolution: float = 0.4, vertical_resolution: float = 4.0, num_bins: int = 224, use_brdf: bool = False, use_uss_materials: bool = False, emitter_prims: [] = [], firing_group_prims: [] = [])

Commands class to create an ultrasonic array.

Typical usage example:

result, prim = omni.kit.commands.execute(
    "RangeSensorCreateUltrasonicArray",
    path="/UltrasonicArray",
    parent=None,
    min_range=0.4,
    max_range=3.0,
    draw_points=False,
    draw_lines=False,
    horizontal_fov=15.0,
    vertical_fov=10.0,
    horizontal_resolution=0.5,
    vertical_resolution=0.5,
    num_bins=224,
    use_brdf: bool = False,
    use_uss_materials: bool = False,
    emitter_prims=[],
    firing_group_prims=[],
)
commands.RangeSensorCreateUltrasonicEmitter(parent=None, per_ray_intensity: float = 1.0, yaw_offset: float = 0.0, adjacency_list: [] = [])

Commands class to create an ultrasonic emitter.

Typical usage example:

result, prim = omni.kit.commands.execute(
    "RangeSensorCreateUltrasonicEmitter",
    path="/UltrasonicEmitter",
    parent=None,
    per_ray_intensity=1.0,
    yaw_offset=0.0,
    adjacency_list=[],
)
commands.RangeSensorCreateUltrasonicFiringGroup(parent=None, emitter_modes: [] = [], receiver_modes: [] = [])

Commands class to create an ultrasonic firing group.

Typical usage example:

result, prim = omni.kit.commands.execute(
    "RangeSensorCreateUltrasonicFiringGroup",
    path="/UltrasonicFiringGroup",
    parent=None,
    emitter_modes=[],
    receiver_modes=[],
)

Example

To use this interface, you must first call the acquire interface function. It is also recommended to use the is_ultrasonic_sensor function to check if a ultrasonic sensor exists at the given USD path

from omni.isaac.range_sensor._range_sensor import acquire_ultrasonic_sensor_interface
ultrasonic_sensor_interface = acquire_ultrasonic_sensor_interface()
if ultrasonic_sensor_interface.is_ultrasonic_sensor("/World/UltrasonicArray"):
    print("ultrasonic sensor is valid")
_range_sensor.acquire_ultrasonic_sensor_interface(plugin_name: str = None, library_path: str = None) omni.isaac.range_sensor._range_sensor.UltrasonicSensorInterface
_range_sensor.release_ultrasonic_sensor_interface(arg0: omni.isaac.range_sensor._range_sensor.UltrasonicSensorInterface) None
class UltrasonicSensorInterface
get_active_envelope_array(self: omni.isaac.range_sensor._range_sensor.UltrasonicSensorInterface, arg0: str) List[List[float]]
get_azimuth_data(self: omni.isaac.range_sensor._range_sensor.UltrasonicSensorInterface, arg0: str) object
Parameters

arg0 (str) – USD path to sensor as a string

Returns

The azimuth angle in radians for each column

Return type

numpy.ndarray

get_depth_data(self: omni.isaac.range_sensor._range_sensor.UltrasonicSensorInterface, arg0: str, arg1: int) object
Parameters

arg0 (str) – USD path to sensor as a string

Returns

The distance from the sensor to the hit for each beam in uint16 and scaled by min and max distance

Return type

numpy.ndarray

get_emitter_firing_info(self: omni.isaac.range_sensor._range_sensor.UltrasonicSensorInterface, arg0: str) List[carb._carb.Int2]
Parameters

arg0 (str) – USD path to sensor as a string

Returns

emitter firing info for the current group fired

Return type

list

get_envelope(self: omni.isaac.range_sensor._range_sensor.UltrasonicSensorInterface, arg0: str, arg1: int) object
Parameters
  • arg0 (str) – USD path to sensor as a string

  • arg1 (int) – array index of the emitter that we are querying

Returns

The binned timestamps of returns from sensor emission

Return type

numpy.ndarray

get_envelope_array(self: omni.isaac.range_sensor._range_sensor.UltrasonicSensorInterface, arg0: str) object
Parameters

arg0 (str) – USD path to sensor as a string

Returns

The array of envelopes from the ultrasonic sensor

Return type

numpy.ndarray

get_intensity_data(self: omni.isaac.range_sensor._range_sensor.UltrasonicSensorInterface, arg0: str, arg1: int) object
Parameters

arg0 (str) – USD path to sensor as a string

Returns

The observed specular intensity of each beam, 255 if hit, 0 if not

Return type

numpy.ndarray

get_linear_depth_data(self: omni.isaac.range_sensor._range_sensor.UltrasonicSensorInterface, arg0: str, arg1: int) object
Parameters

arg0 (str) – USD path to sensor as a string

Returns

The distance from the sensor to the hit for each beam in meters

Return type

numpy.ndarray

get_num_cols(self: omni.isaac.range_sensor._range_sensor.UltrasonicSensorInterface, arg0: str) int
Parameters

arg0 (str) – USD path to sensor as a string

Returns

The number of horizontal scans of the sensor, 0 if error occurred

Return type

int

get_num_emitters(self: omni.isaac.range_sensor._range_sensor.UltrasonicSensorInterface, arg0: str) int
Parameters

arg0 (str) – USD path to sensor as a string

Returns

The number of emitters on the sensor array, 0 if error occurred

Return type

int

get_num_rows(self: omni.isaac.range_sensor._range_sensor.UltrasonicSensorInterface, arg0: str) int
Parameters

arg0 (str) – USD path to sensor as a string

Returns

The number of horizontal scans of the sensor, 0 if error occurred

Return type

int

get_receiver_firing_info(self: omni.isaac.range_sensor._range_sensor.UltrasonicSensorInterface, arg0: str) List[carb._carb.Int2]
Parameters

arg0 (str) – USD path to sensor as a string

Returns

receiver info for the current group fired

Return type

list

get_zenith_data(self: omni.isaac.range_sensor._range_sensor.UltrasonicSensorInterface, arg0: str) object
Parameters

arg0 (str) – USD path to sensor as a string

Returns

The zenith angle in radians for each row

Return type

numpy.ndarray

is_ultrasonic_sensor(self: omni.isaac.range_sensor._range_sensor.UltrasonicSensorInterface, arg0: str) bool
Parameters

arg0 (str) – USD path to sensor as a string

Returns

True if a sensor exists at the give path, False otherwise

Return type

bool

Generic Sensor

This submodule provides an interface to a simulated generic sensor.

commands.RangeSensorCreateGeneric(parent=None, min_range: float = 0.4, max_range: float = 100.0, draw_points: bool = False, draw_lines: bool = False, sampling_rate: int = 60)

Commands class to create a generic range sensor.

Typical usage example:

result, prim = omni.kit.commands.execute(
    "RangeSensorCreateGeneric",
    path="/GenericSensor",
    parent=None,
    min_range=0.4,
    max_range=100.0,
    draw_points=False,
    draw_lines=False,
    sampling_rate=60,
)

Example

To use this interface, you must first call the acquire interface function. It is also recommended to use the is_generic_sensor function to check if a generic sensor exists at the given USD path

from omni.isaac.range_sensor._range_sensor import acquire_generic_sensor_interface
generic_sensor_interface = acquire_generic_sensor_interface()
if generic_sensor_interface.is_generic_sensor("/World/GenericSensor"):
    print("generic sensor is valid")
_range_sensor.acquire_generic_sensor_interface(plugin_name: str = None, library_path: str = None) omni.isaac.range_sensor._range_sensor.GenericSensorInterface
_range_sensor.release_generic_sensor_interface(arg0: omni.isaac.range_sensor._range_sensor.GenericSensorInterface) None
class GenericSensorInterface
get_azimuth_data(self: omni.isaac.range_sensor._range_sensor.GenericSensorInterface, arg0: str) object
Parameters

arg0 (str) – USD path to sensor as a string

Returns

The azimuth angle in radians for each column

Return type

numpy.ndarray

get_depth_data(self: omni.isaac.range_sensor._range_sensor.GenericSensorInterface, arg0: str) object
Parameters

arg0 (str) – USD path to sensor as a string

Returns

The distance from the sensor to the hit for each beam in uint16 and scaled by min and max distance

Return type

numpy.ndarray

get_intensity_data(self: omni.isaac.range_sensor._range_sensor.GenericSensorInterface, arg0: str) object
Parameters

arg0 (str) – USD path to sensor as a string

Returns

The observed specular intensity of each beam, 255 if hit, 0 if not

Return type

numpy.ndarray

get_linear_depth_data(self: omni.isaac.range_sensor._range_sensor.GenericSensorInterface, arg0: str) object
Parameters

arg0 (str) – USD path to sensor as a string

Returns

The distance from the sensor to the hit for each beam in meters

Return type

numpy.ndarray

get_num_samples_ticked(self: omni.isaac.range_sensor._range_sensor.GenericSensorInterface, arg0: str) int
Parameters

arg0 (str) – USD path to sensor as a string

Returns

The number of sample points the sensor completed in the last simulation step, 0 if error occurred.

Return type

int

get_point_cloud_data(self: omni.isaac.range_sensor._range_sensor.GenericSensorInterface, arg0: str) object
Parameters

arg0 (str) – USD path to sensor as a string

Returns

The hit position in xyz relative to the sensor origin, not accounting for individual ray offsets

Return type

numpy.ndarray

get_zenith_data(self: omni.isaac.range_sensor._range_sensor.GenericSensorInterface, arg0: str) object
Parameters

arg0 (str) – USD path to sensor as a string

Returns

The zenith angle in radians for each row

Return type

numpy.ndarray

is_generic_sensor(self: omni.isaac.range_sensor._range_sensor.GenericSensorInterface, arg0: str) bool
Parameters

arg0 (str) – USD path to sensor as a string

Returns

True if a sensor exists at the give path, False otherwise

Return type

bool

send_next_batch(self: omni.isaac.range_sensor._range_sensor.GenericSensorInterface, arg0: str) bool

ready for next batch

set_next_batch_offsets(self: omni.isaac.range_sensor._range_sensor.GenericSensorInterface, arg0: str, arg1: numpy.ndarray[numpy.float32]) None
Parameters
  • arg0 (str) – USD path to sensor as a string

  • arg1 (numpy.ndaray) – The offset xyz, a 2D array for individual rays, or 1D array for a constant offset

set_next_batch_rays(self: omni.isaac.range_sensor._range_sensor.GenericSensorInterface, arg0: str, arg1: numpy.ndarray[numpy.float32]) None
Parameters
  • arg0 (str) – USD path to sensor as a string

  • arg1 (numpy.ndaray) – The azimuth and zenith angles in radians for each column

Generated USD Schema API

The following USD Schema API was automatically generated, it is provided here as a reference

class Generic

Bases: omni.isaac.RangeSensorSchema.RangeSensor

CreateSamplingRateAttr()
CreateStreamingAttr()
static Define()
static Get()

classmethod Get(stage, path) -> Xformable

Return a UsdGeomXformable holding the prim adhering to this schema at path on stage .

If no prim exists at path on stage , or if the prim at that path does not adhere to this schema, return an invalid schema object. This is shorthand for the following:

UsdGeomXformable(stage->GetPrimAtPath(path));
Parameters
  • stage (Stage) –

  • path (Path) –

GetSamplingRateAttr()
static GetSchemaAttributeNames()

classmethod GetSchemaAttributeNames(includeInherited) -> list[str]

Return a vector of names of all pre-declared attributes for this schema class and all its ancestor classes.

Does not include attributes that may be authored by custom/extended methods of the schemas involved.

Parameters

includeInherited (bool) –

GetStreamingAttr()
class Lidar

Bases: omni.isaac.RangeSensorSchema.RangeSensor

CreateEnableSemanticsAttr()
CreateHighLodAttr()
CreateHorizontalFovAttr()
CreateHorizontalResolutionAttr()
CreateRotationRateAttr()
CreateVerticalFovAttr()
CreateVerticalResolutionAttr()
CreateYawOffsetAttr()
static Define()
static Get()

classmethod Get(stage, path) -> Xformable

Return a UsdGeomXformable holding the prim adhering to this schema at path on stage .

If no prim exists at path on stage , or if the prim at that path does not adhere to this schema, return an invalid schema object. This is shorthand for the following:

UsdGeomXformable(stage->GetPrimAtPath(path));
Parameters
  • stage (Stage) –

  • path (Path) –

GetEnableSemanticsAttr()
GetHighLodAttr()
GetHorizontalFovAttr()
GetHorizontalResolutionAttr()
GetRotationRateAttr()
static GetSchemaAttributeNames()

classmethod GetSchemaAttributeNames(includeInherited) -> list[str]

Return a vector of names of all pre-declared attributes for this schema class and all its ancestor classes.

Does not include attributes that may be authored by custom/extended methods of the schemas involved.

Parameters

includeInherited (bool) –

GetVerticalFovAttr()
GetVerticalResolutionAttr()
GetYawOffsetAttr()
class RangeSensor

Bases: pxr.UsdGeom.Xformable

CreateDrawLinesAttr()
CreateDrawPointsAttr()
CreateEnabledAttr()
CreateMaxRangeAttr()
CreateMinRangeAttr()
static Get()

classmethod Get(stage, path) -> Xformable

Return a UsdGeomXformable holding the prim adhering to this schema at path on stage .

If no prim exists at path on stage , or if the prim at that path does not adhere to this schema, return an invalid schema object. This is shorthand for the following:

UsdGeomXformable(stage->GetPrimAtPath(path));
Parameters
  • stage (Stage) –

  • path (Path) –

GetDrawLinesAttr()
GetDrawPointsAttr()
GetEnabledAttr()
GetMaxRangeAttr()
GetMinRangeAttr()
static GetSchemaAttributeNames()

classmethod GetSchemaAttributeNames(includeInherited) -> list[str]

Return a vector of names of all pre-declared attributes for this schema class and all its ancestor classes.

Does not include attributes that may be authored by custom/extended methods of the schemas involved.

Parameters

includeInherited (bool) –

class Tokens

Bases: Boost.Python.instance

adjacencyList = 'adjacencyList'
attenuationAlpha = 'attenuationAlpha'
drawLines = 'drawLines'
drawPoints = 'drawPoints'
emitterModes = 'emitterModes'
emitterPrims = 'emitterPrims'
enableSemantics = 'enableSemantics'
enabled = 'enabled'
firingGroups = 'firingGroups'
highLod = 'highLod'
horizontalFov = 'horizontalFov'
horizontalResolution = 'horizontalResolution'
maxRange = 'maxRange'
minRange = 'minRange'
numBins = 'numBins'
perRayIntensity = 'perRayIntensity'
receiverModes = 'receiverModes'
rotationRate = 'rotationRate'
samplingRate = 'samplingRate'
streaming = 'streaming'
useBRDF = 'useBRDF'
useDistAttenuation = 'useDistAttenuation'
useUSSMaterialsForBRDF = 'useUSSMaterialsForBRDF'
ussBase_color = 'uss:base_color'
ussMetallic = 'uss:metallic'
ussPerceptualRoughness = 'uss:perceptualRoughness'
ussReflectance = 'uss:reflectance'
verticalFov = 'verticalFov'
verticalResolution = 'verticalResolution'
yawOffset = 'yawOffset'
class UltrasonicArray

Bases: omni.isaac.RangeSensorSchema.RangeSensor

CreateAttenuationAlphaAttr()
CreateEmitterPrimsRel()
CreateFiringGroupsRel()
CreateHorizontalFovAttr()
CreateHorizontalResolutionAttr()
CreateNumBinsAttr()
CreateUseBRDFAttr()
CreateUseDistAttenuationAttr()
CreateUseUSSMaterialsForBRDFAttr()
CreateVerticalFovAttr()
CreateVerticalResolutionAttr()
static Define()
static Get()

classmethod Get(stage, path) -> Xformable

Return a UsdGeomXformable holding the prim adhering to this schema at path on stage .

If no prim exists at path on stage , or if the prim at that path does not adhere to this schema, return an invalid schema object. This is shorthand for the following:

UsdGeomXformable(stage->GetPrimAtPath(path));
Parameters
  • stage (Stage) –

  • path (Path) –

GetAttenuationAlphaAttr()
GetEmitterPrimsRel()
GetFiringGroupsRel()
GetHorizontalFovAttr()
GetHorizontalResolutionAttr()
GetNumBinsAttr()
static GetSchemaAttributeNames()

classmethod GetSchemaAttributeNames(includeInherited) -> list[str]

Return a vector of names of all pre-declared attributes for this schema class and all its ancestor classes.

Does not include attributes that may be authored by custom/extended methods of the schemas involved.

Parameters

includeInherited (bool) –

GetUseBRDFAttr()
GetUseDistAttenuationAttr()
GetUseUSSMaterialsForBRDFAttr()
GetVerticalFovAttr()
GetVerticalResolutionAttr()
class UltrasonicEmitter

Bases: pxr.UsdGeom.Xformable

CreateAdjacencyListAttr()
CreatePerRayIntensityAttr()
CreateYawOffsetAttr()
static Define()
static Get()

classmethod Get(stage, path) -> Xformable

Return a UsdGeomXformable holding the prim adhering to this schema at path on stage .

If no prim exists at path on stage , or if the prim at that path does not adhere to this schema, return an invalid schema object. This is shorthand for the following:

UsdGeomXformable(stage->GetPrimAtPath(path));
Parameters
  • stage (Stage) –

  • path (Path) –

GetAdjacencyListAttr()
GetPerRayIntensityAttr()
static GetSchemaAttributeNames()

classmethod GetSchemaAttributeNames(includeInherited) -> list[str]

Return a vector of names of all pre-declared attributes for this schema class and all its ancestor classes.

Does not include attributes that may be authored by custom/extended methods of the schemas involved.

Parameters

includeInherited (bool) –

GetYawOffsetAttr()
class UltrasonicFiringGroup

Bases: pxr.Usd.Typed

CreateEmitterModesAttr()
CreateReceiverModesAttr()
static Define()
static Get()
GetEmitterModesAttr()
GetReceiverModesAttr()
static GetSchemaAttributeNames()

classmethod GetSchemaAttributeNames(includeInherited) -> list[str]

Return a vector of names of all pre-declared attributes for this schema class and all its ancestor classes.

Does not include attributes that may be authored by custom/extended methods of the schemas involved.

Parameters

includeInherited (bool) –

class UltrasonicMaterialAPI

Bases: pxr.Usd.APISchemaBase

static Apply()
static CanApply()
CreateBase_colorAttr()
CreateMetallicAttr()
CreatePerceptualRoughnessAttr()
CreateReflectanceAttr()
static Get()
GetBase_colorAttr()
GetMetallicAttr()
GetPerceptualRoughnessAttr()
GetReflectanceAttr()
static GetSchemaAttributeNames()

classmethod GetSchemaAttributeNames(includeInherited) -> list[str]

Return a vector of names of all pre-declared attributes for this schema class and all its ancestor classes.

Does not include attributes that may be authored by custom/extended methods of the schemas involved.

Parameters

includeInherited (bool) –

Omnigraph Nodes