feat(social): Issue #86 — physical expression + motor attention #94

Merged
sl-jetson merged 1 commits from sl-firmware/social-expression into main 2026-03-01 23:55:15 -05:00
Collaborator

Issue #86: Physical Expression

Changes

esp32/social_expression/social_expression.ino (new)

  • ESP32-C3 Arduino sketch, 115200 serial, JSON protocol from Orin
  • Mood→colour: happy=green, curious=blue, annoyed=red, playful=rainbow
  • Idle breathing animation (sine-modulated warm white, 3 s timeout)

jetson/ros2_ws/src/saltybot_social_msgs/ (new)

  • Mood.msg — {mood, intensity}
  • Person.msg — {track_id, bearing_rad, distance_m, confidence, is_speaking, source}
  • PersonArray.msg — {persons[], active_id}

jetson/ros2_ws/src/saltybot_social/ (new)

  • expression_node.py — /social/mood → JSON serial to ESP32-C3, auto-reconnect
  • attention_node.py — /social/persons → /cmd_vel rotation only, proportional+dead-zone, active-speaker priority
  • launch/social.launch.py — combined launch
  • test/test_attention.py — 15 pure-pytest unit tests

Closes #86

## Issue #86: Physical Expression ### Changes **`esp32/social_expression/social_expression.ino`** (new) - ESP32-C3 Arduino sketch, 115200 serial, JSON protocol from Orin - Mood→colour: happy=green, curious=blue, annoyed=red, playful=rainbow - Idle breathing animation (sine-modulated warm white, 3 s timeout) **`jetson/ros2_ws/src/saltybot_social_msgs/`** (new) - `Mood.msg` — {mood, intensity} - `Person.msg` — {track_id, bearing_rad, distance_m, confidence, is_speaking, source} - `PersonArray.msg` — {persons[], active_id} **`jetson/ros2_ws/src/saltybot_social/`** (new) - `expression_node.py` — /social/mood → JSON serial to ESP32-C3, auto-reconnect - `attention_node.py` — /social/persons → /cmd_vel rotation only, proportional+dead-zone, active-speaker priority - `launch/social.launch.py` — combined launch - `test/test_attention.py` — 15 pure-pytest unit tests Closes #86
sl-webui added 1 commit 2026-03-01 23:36:07 -05:00
ESP32-C3 NeoPixel sketch (esp32/social_expression/social_expression.ino):
  - Adafruit NeoPixel + ArduinoJson, serial JSON protocol 115200 8N1
  - Mood→colour: happy=green, curious=blue, annoyed=red, playful=rainbow
  - Idle breathing animation (sine-modulated warm white)
  - Auto-falls to idle after IDLE_TIMEOUT_MS (3 s) with no command

ROS2 saltybot_social_msgs (new package):
  - Mood.msg — {mood, intensity}
  - Person.msg — {track_id, bearing_rad, distance_m, confidence, is_speaking, source}
  - PersonArray.msg — {persons[], active_id}

ROS2 saltybot_social (new package):
  - expression_node: subscribes /social/mood → JSON serial to ESP32-C3
    reconnects on port error; sends idle frame after idle_timeout_s
  - attention_node: subscribes /social/persons → /cmd_vel rotation-only
    proportional control with dead zone; prefers active speaker, falls
    back to highest-confidence person; lost-target idle after 2 s
  - launch/social.launch.py — combined launch
  - config YAML for both nodes with documented parameters
  - test/test_attention.py — 15 pytest-only unit tests

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
sl-jetson merged commit 35b940e1f5 into main 2026-03-01 23:55:15 -05:00
Sign in to join this conversation.
No Reviewers
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

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