Skip to content

feat: add universal thermal camera input plugin#2479

Open
Wanbogang wants to merge 1 commit intoOpenMind:mainfrom
Wanbogang:feature/thermal-camera-input
Open

feat: add universal thermal camera input plugin#2479
Wanbogang wants to merge 1 commit intoOpenMind:mainfrom
Wanbogang:feature/thermal-camera-input

Conversation

@Wanbogang
Copy link
Copy Markdown
Contributor

Summary

Adds a universal thermal camera input plugin for OM1 that reads IR sensor
data and converts temperature arrays into natural language context for the LLM. #365

Supported Hardware

  • MLX90640 — Melexis 32x24 IR array via I2C
  • AMG8833 — Panasonic 8x8 IR array via I2C
  • USB — Generic USB thermal camera via OpenCV (FLIR Lepton, Seek Thermal, V4L2)
  • Serial — Arduino with IR sensor via pyserial
  • Mock — Simulated data for development and testing

Features

  • Detects human presence (34–39°C) and fire/heat alerts (>60°C)
  • Cooldown logic to suppress repeated identical LLM alerts
  • Optional imports pattern — no hard dependency on hardware libraries
  • Zone-based detection (left, center, right) for spatial awareness
  • Configurable temperature thresholds via config

Files Changed

  • src/inputs/plugins/thermal_camera_input.py — plugin implementation
  • tests/inputs/plugins/test_thermal_camera_input.py — 68 tests, 97% coverage
  • config/thermal_camera.json5 — example config for security patrol use case
  • docs/developing/4_inputs.md — added Thermal Camera to examples list

@Wanbogang Wanbogang requested review from a team as code owners March 16, 2026 02:38
@github-actions github-actions bot added documentation Improvements or additions to documentation robotics Robotics code changes python Python code tests Test files config Configuration files labels Mar 16, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 16, 2026

Codecov Report

❌ Patch coverage is 96.51899% with 11 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/inputs/plugins/thermal_camera_input.py 96.51% 11 Missing ⚠️

📢 Thoughts on this report? Let us know!

@Wanbogang Wanbogang force-pushed the feature/thermal-camera-input branch 4 times, most recently from 0e07a36 to df4a77e Compare March 16, 2026 03:32
- Support 5 hardware backends: MLX90640, AMG8833, USB, serial, mock
- Detect human presence (34-39°C) and fire/heat alerts (>60°C)
- Cooldown logic to suppress repeated LLM alerts
- Optional imports pattern for hardware libraries
- 68 tests, 97% coverage
- Add thermal_camera.json5 example config
- Add Thermal Camera to docs/developing/4_inputs.md

fix: use callable mock for time.time in cooldown tests
@Wanbogang Wanbogang force-pushed the feature/thermal-camera-input branch from df4a77e to 2dabf90 Compare March 16, 2026 03:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

config Configuration files documentation Improvements or additions to documentation python Python code robotics Robotics code changes tests Test files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant