Skip to content

IDD-60: Proactive assistant B1 — hazard detection, voice output, RPi5+OAK-D integration#58

Open
zd87pl wants to merge 3 commits into
mainfrom
IDD-60-proactive-assistant
Open

IDD-60: Proactive assistant B1 — hazard detection, voice output, RPi5+OAK-D integration#58
zd87pl wants to merge 3 commits into
mainfrom
IDD-60-proactive-assistant

Conversation

@zd87pl
Copy link
Copy Markdown
Owner

@zd87pl zd87pl commented Apr 28, 2026

Summary

Full B1 milestone for the proactive assistant on RPi5 + OAK-D Lite hardware:

  • IDD-61deploy/oak-rpi5/app/proactive_engine.py: hazard detection engine with 3-tier severity classification and per-object cooldown to suppress repeat alerts
  • IDD-62deploy/oak-rpi5/app/proactive_voice.py: proactive voice output with guide/quiet mode switching and STT command dispatch (guide me, quiet mode, where are my keys?)
  • IDD-63deploy/oak-rpi5/proactive_main.py + deploy/oak-rpi5/app/oak_pipeline.py: single proactive_main.py entry point integrating OAK-D Lite → hazard engine → voice output with asyncio loop, --sim flag for hardware-free dev, PerfTracker (p50/p95 latency + FPS warnings), and power/RSS telemetry to CSV

Test plan

  • 107 tests pass across all three modules (test_proactive_engine.py, test_proactive_voice.py, test_proactive_main.py)
  • OakSimPipeline covers all desk scenario test cases (object appears, cooldown, escalation)
  • Mode switching (guide/quiet) verified in unit tests
  • PerfTracker warnings at <10 FPS / >200ms latency
  • On-hardware validation on RPi5 + OAK-D Lite (hardware arriving ~2026-04-21; run python proactive_main.py to validate)

🤖 Generated with Claude Code

0x7d0 and others added 3 commits April 20, 2026 18:41
- deploy/oak-rpi5/app/proactive_engine.py: ProactiveEngine class that
  classifies OAK-D Lite detections into IMMEDIATE / WARNING / INFORMATIONAL
  tiers, ranks simultaneous hazards by distance × severity, and suppresses
  repeat alerts via per-class cooldown + distance-band escalation
- Alert objects carry category, label, distance_m, direction, priority, and
  speech_text ready for TTS
- Center-40%-of-frame path estimation; overhead / already-passed objects
  suppressed automatically
- tests/test_proactive_engine.py: 32 tests covering all engine behaviour

Co-Authored-By: Paperclip <noreply@paperclip.ing>
- demo_spatial/app/proactive_voice.py: new ProactiveVoice class that
  consumes Alert objects from ProactiveEngine and speaks them through TTS
  with asyncio priority queuing (IMMEDIATE=0 > WARNING=1 > QUERY=2 > INFO=3),
  VAD-aware suppression (set_user_speaking), and spatial memory enrichment
  for informational alerts (appends where tracked objects were last seen)
- VoiceMode enum: GUIDE / QUIET / REACTIVE with parse_mode_intent()
- Interrupt logic: higher-priority alert cancels in-flight lower-priority speech
- Scene summary: one-shot "what's around me?" from spatial memory
- voice_pipeline.py: extend parse_intent() and build_response_text() with
  mode_guide / mode_quiet / scene_summary intents
- tests/test_proactive_voice.py: 53 tests covering all new behaviour

Co-Authored-By: Paperclip <noreply@paperclip.ing>
- deploy/oak-rpi5/app/oak_pipeline.py: OakPipeline (hardware, DepthAI) and
  OakSimPipeline (synthetic desk scenarios) with OakDetection / OakFrame
  data model; OakUnavailable raised when depthai not installed; _FPSEstimator
  rolling-window FPS tracking
- deploy/oak-rpi5/proactive_main.py: single entry point integrating
  OakPipeline → ProactiveEngine → ProactiveVoice; asyncio camera loop runs
  pipeline in executor thread; STT loop handles voice commands (guide me /
  quiet mode / where are my keys?); PerfTracker measures p50/p95 alert
  latency and FPS with warnings at <10 FPS / >200ms; power telemetry loop
  logs RSS and RPi5 PMIC power draw to CSV every 10s; --sim flag for
  hardware-free development
- tests/test_proactive_main.py: 22 tests covering OakSimPipeline lifecycle,
  scenario cycling, noise bounds, PerfTracker, ProactiveApp startup/shutdown,
  alert production in guide mode, alert suppression in quiet mode, mode
  switching via handle_mode_command, and power helpers

Co-Authored-By: Paperclip <noreply@paperclip.ing>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant