diff --git a/bouncy_frontend/src/lib/components/review/PoseReview.svelte b/bouncy_frontend/src/lib/components/review/PoseReview.svelte index e2fbc54..642e270 100644 --- a/bouncy_frontend/src/lib/components/review/PoseReview.svelte +++ b/bouncy_frontend/src/lib/components/review/PoseReview.svelte @@ -11,7 +11,7 @@ /** @type {PoseApproximation} */ export let pose; /** @type {number} */ - export let threshold = 0.075; + export let threshold = 0.05; $: max = 3 * threshold; /** @type {number} */ diff --git a/bouncy_frontend/static/courses/000-rm-basics.ron b/bouncy_frontend/static/courses/000-rm-basics.ron index fe7d0a5..c31ccc6 100644 --- a/bouncy_frontend/static/courses/000-rm-basics.ron +++ b/bouncy_frontend/static/courses/000-rm-basics.ron @@ -42,6 +42,7 @@ // ], // ), ( + // TODO: should I add an ID for better robustness in progress tracking across updates? names: {"de": "Kick", "en": "Kick"}, icon: "todo.svg", video: "/video/l1.mp4", @@ -265,11 +266,12 @@ name: "kick-right", direction: Right, limbs: [ - (limb: LeftThigh, angle: -10, tolerance: 5, weight: 0.5), - (limb: LeftShin, angle: -15, tolerance: 5, weight: 0.5), - (limb: LeftLeg, angle: -12, tolerance: 5, weight: 1.0), - (limb: RightThigh, angle: 25, tolerance: 5, weight: 1.0), - (limb: RightShin, angle: 20, tolerance: 10, weight: 0.5), + (limb: LeftThigh, angle: -10, tolerance: 5, weight: 0.25), + (limb: LeftShin, angle: -15, tolerance: 5, weight: 0.25), + (limb: LeftLeg, angle: -12, tolerance: 5, weight: 0.5), + (limb: RightThigh, angle: 30, tolerance: 5, weight: 0.5), + (limb: RightShin, angle: 25, tolerance: 5, weight: 0.5), + (limb: RightLeg, angle: 30, tolerance: 5, weight: 1.0), (limb: RightFoot, angle: 100, tolerance: 10, weight: 0.0), (limb: LeftFoot, angle: 90, tolerance: 0, weight: 0.0), (limb: LeftArm, angle: 0, tolerance: 0, weight: 0.0), @@ -283,11 +285,13 @@ name: "centered-sideway", direction: Right, limbs: [ - (limb: LeftShin, angle: 0, tolerance: 5, weight: 1.0), - (limb: LeftThigh, angle: 0, tolerance: 5, weight: 1.0), + (limb: LeftShin, angle: 0, tolerance: 2, weight: 0.0), + (limb: LeftThigh, angle: 0, tolerance: 2, weight: 0.0), + (limb: LeftLeg, angle: 0, tolerance: 0, weight: 1.0), (limb: LeftFoot, angle: 90, tolerance: 0, weight: 0.0), - (limb: RightShin, angle: 0, tolerance: 5, weight: 1.0), - (limb: RightThigh, angle: 0, tolerance: 5, weight: 1.0), + (limb: RightShin, angle: 0, tolerance: 2, weight: 0.0), + (limb: RightThigh, angle: 0, tolerance: 2, weight: 0.0), + (limb: RightLeg, angle: 0, tolerance: 0, weight: 1.0), (limb: RightArm, angle: 6, tolerance: 0, weight: 0.0), (limb: RightForearm, angle: 18, tolerance: 0, weight: 0.0), (limb: RightFoot, angle: 90, tolerance: 0, weight: 0.0), @@ -304,8 +308,9 @@ (limb: LeftShin, angle: -25, tolerance: 5, weight: 0.5), (limb: LeftLeg, angle: -30, tolerance: 5, weight: 1.0), (limb: RightThigh, angle: 40, tolerance: 5, weight: 1.0), - (limb: RightShin, angle: 0, tolerance: 10, weight: 0.5), - (limb: RightFoot, angle: 90, tolerance: 10, weight: 0.25), + (limb: RightShin, angle: 0, tolerance: 5, weight: 0.5), + (limb: RightLeg, angle: 10, tolerance: 5, weight: 0.5), + (limb: RightFoot, angle: 90, tolerance: 10, weight: 0.0), (limb: LeftFoot, angle: 90, tolerance: 0, weight: 0.0), (limb: LeftArm, angle: 0, tolerance: 0, weight: 0.0), (limb: LeftForearm, angle: 96, tolerance: 0, weight: 0.0), @@ -322,7 +327,7 @@ limbs: [ (limb: LeftLeg, angle: 0, tolerance: 3, weight: 1.0), (limb: RightLeg, angle: 0, tolerance: 5, weight: 0.5), - (limb: RightShin, angle: -30, tolerance: 5, weight: 1.0), + (limb: RightShin, angle: -50, tolerance: 10, weight: 1.0), (limb: RightThigh, angle: 60, tolerance: 5, weight: 1.0), (limb: LeftArm, angle: 6, tolerance: 0, weight: 0.0), (limb: LeftForearm, angle: 18, tolerance: 0, weight: 0.0), diff --git a/bouncy_instructor/src/intern/dance_detector.rs b/bouncy_instructor/src/intern/dance_detector.rs index b59f249..1e70ed6 100644 --- a/bouncy_instructor/src/intern/dance_detector.rs +++ b/bouncy_instructor/src/intern/dance_detector.rs @@ -73,7 +73,7 @@ impl Default for DanceDetector { Self { bpm: 120.0, half_speed: false, - error_threshold: 0.075, + error_threshold: 0.05, detected: DetectionResult::default(), target_step: None, tracked_beats: None, diff --git a/bouncy_instructor/src/intern/pose/approximation.rs b/bouncy_instructor/src/intern/pose/approximation.rs index e55cbbc..c54270a 100644 --- a/bouncy_instructor/src/intern/pose/approximation.rs +++ b/bouncy_instructor/src/intern/pose/approximation.rs @@ -100,11 +100,9 @@ impl Tracker { }; // for debugging, quite useful for now - for (angle, name) in skeleton - .angles() - .iter() - .zip(crate::intern::pose::Limb::base_limb_names()) - { + for (limb_index, _limb) in self.db.limbs() { + let name = self.db.limb_name(limb_index); + let angle = skeleton.angles()[limb_index.as_usize()]; crate::println!("{name}: {angle:?}"); }