Work in progress: this documentation is still being written and reviewed. Check details against the source code.

Camera backend selection

Define DetectionResult and select camera backends on demand.

Results contain marker IDs, poses, and an optional capture timestamp. Whether depth and orientation are measured depends on the backend.

beambot.vision.camera.__init__ · Source

Perception and mapping · Guide · Symbol index

How it is used

VisionEngine calls get_camera(camera_type) to load the selected camera module, then uses its capture/detection functions. Zivid and ZED share this selection boundary but provide different acquisition and pose capabilities.

DetectionResult carries marker IDs and poses with an optional timestamp. Consumers must account for backend limitations rather than assuming every returned pose includes measured depth and orientation.

Related data types:

  • DetectionResult: Camera result record containing detected marker IDs/poses and, when available, the capture timestamp used for TF lookup.

Start here

Callable

Purpose

get_camera

Import only the selected camera backend.

Functions

get_camera()

Import only the selected camera backend.

Entry point · Source

get_camera(camera_type: str) -> ModuleType

Parameter

Meaning

camera_type

Exact backend key: zivid or zed; matching is case-sensitive.

Returns: The selected Python module, exposing the shared camera functions.

Errors: ValueError for an unsupported key. ImportError is re-raised with backend/dependency context; other import-time exceptions propagate.

Side effects: Imports the chosen backend and its dependencies. It does not capture an image itself.