Files
RealSense-D435i-G1/pyproject.toml
T
robot 07d95792e3 Initial commit: RealSense D435 API server
Drop-in replacement for the Nuwa-HP60C camera container, exposing RGB +
aligned depth + intrinsics via REST/WebSocket so the existing
pestello-pose-detector pipeline can consume frames without changes.

Key adaptations for D4xx on USB 2.0 (this robot has no USB 3 port exposed
externally — see STATUS.md):
- pyrealsense2 built from source; the librealsense v2.55.1 install rule
  doesn't ship the main .so, so we copy it from the build dir and add an
  __init__.py that re-exports the submodule.
- Color stream uses YUYV format on USB 2.x (BGR8/RGB8 time out on this
  bus); converted to BGR via cv2.cvtColor in capture().
- rs.align is skipped on USB 2 (incompatible with YUYV); color is
  cv2-resized to depth shape for approximate per-pixel alignment.
- Driver auto-detects usb_type_descriptor and falls back to the
  full-resolution BGR8 + rs.align pipeline when on USB 3.

Tested: /api/{health,status,discover,rgb,depth,depth/color,capture,
intrinsics} all return 200 with valid payloads at 640x480.
2026-05-19 00:58:23 +02:00

30 lines
707 B
TOML

[project]
name = "realsense-d435"
version = "1.0.0"
description = "REST API + WebSocket server for Intel RealSense D4xx depth camera (pyrealsense2)"
requires-python = ">=3.10"
dependencies = [
"fastapi>=0.115",
"uvicorn[standard]>=0.34",
"pydantic>=2.0",
"pydantic-settings>=2.0",
"python-dotenv>=1.0",
"nats-py>=2.9",
"numpy>=1.24,<2",
"opencv-python-headless>=4.8.0",
]
[project.optional-dependencies]
dev = [
"pytest>=8.0",
"pytest-asyncio>=0.24",
"httpx>=0.27",
]
yolo = [
"onnxruntime>=1.16",
]
[project.scripts]
start = "uvicorn src.backend.main:app --host 0.0.0.0 --port 8878"
dev = "uvicorn src.backend.main:app --reload --host 0.0.0.0 --port 8878"