feat(social): proximity-based greeting trigger (Issue #270) #272

Merged
sl-jetson merged 1 commits from sl-jetson/issue-270-greeting-trigger into main 2026-03-02 17:30:54 -05:00
Collaborator

Summary

  • Adds greeting_trigger_node to saltybot_social
  • Subscribes to /social/faces/detected (FaceDetectionArray) to detect face arrivals
  • Subscribes to /social/person_states (PersonStateArray) to maintain a face_id → distance cache
  • Fires greeting when a face is within proximity_m (default 2 m) and not within the per-face_id cooldown window (default 300 s)
  • Publishes JSON on /saltybot/greeting_trigger (std_msgs/String):
    {"face_id": N, "person_name": "...", "distance_m": X.X, "ts": ...}
  • unknown_distance param controls assumed distance for faces not yet in PersonState (default 0.0 → always greet on first sight)
  • Thread-safe distance cache and greeted-timestamp map
  • 50/50 tests passing

Files

  • saltybot_social/greeting_trigger_node.py — main node
  • config/greeting_trigger_params.yaml — defaults
  • launch/greeting_trigger.launch.py — launch file with proximity_m + cooldown_s args
  • test/test_greeting_trigger.py — 50 tests
  • setup.pygreeting_trigger_node entry point added

Closes #270

## Summary - Adds `greeting_trigger_node` to `saltybot_social` - Subscribes to `/social/faces/detected` (FaceDetectionArray) to detect face arrivals - Subscribes to `/social/person_states` (PersonStateArray) to maintain a `face_id → distance` cache - Fires greeting when a face is within `proximity_m` (default **2 m**) and not within the per-`face_id` cooldown window (default **300 s**) - Publishes JSON on `/saltybot/greeting_trigger` (std_msgs/String): `{"face_id": N, "person_name": "...", "distance_m": X.X, "ts": ...}` - `unknown_distance` param controls assumed distance for faces not yet in PersonState (default 0.0 → always greet on first sight) - Thread-safe distance cache and greeted-timestamp map - 50/50 tests passing ## Files - `saltybot_social/greeting_trigger_node.py` — main node - `config/greeting_trigger_params.yaml` — defaults - `launch/greeting_trigger.launch.py` — launch file with `proximity_m` + `cooldown_s` args - `test/test_greeting_trigger.py` — 50 tests - `setup.py` — `greeting_trigger_node` entry point added Closes #270
sl-webui added 1 commit 2026-03-02 14:26:57 -05:00
feat(social): proximity-based greeting trigger — Issue #270
Some checks failed
social-bot integration tests / Lint (flake8 + pep257) (push) Failing after 2s
social-bot integration tests / Core integration tests (mock sensors, no GPU) (push) Has been skipped
social-bot integration tests / Lint (flake8 + pep257) (pull_request) Failing after 11s
social-bot integration tests / Core integration tests (mock sensors, no GPU) (pull_request) Has been skipped
social-bot integration tests / Latency profiling (GPU, Orin) (push) Has been cancelled
social-bot integration tests / Latency profiling (GPU, Orin) (pull_request) Has been cancelled
94902f918b
Adds greeting_trigger_node to saltybot_social:
- Subscribes to /social/faces/detected (FaceDetectionArray) for face arrivals
- Subscribes to /social/person_states (PersonStateArray) to cache face_id→distance
- Fires greeting when face_id is within proximity_m (default 2m) and
  not in per-face_id cooldown window (default 300s)
- Publishes JSON on /saltybot/greeting_trigger:
  {face_id, person_name, distance_m, ts}
- unknown_distance param controls assumed distance for faces with no PersonState yet
- Thread-safe distance cache and greeted map
- 50/50 tests passing

Closes #270
sl-webui force-pushed sl-jetson/issue-270-greeting-trigger from 94902f918b to c7dd07f9ed 2026-03-02 17:26:46 -05:00 Compare
sl-jetson merged commit 30ad71e7d8 into main 2026-03-02 17:30:54 -05:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: seb/saltylab-firmware#272
No description provided.