docs.unity3d.com
    Show / Hide Table of Contents

    Class Sensor

    Abstract sensor class that holds all of the common information for a sensor.

    Inheritance
    Object
    DataModelElement
    Sensor
    RgbSensor
    Inherited Members
    DataModelElement.id
    Namespace: UnityEngine.Perception.GroundTruth.DataModel
    Syntax
    public abstract class Sensor : DataModelElement, IMessageProducer

    Constructors

    Sensor(SensorDefinition, Vector3, Quaternion)

    Create a new sensor

    Declaration
    protected Sensor(SensorDefinition definition, Vector3 position, Quaternion rotation)
    Parameters
    Type Name Description
    SensorDefinition definition

    The definition of the sensor

    Vector3 position

    The position of the sensor

    Quaternion rotation

    The rotation of the sensor

    Sensor(SensorDefinition, Vector3, Quaternion, Vector3, Vector3)

    Create a new sensor

    Declaration
    protected Sensor(SensorDefinition definition, Vector3 position, Quaternion rotation, Vector3 velocity, Vector3 acceleration)
    Parameters
    Type Name Description
    SensorDefinition definition

    The definition of the sensor

    Vector3 position

    The position of the sensor

    Quaternion rotation

    The rotation of the sensor

    Vector3 velocity

    The velocity of the sensor

    Vector3 acceleration

    The acceleration of the sensor

    Fields

    m_Definition

    Declaration
    protected SensorDefinition m_Definition
    Field Value
    Type Description
    SensorDefinition

    Properties

    acceleration

    The current acceleration (xyz) of the sensor.

    Declaration
    public Vector3 acceleration { get; set; }
    Property Value
    Type Description
    Vector3

    annotations

    A list of all of the annotations recorded recorded for the frame.

    Declaration
    public List<Annotation> annotations { get; set; }
    Property Value
    Type Description
    List<Annotation>

    description

    Description of the sensor.

    Declaration
    public string description { get; }
    Property Value
    Type Description
    String

    modelType

    Declaration
    public override string modelType { get; }
    Property Value
    Type Description
    String
    Overrides
    DataModelElement.modelType

    position

    The position (xyz) of the sensor in the world.

    Declaration
    public Vector3 position { get; set; }
    Property Value
    Type Description
    Vector3

    rotation

    The rotation in euler angles.

    Declaration
    public Quaternion rotation { get; set; }
    Property Value
    Type Description
    Quaternion

    velocity

    The current velocity (xyz) of the sensor.

    Declaration
    public Vector3 velocity { get; set; }
    Property Value
    Type Description
    Vector3

    Methods

    IsValid()

    Is the component valid?

    Declaration
    public override bool IsValid()
    Returns
    Type Description
    Boolean

    Is the component valid?

    Overrides
    DataModelElement.IsValid()

    ToMessage(IMessageBuilder)

    Convert contents int a message.

    Declaration
    public override void ToMessage(IMessageBuilder builder)
    Parameters
    Type Name Description
    IMessageBuilder builder

    The message builder that will convert the class's contents into a message

    Overrides
    DataModelElement.ToMessage(IMessageBuilder)
    Back to top
    Terms of use
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023