robokudo.descriptors.analysis_engines.parallel

Analysis engine demonstrating parallel processing capabilities.

This module provides an analysis engine that demonstrates how to implement parallel processing within a pipeline. It shows how to configure and execute multiple annotators concurrently using a parallel execution policy.

The pipeline implements the following functionality:

  • Kinect camera data input

  • Pipeline trigger for controlled execution

  • Parallel execution of slow annotators

  • Synchronized completion policy

Note

This is a demonstration pipeline that uses simulated slow annotators to illustrate parallel processing behavior. The annotators have different sleep durations to show asynchronous execution.

Classes

AnalysisEngine

Analysis engine demonstrating parallel processing capabilities.

Module Contents

class robokudo.descriptors.analysis_engines.parallel.AnalysisEngine

Bases: robokudo.analysis_engine.AnalysisEngineInterface

Analysis engine demonstrating parallel processing capabilities.

This class implements a pipeline that demonstrates parallel execution of annotators. It uses the BetterParallel component with a synchronized completion policy to ensure all parallel tasks complete before proceeding.

The pipeline includes:

  • Pipeline trigger for controlled execution

  • Camera data collection and preprocessing

  • Fast annotator (1s processing time)

  • Parallel slow annotators (2s and 4s processing times)

  • Final slow annotator (2s processing time)

Note

The pipeline uses simulated processing times to demonstrate the benefits of parallel execution compared to sequential processing.

name()

Get the name of the analysis engine.

Returns:

The name identifier of this analysis engine

Return type:

str

implementation()

Create a pipeline with parallel processing capabilities.

This method constructs a processing pipeline that demonstrates parallel execution of annotators. It configures two slow annotators to run in parallel, with different processing times to show asynchronous execution.

Pipeline execution sequence:

  1. Pipeline trigger (wait for user)

  2. Clear outputs

  3. Read camera data

  4. Preprocess image

  5. Fast annotator (1s)

  6. Parallel annotators (2s and 4s)

  7. Final slow annotator (2s)

Returns:

The configured pipeline with parallel processing

Return type:

robokudo.pipeline.Pipeline