Camera::open() retried forever inside a fixed sleep, so a camera that did not come back left the node stuck there: it stopped reading dora events and no longer honoured Stop or AllInputsClosed. Recovery is now a state machine over ticks. open() makes one attempt and returns; the loop decides when to try again from a 1/2/5/10 s backoff deadline, and nothing sleeps, so events keep being read while the camera is down. The first attempt closes the handle; past that the device is wedged and the node escalates to sl::Camera::reboot(), guarded to the ZED 2 and newer since it does nothing on the ZED and ZED Mini. Reopening pins the serial so recovery gets the same physical camera back. Set async_grab_camera_recovery so a link hiccup returns CAMERA_REBOOTING immediately instead of blocking the grab for ~17 s, and enable_image_validity_ check so the SDK flags frames a stalled camera hands back looking valid. Those transient errors no longer drop the handle, since the SDK is already reconnecting it. An all-black frame now counts as a failed grab rather than being published, and a camera delivering nothing usable for 5 s (30 s while the SDK reports it is reconnecting) triggers recovery. A new camera_state output publishes opening/streaming/recovering so a downstream node can tell "no frame yet" from "camera lost". ZED_RETRY_INTERVAL_SECONDS is replaced by the backoff. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y7g2cBJ5e3r15ZbJ9WZn8c
22 lines
480 B
YAML
22 lines
480 B
YAML
nodes:
|
|
- id: zed-camera
|
|
git: ssh://git@gitea.liria.cl:5001/liria/dora-zed.git
|
|
tag: v0.2.0
|
|
build: scripts/build.sh
|
|
path: bin/dora_zed
|
|
inputs:
|
|
tick: dora/timer/millis/100
|
|
outputs:
|
|
- image_bgr
|
|
- depth
|
|
- point_cloud
|
|
- camera_info
|
|
- camera_state
|
|
|
|
- id: plot
|
|
git: https://github.com/dora-rs/dora-hub.git
|
|
build: pip install ./node-hub/opencv-plot
|
|
path: opencv-plot
|
|
inputs:
|
|
image: zed-camera/image_bgr
|