How jfasoltholmes/freehand works
FreeHand maps webcam hand motion to a 3D-printed robotic hand. The main workflow captures frames, detects landmarks, extracts normalized finger distances, maps them through per-finger calibration, and streams angles to firmware for servo actuation. The README also describes landmark visualization and mechanical assembly; the repository includes hand-part models. Python vision and mapping are concentrated in main.py, while firmware parsing and servo control are in firmware/src/main.cpp. Wiring follows the sampled code; mechanical behavior is described in the README, not implemented here.
Main entry points: main.py Frame capture · main.cpp Firmware receiver · hand_landmarker.task Hand model · handfiles Hand components
Components 17
Vision
- Frame capture
main.py - Landmark detector
main.py - Hand model
hand_landmarker.task - Landmark snapshot
main.py - Landmark display
main.py
Mapping and transport
- Finger distances
main.py - Angle calibration
main.py - Serial sender
main.py
Embedded actuation
- Firmware receiver
firmware/src/main.cpp - Angle parser
firmware/src/main.cpp - Servo control
firmware/src/main.cpp
Mechanical hand
- Hand components
handfiles
Other components
- Hand motion
- Webcam
- USB serial
- Five servos
- Robotic hand
Connections 18
- Hand motion → Webcam: moves before
- Webcam → Frame capture: supplies frames
- Frame capture → Landmark detector: submits frames
- Hand model → Landmark detector: configures
- Landmark detector → Landmark snapshot: callback stores
- Frame capture → Landmark snapshot: reads
- Frame capture → Landmark display: draws landmarks
- Landmark snapshot → Finger distances: provides landmarks
- Finger distances → Angle calibration: provides distances
- Angle calibration → Serial sender: provides angles
- Serial sender → USB serial: writes angles
- USB serial → Firmware receiver: delivers line
- Firmware receiver → Angle parser: parses input
- Firmware receiver → Servo control: constrains and writes
- Angle parser → Servo control: returns angles
- Servo control → Five servos: sets positions
- Five servos → Robotic hand: actuates
- Hand components → Robotic hand: forms structure