docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    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.

    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)