Debugging the Body Pose Drawing Issue: A Journey of Fixes, Frustrations & Still No Drawings

The idea was simple: detect wrist keypoints and draw using body pose tracking. But what we thought would be a straightforward implementation turned into a frustrating cycle of debugging, testing, and still not getting the drawings to appear. Here’s a breakdown of everything we tried—and how we’re still stuck at the final step.

1. Wrist Keypoints Were Detected, But No Drawing

At first, I confirmed that the bodyPose model was working, and could see wrist keypoints being detected in the console. However, even with wrist movement, nothing was being drawn on the canvas.

What I did:

Issue: Wrist detection was working, but no drawings appeared on the screen.

2. Distance Threshold Was Too Restrictive

Thinking that small hand movements were being ignored, added a distance threshold to only draw when the wrist moved significantly.

What I did:

Issue: The threshold was too high, preventing drawing altogether.

3. Lowering the Confidence Threshold

Wondered if the wrist detection was being filtered out because of a strict confidence requirement.

What I did:

Issue: Wrist detection became more frequent, but still no visible drawing.