add-exercise
Add a new exercise to vibereps. Use when the user wants to create a new exercise type with pose detection. Handles creating the JSON config file and detection logic.
安装与使用
请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。
查看来源 ↗使用指南技能说明
Add New Exercise
Instructions
When adding a new exercise to vibereps:
-
Read the template at
exercises/_template.jsonfor the JSON structure -
Choose a detection type based on the exercise motion:
-
angle- Joint angle changes (squats, pushups) -
height_baseline- Vertical movement from baseline (calf raises) -
height_relative- Position relative to reference point (jumping jacks) -
tilt- Torso lean (side stretches) -
distance- Body parts approaching each other (standing crunches) -
width_ratio- Shoulder/hip width ratio (torso twists) -
quadrant_tracking- Circular arm motion (arm circles)
-
-
Create the JSON config in
exercises/{exercise_name}.json -
Test detection by running the tracker
MediaPipe Landmark IDs
Key landmarks for detection:
- Shoulders: 11 (left), 12 (right)
- Elbows: 13 (left), 14 (right)
- Wrists: 15 (left), 16 (right)
- Hips: 23 (left), 24 (right)
- Knees: 25 (left), 26 (right)
- Ankles: 27 (left), 28 (right)
Example: Angle-based exercise
{
"id": "squats",
"name": "Squats",
"description": "Strengthens legs",
"category": "strength",
"reps": { "normal": 10, "quick": 5 },
"detection": {
"type": "angle",
"landmarks": {
"joint": [23, 25, 27],
"joint_alt": [24, 26, 28]
},
"thresholds": { "down": 120, "up": 150 }
},
"instructions": {
"ready": "Squat down below {down}°",
"down": "Good! Now stand up"
}
}
Testing
Run the tracker to test:
./exercise_tracker.py user_prompt_submit '{}'
使用示例
查看来源仓库中的使用示例与配置说明。
查看来源 ↗来源历史
- 收录时间
- 2026-01-20
- 索引更新时间
- 2026-02-02
- Branch
- main
收录与同步日期属于本站记录。源码修改历史请查看来源仓库。
GitHub ↗chat Comments (0)
Sign in to join the discussion and leave a comment.
No comments yet. Be the first to share your thoughts!