docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct SensorHandle

    A handle to a sensor managed by the DatasetCapture. It can be used to check whether the sensor is expected to capture this frame and report captures, annotations, and metrics regarding the sensor.

    Implements
    IDisposable
    IEquatable<SensorHandle>
    Inherited Members
    ValueType.ToString()
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetType()
    Namespace: UnityEngine.Perception.GroundTruth
    Assembly: solution.dll
    Syntax
    public struct SensorHandle : IDisposable, IEquatable<SensorHandle>

    Properties

    Name Description
    Enabled

    Whether the sensor is currently enabled. When disabled, the DatasetCapture will no longer schedule frames for running captures on this sensor.

    Id

    The unique ID of the sensor. This ID is used to refer to this sensor in the json metadata.

    IsNil

    Returns true if this SensorHandle was default-instantiated.

    IsValid

    Returns whether this SensorHandle is valid in the current simulation. Nil SensorHandles are never valid.

    ShouldCaptureThisFrame

    Whether the sensor should capture this frame. Sensors are expected to call this method each frame to determine whether they should capture during the frame. Captures should only be reported when this is true.

    Methods

    Name Description
    Dispose()

    Dispose this SensorHandle.

    Equals(object)

    Indicates whether this instance and a specified object are equal.

    Equals(SensorHandle)

    Indicates whether the current object is equal to another object of the same type.

    GetHashCode()

    Returns the hash code for this instance.

    ReportAnnotationAsync(AnnotationDefinition)

    Creates an async annotation for reporting the values for an annotation during a future frame.

    ReportAnnotationFile(AnnotationDefinition, string)

    Report a file-based annotation related to this sensor in this frame.

    ReportAnnotationValues<T>(AnnotationDefinition, T[])

    Report a value-based annotation related to this sensor in this frame.

    ReportCapture(string, SensorSpatialData, params (string, object)[])

    Report a sensor capture recorded to disk. This should be called on the same frame as the capture is taken, and may be called before the file is written to disk.

    ReportMetric(MetricDefinition, string)

    Report a metric regarding this sensor in the current frame.

    ReportMetricAsync(MetricDefinition)

    Start an async metric for reporting metric values for this frame in a subsequent frame.

    ReportMetric<T>(MetricDefinition, T[])

    Report a metric regarding this sensor in the current frame.

    Operators

    Name Description
    operator ==(SensorHandle, SensorHandle)

    Compares two SensorHandle instances for equality.

    operator !=(SensorHandle, SensorHandle)

    Compares two SensorHandle instances for inequality.

    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)