cristhian aguilera 55a87d3a14 refactor ZED capture into modular camera class with env config
Extract camera lifecycle (open, warmup, grab, close) and
environment-based configuration into src/zed/camera.{h,cc}.
Thin main.cc now only handles the dora event loop.

Closes #2
2026-03-25 09:11:00 -03:00

dora-zed

Dora C++ node for ZED stereo cameras. Captures frames and publishes BGR images, XYZRGBA point clouds, and camera intrinsics.

Usage via git: in a dataflow

nodes:
  - id: zed-camera
    git: ssh://git@gitea.liria.cl:5001/liria/dora-zed.git
    build: mkdir -p build && cd build && cmake .. && make install
    path: bin/dora_zed
    inputs:
      tick: dora/timer/millis/100
    outputs:
      - image_bgr
      - point_cloud
      - camera_info

Then run:

dora build dataflow.yml
dora up
dora start dataflow.yml

Local build

git clone ssh://git@gitea.liria.cl:5001/liria/dora-zed.git
cd dora-zed
mkdir -p build && cd build
cmake ..
make install

The binary is installed to bin/dora_zed relative to the repository root.

Dependencies

Dependency Minimum version Notes
CMake 3.21
ZED SDK 4.x Default path: /usr/local/zed
CUDA Toolkit Required by ZED SDK
OpenCV 4.x
Rust toolchain stable Used to build dora-rs C++ bindings

Environment variables

Variable Default Description
ZED_RESOLUTION 720 Camera resolution: 720, 1080, or 2000
ZED_FPS 15 Camera frame rate
ZED_DEPTH_MODE NEURAL Depth mode: PERFORMANCE, QUALITY, NEURAL, or NONE
ZED_DEPTH_MIN_MM 10 Minimum depth distance in millimeters
ZED_DEPTH_MAX_MM 500 Maximum depth distance in millimeters
ZED_DEPTH_FILL false Enable depth fill mode
ZED_FLIP ON Image flip: ON or OFF
ZED_WARMUP_FRAMES 30 Number of warmup frames to discard
ZED_RETRY_INTERVAL_SECONDS 5 Seconds between reconnection attempts

Outputs

image_bgr

BGR image as raw bytes. Metadata includes shape (HxWx3), encoding (bgr8), camera intrinsics (fx, fy, cx, cy), distortion, frame_id, and timestamp_ns.

point_cloud

XYZRGBA point cloud as float32 bytes. Metadata includes shape (HxWx4), units (mm), and camera intrinsics.

camera_info

Four float32 values: [fx, fy, cx, cy]. Metadata includes distortion coefficients.

S
Description
No description provided
Readme
364 KiB
2026-09-15 16:14:39 +00:00
Languages
C++ 72%
CMake 9.2%
Shell 7.7%
Python 6.2%
Dockerfile 3.6%
Other 1.3%