open-edge-platform/skills

physicalai-runtime-adding-a-camera-backend

Adds or modifies a camera backend under physicalai.capture.

First seen Aug 19, 2026

Installation

$ npx skills add open-edge-platform/skills --skill physicalai-runtime-adding-a-camera-backend

Summary

  • Adds or modifies a camera backend under physicalai.capture.
  • Use when implementing a new Camera type, extending create_camera in src/physicalai/capture/factory.py, discovery helpers, optional pip extras for vendor SDKs, SharedCamera transport, or tests under tests/unit/capture with fake devices.

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from open-edge-platform/skills · top by installs.

npx skills add open-edge-platform/skills

Browse all from open-edge-platform/skills

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

Stars 2
License LICENSE
Default branch main
Open issues 0
Status Active

Skill metadata

Parsed from SKILL.md frontmatter.

LicenseApache-2.0

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 2,617 B
  • docs SUMMARY.md 345 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 14 installs

SKILL.md

Adding a Camera Backend

Cameras implement the Camera interface in src/physicalai/capture/camera.py. Factory entry: create_camera() in src/physicalai/capture/factory.py maps lowercase type names (uvc, realsense, basler, …) to implementations. Reference layouts: src/physicalai/capture/cameras/uvc/, src/physicalai/capture/cameras/realsense/, src/physicalai/capture/cameras/basler/.

Workflow

  1. Pick a reference backend closest to the new hardware (UVC for USB video, RealSense for RGB-D, Basler for GenICam industrial).

- Done when: you can list which modules to mirror (camera.py, discover.py, init.py exports).

  1. Implement Camera: connect(), disconnect(), read() / read_latest(), context manager support, monotonic timestamps on Frame (src/physicalai/capture/frame.py).

- Done when: fake or mocked device tests can exercise connect/read without hardware.

  1. Wire discovery if the device is enumerable — add helpers under src/physicalai/capture/discovery.py or backend-specific _discover.py.
  2. Register the type in src/physicalai/capture/factory.py and export public class from src/physicalai/capture/init.py when user-facing.
  3. Optional extra in pyproject.toml for vendor SDKs; lazy-import inside the camera module so pip install physicalai stays light.

- Done when: import physicalai.capture works without the extra; importing the camera class fails with a clear message if the extra is missing.

  1. Tests in tests/unit/capture/ using existing fakes (tests/unit/capture/fake.py, conftest.py patterns).

- Done when: uv run pytest tests/unit/capture -k <backend> passes.

Shared transport

For multi-process access, create_camera(..., shared=True) wraps with SharedCamera (physicalai[capture] / transport extra, iceoryx2). Only document shared mode when the transport extra is installed.

Required checks

  • CameraType or factory string is documented in docs/reference/camera-api.md when user-visible.
  • Frame shapes and dtypes match README examples (RGB (H, W, 3)).
  • No blocking discovery at import time.

Verify

uv run pytest tests/unit/capture -q
prek run --all-files