object_detection

object_detection.py

Overview

object_detection.py is a vertical perception component that will eventually wrap a real convolutional object–detection network. The current stub publishes a fixed textual description so the rest of the pipeline (sensor fusion, reasoning, speech) can be integrated long before GPU-heavy models are available.

Interfaces (strongly-typed, stateless)

Direction

Topic

Message type

Notes

Required

/{robot}/camera_preprocessed

sensor_msgs/Image

Cleaned RGB frames (content ignored by this stub)

Provided

/{robot}/camera_detections

std_msgs/String

Always publishes "Detected: Table, Plate, Position" (1 Hz)

Contract

Pre-conditions

  • A publisher is already emitting images on /{robot}/camera_preprocessed.

  • Subscribers tolerate a 1 Hz detection rate.

Post-conditions

  • Each published message is a UTF-8 string following the pattern "Detected: <obj1>, <obj2>, <obj3>".

  • Header timing is irrelevant; no synchronisation required.

Invariants

  • Publication interval exactly 1 s (±10 ms).

  • CPU usage ≈ 0 % (no image processing).

Protocol

Stateless: every second the component publishes a fresh detection string, independent of any previous frames.

Lifecycle

  • Node name {robot}_object_detection_node

  • Ready once its publisher is advertised.

  • Clean shutdown on Ctrl-C or rosnode kill.

Classes

ObjectDetector()

Minimal façade around a future object-detection pipeline.