sensors
create_sensor(sensor_type, relative_prim_path, name, modalities='all', enabled=True, sensor_kwargs=None, noise_type=None, noise_kwargs=None)
Create a sensor of type @sensor_type with optional keyword args @sensor_kwargs that should be passed to the constructor. Also, additionally send noise of type @noise_type with corresponding keyword args @noise_kwargs that should be passed to the noise constructor.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
sensor_type
|
str
|
Type of sensor to create. Should be either one of SENSOR_PRIM_TO_SENSOR.keys() or one of REGISTERED_SENSORS (i.e.: the string name of the desired class to create) |
required |
relative_prim_path
|
str
|
Scene-local prim path of the Sensor to encapsulate or create. |
required |
name
|
str
|
Name for the sensor. Names need to be unique per scene. |
required |
modalities
|
str or list of str
|
Modality(s) supported by this sensor. Valid options are part of sensor.all_modalities. Default is "all", which corresponds to all modalities being used |
'all'
|
enabled
|
bool
|
Whether this sensor should be enabled or not |
True
|
sensor_kwargs
|
dict
|
Any keyword kwargs to pass to the constructor |
None
|
noise_type
|
str
|
Type of sensor to create. Should be one of REGISTERED_SENSOR_NOISES (i.e.: the string name of the desired class to create) |
None
|
noise_kwargs
|
dict
|
Any keyword kwargs to pass to the constructor |
None
|
Returns:
Type | Description |
---|---|
BaseSensor
|
Created sensor with specified params |