add dora C++ node for ZED stereo camera capture
Implements a dora-rs node that captures frames from ZED cameras and publishes BGR images, XYZRGBA point clouds, and camera intrinsics. Includes CMake build system with automatic dora-rs C++ bindings, dataflow definition, and documentation.
This commit is contained in:
@@ -1,2 +1,74 @@
|
||||
# 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
|
||||
|
||||
```yaml
|
||||
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:
|
||||
|
||||
```bash
|
||||
dora build dataflow.yml
|
||||
dora up
|
||||
dora start dataflow.yml
|
||||
```
|
||||
|
||||
## Local build
|
||||
|
||||
```bash
|
||||
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.
|
||||
|
||||
Reference in New Issue
Block a user