Class SoloEndpoint
Endpoint to write out generated data in solo format
Inherited Members
Namespace: UnityEngine.Perception.GroundTruth.Consumers
Assembly: Unity.Perception.Runtime.dll
Syntax
[Serializable]
[MovedFrom("UnityEngine.Perception.GroundTruth.Internal.Consumers")]
public class SoloEndpoint : IConsumerEndpoint, ICloneable, IFileSystemEndpoint
Fields
m_CurrentPath
The runtime resolved directory path where the dataset will be written to.
Declaration
protected string m_CurrentPath
Field Value
| Type | Description |
|---|---|
| string |
soloDatasetName
The name of the dataset on disk. If the name is already used, an integer value will be added to it to make it unique
Declaration
public string soloDatasetName
Field Value
| Type | Description |
|---|---|
| string |
Properties
basePath
The base path the endpoint will write to
Declaration
public string basePath { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
currentPath
The runtime directory that the dataset will be written to. This directory may be different from the basePath in cases where the basePath already existed at the beginning of dataset generation.
Declaration
public virtual string currentPath { get; }
Property Value
| Type | Description |
|---|---|
| string |
defaultPath
The default path the endpoint will write to
Declaration
public string defaultPath { get; }
Property Value
| Type | Description |
|---|---|
| string |
description
THe description of the endpoint
Declaration
public string description { get; }
Property Value
| Type | Description |
|---|---|
| string |
metadataPath
The directory storing the dataset's metadata files.
Declaration
public virtual string metadataPath { get; }
Property Value
| Type | Description |
|---|---|
| string |
Methods
AnnotationRegistered(AnnotationDefinition)
Called when an annotation is registered with the perception engine.
Declaration
public void AnnotationRegistered(AnnotationDefinition annotationDefinition)
Parameters
| Type | Name | Description |
|---|---|---|
| AnnotationDefinition | annotationDefinition | The registered annotation definition |
Clone()
Declaration
public object Clone()
Returns
| Type | Description |
|---|---|
| object |
FrameGenerated(Frame)
Called at the end of each frame. Contains all of the generated data for the frame. This method is called after the frame has entirely finished processing.
Declaration
public void FrameGenerated(Frame frame)
Parameters
| Type | Name | Description |
|---|---|---|
| Frame | frame | The frame data. |
IsValid(out string)
Checks to see if an endpoint is configured properly. If an endpoint is invalid the endpoint will not be able to properly produce generated data.
Declaration
public bool IsValid(out string errorMessage)
Parameters
| Type | Name | Description |
|---|---|---|
| string | errorMessage | If validation fails, this will be updated with an error message |
Returns
| Type | Description |
|---|---|
| bool | True if validation is successful |
MetricRegistered(MetricDefinition)
Called when a metric is registered with the perception engine.
Declaration
public void MetricRegistered(MetricDefinition metricDefinition)
Parameters
| Type | Name | Description |
|---|---|---|
| MetricDefinition | metricDefinition | The registered metric definition |
RegisterFile(string)
Override this method to register a newly written file after it is written to disk.
Declaration
public virtual void RegisterFile(string path)
Parameters
| Type | Name | Description |
|---|---|---|
| string | path |
ResumeSimulationFromCrash(int)
Call this method for endpoint to restore crash point and resume simulation to the same folder
Declaration
public (string, int) ResumeSimulationFromCrash(int maxFrameCount)
Parameters
| Type | Name | Description |
|---|---|---|
| int | maxFrameCount | maxFrameCount describes required amount of frames to be generated |
Returns
| Type | Description |
|---|---|
| (string, int) | string - path to the folder. int - last generated frame |
SensorRegistered(SensorDefinition)
Called when a sensor is registered with the perception engine.
Declaration
public void SensorRegistered(SensorDefinition sensor)
Parameters
| Type | Name | Description |
|---|---|---|
| SensorDefinition | sensor | The registered sensor definition |
SimulationCompleted(SimulationMetadata)
Called at the end of the simulation. Contains metadata describing the entire simulation process.
Declaration
public void SimulationCompleted(SimulationMetadata metadata)
Parameters
| Type | Name | Description |
|---|---|---|
| SimulationMetadata | metadata | Metadata describing the entire simulation process |
SimulationStarted(SimulationMetadata)
Called when the simulation begins. Provides simulation wide metadata to the consumer.
Declaration
public void SimulationStarted(SimulationMetadata metadata)
Parameters
| Type | Name | Description |
|---|---|---|
| SimulationMetadata | metadata | Metadata describing the active simulation |