feat(social): face-tracking head servo controller (Issue #279) #284

Merged
sl-jetson merged 1 commits from sl-jetson/issue-279-face-track-servo into main 2026-03-02 20:44:01 -05:00
Collaborator

Summary

  • Adds face_track_servo_node to saltybot_social
  • Subscribes /social/faces/detected (FaceDetectionArray); picks closest face by largest bbox area
  • Computes pan/tilt angular error from bbox centre vs image centre using configurable FOV (default 60×45°)
  • Independent PID controllers for pan and tilt — velocity/incremental output with integral anti-windup; servo position integrates velocity × dt each tick
  • Clamps commands to ±pan_limit_deg / ±tilt_limit_deg (default ±90° / ±30°)
  • Dead zone suppresses servo jitter for small errors (configurable, default 2% of frame)
  • Return-to-centre at return_rate_deg_s when face lost for > lost_timeout_s
  • Publishes std_msgs/Float32 on /saltybot/head_pan and /saltybot/head_tilt at control_rate Hz (default 20 Hz)
  • All gains and limits exposed as ROS parameters
  • 81/81 tests passing

Files

  • saltybot_social/face_track_servo_node.pyPIDController class + FaceTrackServoNode
  • config/face_track_servo_params.yaml — default gains and limits
  • launch/face_track_servo.launch.py — launch file with key gain/limit args
  • test/test_face_track_servo.py — 81 tests (PID unit tests + control loop integration)
  • setup.pyface_track_servo_node entry point added

Closes #279

## Summary - Adds `face_track_servo_node` to `saltybot_social` - Subscribes `/social/faces/detected` (FaceDetectionArray); picks **closest face** by largest bbox area - Computes pan/tilt angular error from bbox centre vs image centre using configurable FOV (default 60×45°) - Independent **PID controllers** for pan and tilt — velocity/incremental output with integral anti-windup; servo position integrates `velocity × dt` each tick - Clamps commands to `±pan_limit_deg` / `±tilt_limit_deg` (default ±90° / ±30°) - **Dead zone** suppresses servo jitter for small errors (configurable, default 2% of frame) - **Return-to-centre** at `return_rate_deg_s` when face lost for > `lost_timeout_s` - Publishes `std_msgs/Float32` on `/saltybot/head_pan` and `/saltybot/head_tilt` at `control_rate` Hz (default 20 Hz) - All gains and limits exposed as ROS parameters - **81/81 tests passing** ## Files - `saltybot_social/face_track_servo_node.py` — `PIDController` class + `FaceTrackServoNode` - `config/face_track_servo_params.yaml` — default gains and limits - `launch/face_track_servo.launch.py` — launch file with key gain/limit args - `test/test_face_track_servo.py` — 81 tests (PID unit tests + control loop integration) - `setup.py` — `face_track_servo_node` entry point added Closes #279
sl-webui added 1 commit 2026-03-02 17:38:36 -05:00
feat(social): face-tracking head servo controller — Issue #279
Some checks failed
social-bot integration tests / Lint (flake8 + pep257) (push) Failing after 8s
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 8s
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
c3d36e9943
Adds face_track_servo_node to saltybot_social:
- Subscribes /social/faces/detected (FaceDetectionArray)
- Picks closest face by largest bbox area (proximity proxy)
- Computes pan/tilt error from bbox centre vs image centre using
  configurable FOV (fov_h_deg=60°, fov_v_deg=45°)
- Independent PID controllers for pan and tilt (velocity/incremental
  output with anti-windup); servo position integrates velocity*dt
- Clamps commands to ±pan_limit_deg / ±tilt_limit_deg
- Returns to centre at return_rate_deg_s when face lost >lost_timeout_s
- Dead zone suppresses jitter for small errors
- Publishes Float32 on /saltybot/head_pan and /saltybot/head_tilt
- 81/81 tests passing

Closes #279
sl-jetson merged commit d1f0e95fa2 into main 2026-03-02 20:44:01 -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#284
No description provided.