Add .gitignore, update Dockerfile, and enhance README with udev rules and calibration instructions

This commit is contained in:
2026-01-19 16:18:15 +08:00
parent 4e8a4a5579
commit 61ad8346af
6 changed files with 111 additions and 5 deletions

View File

@ -43,3 +43,45 @@ docker compose exec zed bash
- USB devices are passed through via `/dev/bus/usb` and the container runs
`privileged` for camera access.
- The workspace is mounted at `/workspaces/zed-playground`.
## Udev Rules (Host)
Udev controls device permissions and power settings on the host. If ZED sensors
fail to initialize inside the container, the host likely does not allow
non-root access to the camera MCU/IMU or has USB autosuspend enabled.
This repo provides two options:
- `misc/99-slabs.rules`: a ready-to-use rule file that grants access to ZED
USB/HID devices and disables autosuspend for known ZED USB IDs.
- `misc/udev_fix.sh`: downloads the official `99-slabs.rules`, installs it to
`/etc/udev/rules.d/`, and reloads udev.
Run the script on the host (not in the container), then unplug/replug the
camera so the new rules take effect.
- `/usr/local/zed/samples` has ZED SDK sample applications.
See [adujardin/setup_zed_udev-rules.sh](https://gist.github.com/adujardin/2d5ce8f000fc6a7bd40bee2709749ff8/) from stereolabs community.
- [ZED camera does not open in docker container as a non-root user](https://community.stereolabs.com/t/zed-camera-does-not-open-in-docker-container-as-a-non-root-user/2259/4)
- [CAMERA NOT DETECTED in WSL2 Ubuntu 22.04](https://community.stereolabs.com/t/camera-not-detected-in-wsl2-ubuntu-22-04/3477/5)
## Calibration Download
If automatic calibration download fails, grab it manually:
```
http://calib.stereolabs.com/?SN=<ZED_SN>
```
`<ZED_SN>` is the decimal serial number without the `SN` prefix.
Place the downloaded `SN<XXXX>.conf` in the default settings path:
- Linux: `/usr/local/zed/settings/`
- Windows: `C:/ProgramData/stereolabs/settings`
If you pass a custom settings path in your app, the SDK will try that first and
fall back to the default path if the file is not found.
## See also
- [How to Install ZED SDK with Docker on Linux](https://www.stereolabs.com/docs/docker/install-guide-linux)