feat: Issue #363 — P0 person tracking for follow-me mode #367
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "sl-perception/issue-363-person-tracking"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Implements a real-time person detection + tracking pipeline for the follow-me motion controller on Jetson Orin Nano Super (Intel D435i).
New message type
TargetTrack.msg: bearing_deg, distance_m, confidence, bbox, vel_bearing_dps, vel_dist_mps, depth_quality (0=invalid…3=good)Core library —
_person_tracker.py(pure Python, no ROS2/runtime deps)[cx, cy, w, h, vcx, vcy, vw, vh]with constant-velocity model[0,1](no epsilon overflow)bearing_from_pixel(atan2),depth_at_bbox(median ± quality flag)ROS2 node —
person_tracking_node.py/camera/color/image_raw,/camera/depth/image_rect_raw,/camera/depth/camera_info,/saltybot/follow_start,/saltybot/follow_stop/saltybot/target_trackat ≤30 fps (configurablemax_fps)d(bearing)/du = fx / (fx² + (u−cx)²) × (180/π)Tests —
test/test_person_tracker.pyTest plan
python3 -m pytest test/test_person_tracker.py -q)Closes #363
🤖 Generated with Claude Code
Implements real-time person detection + tracking pipeline for the follow-me motion controller on Jetson Orin Nano Super (D435i). Core components - TargetTrack.msg: bearing_deg, distance_m, confidence, bbox, vel_bearing_dps, vel_dist_mps, depth_quality (0-3) - _person_tracker.py (pure-Python, no ROS2/runtime deps): · 8-state constant-velocity Kalman filter [cx,cy,w,h,vcx,vcy,vw,vh] · Greedy IoU data association · HSV torso colour histogram re-ID (16H×8S, Bhattacharyya similarity) with fixed saturation clamping (s = (cmax−cmin)/cmax, clipped to [0,1]) · FollowTargetSelector: nearest person auto-lock, hold_frames hysteresis · TENTATIVE→ACTIVE after min_hits; LOST track removal after max_lost_frames with per-frame lost_age increment across all LOST tracks · bearing_from_pixel, depth_at_bbox (median, quality flags) - person_tracking_node.py: · YOLOv8n via ultralytics (TRT FP16 on first run) → HOG+SVM fallback · Subscribes colour + depth + camera_info + follow_start/stop · Publishes /saltybot/target_track at ≤30 fps - test/test_person_tracker.py: 59/59 tests passing Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>