Class Sensor
Abstract sensor class that holds all of the common information for a sensor.
Inherited Members
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
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
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 |