refactor: split the opencv-plot viewer into its own dataflow
dataflow.yml is now the camera alone, so running it no longer pulls dora-hub over pip or needs a display. dataflow_plot.yml adds the viewer on image_bgr for when the stream should be looked at. dora 1.0 resolves an input's source only within the same descriptor, so the camera node is declared in both files rather than shared, and the two are run one at a time. CI validates both, which is what catches an output rename that breaks only the viewer. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01A65jaxrPXMN9EhBDMmMWb2
This commit is contained in:
@@ -23,9 +23,22 @@ nodes:
|
||||
- camera_state
|
||||
```
|
||||
|
||||
See [`dataflow.yml`](dataflow.yml) for a complete runnable example with a camera display
|
||||
node. That file builds the node from the checkout (`path:` + `build:`) rather than from a
|
||||
tag, which is what lets `dora validate` pick up the manifest described below.
|
||||
### Runnable examples
|
||||
|
||||
Two dataflows live here, and they are run one at a time — dora has no cross-dataflow
|
||||
wiring, so each declares the camera node itself:
|
||||
|
||||
| File | Contents | Run |
|
||||
|---|---|---|
|
||||
| [`dataflow.yml`](dataflow.yml) | The camera alone | `dora run dataflow.yml` |
|
||||
| [`dataflow_plot.yml`](dataflow_plot.yml) | The camera plus an `opencv-plot` viewer on `image_bgr` | `dora run dataflow_plot.yml` |
|
||||
|
||||
The viewer is a separate file because it pulls [dora-hub](https://github.com/dora-rs/dora-hub)
|
||||
and installs it with `pip`, and it needs a display. Neither is a cost the camera should
|
||||
carry on a headless robot, so `dataflow.yml` has no Python dependency at all.
|
||||
|
||||
Both build the node from the checkout (`path:` + `build:`) rather than from a tag, which
|
||||
is what lets `dora validate` pick up the manifest described below.
|
||||
|
||||
### Node manifest
|
||||
|
||||
@@ -46,10 +59,10 @@ payload is a raw buffer whose shape and dtype are in the metadata, so the URN na
|
||||
element type rather than a struct. The `tick` input is `std/core/v1/UInt64`, matching how
|
||||
dora types timer inputs.
|
||||
|
||||
`strict_types: true` in `dataflow.yml` makes a type warning a non-zero exit.
|
||||
[`.gitea/workflows/validate.yml`](.gitea/workflows/validate.yml) runs
|
||||
`dora validate dataflow.yml` on every push and pull request; it needs no camera and no
|
||||
ZED SDK, since validation never runs the node.
|
||||
`strict_types: true` in both dataflows makes a type warning a non-zero exit.
|
||||
[`.gitea/workflows/validate.yml`](.gitea/workflows/validate.yml) validates both on every
|
||||
push and pull request; it needs no camera and no ZED SDK, since validation never runs the
|
||||
node.
|
||||
|
||||
## Dependencies
|
||||
|
||||
|
||||
Reference in New Issue
Block a user