diff --git a/collector/.gitignore b/collector/.gitignore index 7af681d06ff916f2128cdbac23753809cda17a89..76bb8dc7a7f1af0dc4b513b96717f5be24c5f69c 100644 --- a/collector/.gitignore +++ b/collector/.gitignore @@ -36,7 +36,9 @@ exports/ # 本地取回的录制素材与上色产物(双目原视频等,体积大且属外部数据) rec001(1)/ tools/weights/ -wheels/ # scripts/pack_wheels.py 生成的离线部署包(不入库,拷给客户用) +# scripts/pack_wheels.py 生成的离线部署包(不入库,拷给客户用) +# 注意: 行尾不能写 # 注释 —— gitignore 只认行首的 #,行尾的会被当成模式正文 +wheels/ imgui.ini .polyscope.ini tools/stereo_s80m/offline_slam_output/ @@ -94,3 +96,6 @@ core/gripper/orb_slam_src/FaysSense_VI_Kit_Release/config # scripts/pack_lite.py 收集时复制进去的产物,同样不入库——原先的 !负向规则 # 已随之删除,否则每次重打包都会留下未跟踪副本。 lite_package/* + +# 对外接口文档等 Word 产物:随包发送,不入代码库 +*.docx diff --git a/collector/README.md b/collector/README.md index 39a56ea82587108053bd769069632b7704441902..7957b9860361f9a7f1096086c1e6924ae9fe3874 100644 --- a/collector/README.md +++ b/collector/README.md @@ -81,28 +81,33 @@ python -m venv venv venv/bin/pip install -r requirements.txt ``` -> Optional dependencies such as `pyrealsense2`, `mediapipe`, `torch` are not -> listed in `requirements.txt` (lazily imported; the corresponding feature is -> unavailable if missing — one-click installs via `start.bat extras` below). +> Optional dependencies such as `mediapipe` and `torch` are not listed in +> `requirements.txt` (lazily imported; the corresponding feature is unavailable +> if missing — one-click installs via `start.bat extras` below). `pyrealsense2` +> (D435/D405) and the glove-skeleton solver dependencies are part of the +> default install. #### Windows one-click deployment (recommended for customers) Double-click **`start.bat`** in the repo root: it installs Python 3.12 -(silent download if absent), creates the venv, installs dependencies, and +(silent download if absent), creates the venv, installs dependencies, unpacks +the bundled glove toolkit ([4/7] — needed for the live hand skeleton; if it is +missing only a warning is printed and the program still starts), and launches the main program; already-deployed machines start instantly. Common commands: ```bat start.bat deploy and launch (default) start.bat reinstall delete venv and reinstall (first resort when broken) -start.bat extras additionally install mediapipe / pyrealsense2 +start.bat extras additionally install mediapipe start.bat extras-torch additionally install CPU torch (hand-keypoint RTMPose backend) start.bat help open the operation guide and troubleshooting doc ``` > Full operation guide, error-code reference, and intranet offline delivery > procedure: [使用说明.md](使用说明.md) / [使用说明_EN.md](使用说明_EN.md) -> (offline wheel bundles are produced by `python scripts/pack_wheels.py`). +> (offline wheel bundles are produced by `python scripts/pack_wheels.py`, +> which by default also trims the glove toolkit into `wheels/toolkit/glove_toolkit.zip`). **Lite edition** (capture + upload only — no login / playback / task page / skeleton solving): double-click **`start_lite.bat`** (Windows) or run @@ -151,7 +156,7 @@ venv/bin/python tools/hand_detection/demo_stereo_hands.py # stereo + MediaPipe | Device | Interface | Notes | |---|---|---| | UVC camera | `/dev/videoN` (OpenCV V4L2) | MJPG pixel format; up to 8 cameras | -| Intel RealSense D435 / D405 | `pyrealsense2` | RGB + depth dual slots; depth recorded as 12-bit gray HEVC MP4 (log depth codes) + live JET heatmap; built-in stall/framerate watchdog with auto-reconnect; D405 has a dedicated near-range capture profile | +| Intel RealSense D435 / D405 | `pyrealsense2` (default install) | RGB + depth dual slots; depth recorded as 12-bit gray HEVC MP4 (log depth codes) + live JET heatmap; built-in stall/framerate watchdog with auto-reconnect; D405 has a dedicated near-range capture profile | | S80C / S80M stereo | FaysSense VI Kit SDK (bundled in-repo, incl. FT602 bridge driver) | No SDK install needed; camera profile `STEREO_CAM_FPS` (default 50 fps) decimated to 30 fps recording via wall-clock 1/30 s buckets (burst backfill + empty-bucket watchdog, ~3% empty-bucket rate on healthy recordings); callback frame capture (same as the official GUI); carries hardware nanosecond timestamps and IMU samples; since v1.0.11 the subprocess runs the SDK depth engine → third-tile live depth heatmap + 12-bit gray depth video recording | | BLE data gloves | `bleak` | one per hand; parquet column names bound (`right_glove` / `left_glove`) | | UMI gripper (Fays S80M) | in-repo native stack (`core/gripper/native/`, ~460 MB, not in git) | Linux only (the native stack is ELF x86-64); up to 2 grippers (second one gets the `gripper_2_*` column prefix); records left-lens RGB video + `observation.gripper_{left,right}_force` / `_force_matrix` (10×10×3 force matrix) + `observation.slam_trajectory` + gripper state, no stereo video / IMU; new grippers auto-generate their per-serial factory calibration on open | @@ -183,7 +188,8 @@ data/recordings// columns (`episode_index` / `frame_index` / `timestamp` / `wall_time` / `hardware_ns`) plus sparse observations (`observation.` per frame, `observation.imu` variable-length sample lists aligned by - `imu_ts_ns`, `observation.*hand_pose` zero placeholders backfilled by + `imu_ts_ns`, `observation.*hand_pose` placeholders filled live from the + glove IMU when solving is available, zero otherwise / backfilled by post-processing). The full interface contract lives in [docs/file_format.md](docs/file_format.md) - Device naming follows the EgoData `_` convention, e.g. @@ -314,6 +320,14 @@ venv/bin/python tools/tests/glove_widget_test.py venv/bin/python tools/tests/grid_drag_fps_test.py venv/bin/python tools/tests/device_panel_gui_smoke_test.py venv/bin/python tools/tests/test_device_detector.py +# gripper RGB frame-gap instrumentation (v1.3.10) +venv/bin/python tools/tests/test_frame_gap.py +venv/bin/python tools/tests/test_rgb_quality.py +venv/bin/python tools/tests/test_ext_frame_gap.py +venv/bin/python tools/tests/test_camera_log_archive.py +venv/bin/python tools/tests/test_audit_frame_gaps.py +# whole-library frame-gap audit (read-only; exit 1 when picture loss is proven) +venv/bin/python tools/audit_frame_gaps.py # hardware tests require the corresponding device attached: d405_worker_test, # d435_e2e_test, d435_gui_smoke_test, mono_regression, d435_playback_test, etc. ``` @@ -375,6 +389,35 @@ are documented in [docs/index.md](docs/index.md#开发约定). ### Changelog +- **v1.3.10** — silent holes in the gripper RGB stream are now instrumented, + alarmed and archived. `episode-099.mp4`'s frozen opening is not a missing + stream at the start: the first 45 frames are real (the scene is simply still) + and **4.68s vanished between row44 and row45** (`hardware_ns` +4680.8ms and + `wall_time` +4666.4ms jump together) — while *every* counter read 0 and the log + held nothing. Three different paths leave the **same** hole signature in the + parquet: the camera having no frame to read, the emit frame slot being + overwritten, and the GUI main thread stalling. They are counted separately now + (ten `*_ms`/`*_count` keys in `drop_stats` — seven from the bridge, three from + the writer — all excluded from the frame-drop totals by + `core.pipeline.is_frame_drop_key`, with a test that walks the whole snapshot so + a key can never fall outside that suffix rule again), with a live alarm on the + acquisition side and a per-episode summary line. The camera service's own log + — where stalls, altsetting downgrades and USB resets are written — used to die + with its `runtime_dir` on every clean shutdown, so the sessions most worth + keeping left no evidence at all; it is archived to + `logs/camera_service/