robokudo.io.storage_reader_interface

MongoDB storage reader interface for RoboKudo.

This module provides an interface for reading stored sensor data and annotations from a MongoDB database. It supports:

  • Reading stored RGB-D camera data

  • Loading camera calibration information

  • Restoring annotations and views

  • Automatic cursor management

  • Optional looping through stored data

The module is primarily used for:

  • Replaying recorded data

  • Testing and debugging pipelines

  • Offline data analysis

  • Visualization of stored data

Classes

StorageReaderInterface

A camera interface for reading data from MongoDB storage.

Module Contents

class robokudo.io.storage_reader_interface.StorageReaderInterface(camera_config)

Bases: robokudo.io.camera_interface.CameraInterface

A camera interface for reading data from MongoDB storage.

This interface reads sensor data and annotations that were previously stored using the StorageWriter annotator. It handles data deserialization and restoration of the Common Analysis Structure (CAS) views.

Variables:
  • storage – MongoDB storage interface

  • reader – List-based reader for MongoDB data

storage
reader
has_new_data()

Check if more data is available to read.

Handles looping behavior based on camera configuration and maintains cursor position in the data sequence.

Returns:

True if more data is available, False otherwise

Return type:

bool

set_data(cas: robokudo.cas.CAS)

Update the Common Analysis Structure with data from storage.

This method: * Retrieves the next frame from storage * Restores views and annotations * Updates camera intrinsics * Sets depth availability flag

Parameters:

cas (robokudo.cas.CAS) – Common Analysis Structure to update