Method RegisterSensor
RegisterSensor(EgoHandle, string, string, float, float)
Register a new sensor under the given ego.
Declaration
public static SensorHandle RegisterSensor(EgoHandle egoHandle, string modality, string description, float period, float firstCaptureTime)
Parameters
| Type | Name | Description |
|---|---|---|
| EgoHandle | egoHandle | The ego container for the sensor. Sensor orientation will be reported in the context of the given ego. |
| string | modality | The kind of the sensor (ex. "camera", "lidar") |
| string | description | A human-readable description of the sensor (ex. "front-left rgb camera") |
| float | period | The period, in seconds, on which the sensor should capture. Frames will be scheduled in the simulation such that each sensor is triggered every period seconds. |
| float | firstCaptureTime | The time, in seconds, from the start of the sequence on which this sensor should first be scheduled. |
Returns
| Type | Description |
|---|---|
| SensorHandle | A SensorHandle, which should be used to check ShouldCaptureThisFrame each frame to determine whether to capture (or render) that frame. It is also used to report captures, annotations, and metrics on the sensor. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentException | Thrown if ego is invalid. |