Interface IConsumerEndpoint
Base class for a consumer endpoint. A consumer endpoint acts on the data produced by the perception simulation.
Inherited Members
Namespace: UnityEngine.Perception.GroundTruth
Assembly: Unity.Perception.Runtime.dll
Syntax
public interface IConsumerEndpoint : ICloneable
Properties
description
The human readable description of the endpoint
Declaration
string description { get; }
Property Value
Type | Description |
---|---|
string |
Methods
AnnotationRegistered(AnnotationDefinition)
Called when an annotation is registered with the perception engine.
Declaration
void AnnotationRegistered(AnnotationDefinition annotationDefinition)
Parameters
Type | Name | Description |
---|---|---|
AnnotationDefinition | annotationDefinition | The registered annotation definition |
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
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
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
void MetricRegistered(MetricDefinition metricDefinition)
Parameters
Type | Name | Description |
---|---|---|
MetricDefinition | metricDefinition | The registered metric definition |
ResumeSimulationFromCrash(int)
Call this method for endpoint to restore crash point and resume simulation to the same folder
Declaration
(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
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
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
void SimulationStarted(SimulationMetadata metadata)
Parameters
Type | Name | Description |
---|---|---|
SimulationMetadata | metadata | Metadata describing the active simulation |