Skip to content

record_replay

ImageRecorder

ImageRecorder(
    camera_provider: CameraProvider, data_dir: Path
)

This module saves images from a CameraProvider to disk.

This module saves images from a CameraProvider to disk.

:param camera_provider: the camera provider to record images from :param data_dir: the directory to save images to. Images are saved in subdirectories

set_recording

set_recording(value: bool)

Enable or disable recording images from the camera provider.

ReplayCameraProvider

ReplayCameraProvider(
    replay_folder: Path, replay_interval: float = 0.01
)

Bases: CameraProvider[ReplayCamera]

This module collects and simulates cameras by looping over images in a drive.

NOTE: The first image of each camera will be emitted at any time before the timestamp of the second image. Therefore, setting the time to 0.0 will cause all cameras to emit their first image.

:param replay_folder: path to the root replay folder containing the camera folders :param replay_interval: the interval at which the provider checks for new images (in seconds)

jump_to

jump_to(percent: float) -> None

Jump to a specific point in the replay.

:param percent: a value between 0.0 and 100.0, where 0.0 is the start and 100.0 is the end

set_speed

set_speed(speed: float) -> None

Set the playback speed.

1.0 is real-time, 2.0 is double speed, 0.5 is half speed. You may use negative values to play backwards.