The only dataflow here drove the viewer from a test fixture, so nothing showed how to consume a real producer. dataflow_webcam.yml wires dora-webcam v0.1.0 into it: the camera publishes std/media/v1/Image and this node draws it, with depth, camera_info, text and bbox simply unwired, which is what every input being optional buys. The dependency points one way only. A consumer naming its producer is an arrow; dora-webcam names no consumer, so there is no cycle. Two things are deliberate. The camera's output type is repeated in the dataflow because a `git:` node's manifest is not read at validate time, only at build, so without it the two contracts are never compared -- a deliberate mismatch is caught with the annotation and passes silently without it. And the file carries no strict_types: a camera publishes an image and nothing else, and strict validation warns about every typed input a dataflow leaves unwired. Interoperability was verified directly, feeding dora-webcam's packed payload into this node's decoder across bgr8, rgb8, jpeg, png and yuv420: the struct types are identical and the lossless encodings round-trip exactly. The dataflow validates but was not run: with dora-cli 1.0.1 a `git:` node pointing at a private repository does not build over either transport, which the file and the README record.
41 lines
1.6 KiB
YAML
41 lines
1.6 KiB
YAML
# A real camera into the viewer, and the worked example of wiring this node to
|
|
# something that is not a test fixture.
|
|
#
|
|
# Not run by CI: it needs a camera and it fetches dora-webcam over the network.
|
|
# dataflow.yml is the gate, and needs neither.
|
|
#
|
|
# Known limitation, dora-cli 1.0.1: a `git:` node pointing at a *private*
|
|
# repository does not build. Over ssh:// on a non-standard port the connection
|
|
# fails outright, and over https:// libgit2 reports "remote authentication
|
|
# required but no callback set" -- dora has no credential callback, so neither
|
|
# transport authenticates. This file validates, and the wiring below is the form
|
|
# a consumer should use; running it needs that fixed, or the repository public.
|
|
#
|
|
# `strict_types` is deliberately absent. A camera publishes an image and nothing
|
|
# else, and `dora validate --strict` warns about every *typed* input this node
|
|
# declares that a dataflow leaves unwired -- depth, camera_info and text here.
|
|
# The wiring is correct; the strictness is aimed at the self-contained dataflow,
|
|
# which drives all of them.
|
|
|
|
nodes:
|
|
- id: camera
|
|
git: ssh://git@gitea.liria.cl:5001/liria/dora-webcam.git
|
|
tag: v0.1.0
|
|
build: uv pip install .
|
|
path: dora-webcam
|
|
inputs:
|
|
tick: dora/timer/millis/33
|
|
outputs:
|
|
- image
|
|
# dora-webcam's own manifest says this, but a `git:` node's manifest is not
|
|
# read at validate time -- only at build. Repeating it here is what makes
|
|
# the two contracts checked against each other now rather than at runtime.
|
|
output_types:
|
|
image: std/media/v1/Image
|
|
|
|
- id: view
|
|
path: dora-image-view
|
|
build: uv pip install .
|
|
inputs:
|
|
image: camera/image
|