feat(perception): MediaPipe hand tracking — Leap Motion pivot (Issue #342) #345
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "sl-perception/issue-342-hand-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?
Part 1 — Audit
Zero Leap Motion / UltraLeap references found in any
saltybot_*package (searched all.py,.cpp,.hpp,.h,.launch.py,.yaml,.xml,.txt,.jsonfiles).Existing
gesture_node.pyinsaltybot_socialalready uses MediaPipe (import mediapipe as mpwith try/except) — no cleanup or migration required.Part 2 — New packages
saltybot_hand_tracking_msgs(ament_cmake)HandLandmarks.msg— per-hand result: 21 landmarks asfloat32[63](x,y,z × 21), handedness, gesture label, pointing direction, wrist positionHandLandmarksArray.msg— array wrappersaltybot_hand_tracking(ament_python)_hand_gestures.py— pure-Python gesture classifier (no ROS2/MediaPipe deps)stoppointdisarmconfirmfollow_megreetingWaveDetector: sliding-window,min_reversals=2,min_amplitude=0.08,history=24frames.hand_tracking_node.py— ROS2 node/camera/color/image_raw(BEST_EFFORT QoS)/saltybot/hands(HandLandmarksArray),/saltybot/hand_gesture(String)model_complexity=0(lite) for 20+ FPS target on Orin Nano SuperWaveDetectorinstances keyed by hand indexTest plan
Landmarkdataclass: fields, default z, frozenHandGestureResultNamedTuple fields_finger_up,_count_fingers_up,_four_fingers_curled,_thumb_curled,_thumb_extended_up_point_direction: up, right, left, upper_rightWaveDetector: too few samples, oscillation trigger, small amplitude, resetclassify_hand: all 6 gestures, priority ordering, flat-hand no-crash, wrist position, confidence bounds, wave beats static, <21 landmarks → noneCloses #342
🤖 Generated with Claude Code
PART 1 AUDIT: Zero Leap Motion / UltraLeap references found in any saltybot_* package. Existing gesture_node.py (saltybot_social) already uses MediaPipe — no cleanup required. PART 2 NEW PACKAGES: saltybot_hand_tracking_msgs (ament_cmake) - HandLandmarks.msg — 21 landmarks (float32[63]), handedness, gesture label + direction, wrist position - HandLandmarksArray.msg saltybot_hand_tracking (ament_python) - _hand_gestures.py — pure-Python gesture classifier (no ROS2/MP deps) Vocabulary: stop (open palm) → pause/stop, point (index up) → direction command + 8-compass, disarm (fist) → emergency-off, confirm (thumbs-up) → confirm action, follow_me (peace sign) → follow mode, greeting (wrist oscillation) → greeting response WaveDetector: sliding-window lateral wrist tracking - hand_tracking_node.py — ROS2 node sub: /camera/color/image_raw (BEST_EFFORT) pub: /saltybot/hands (HandLandmarksArray) /saltybot/hand_gesture (std_msgs/String) MediaPipe model_complexity=0 (lite) for 20+ FPS on Orin Nano Super; background MP init thread; per-hand WaveDetector instances - test/test_hand_gestures.py — 35 tests, 35 passing Covers: Landmark, HandGestureResult, WaveDetector, all 6 gesture classifiers, priority ordering, direction vectors, confidence bounds Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>