Skip to content

Update/freethrow animate robustness#5

Open
Shrey8 wants to merge 4 commits into
mlsedigital:mainfrom
Shrey8:update/freethrow-animate-robustness
Open

Update/freethrow animate robustness#5
Shrey8 wants to merge 4 commits into
mlsedigital:mainfrom
Shrey8:update/freethrow-animate-robustness

Conversation

@Shrey8
Copy link
Copy Markdown

@Shrey8 Shrey8 commented May 3, 2026

Summary

This PR improves free-throw animation reliability across sessions by handling differences in trial FPS and joint naming schemas, and adds focused test coverage/documentation for the new behavior.

Changes

  • Updated basketball/freethrow/animate.py to:

    • Use each trial's sampling_rate for animation interval (instead of assuming 30 FPS).
    • Resolve joint names across schema variants (e.g., R_HIPRIGHT_HIP).
    • Skip unresolved joint connections and deduplicate repeated connections.
    • Add a safe fallback for view-centering when hip markers are unavailable.
  • Added tests/test_animate.py with coverage for:

    • Joint alias resolution behavior.
    • Interval computation from sampling_rate.
    • Fallback to 30 FPS when sampling_rate is invalid.
  • Updated basketball/freethrow/README.md to:

    • Document animation robustness updates.
    • Add test execution instructions.
    • Note pytest install command if missing.
  • Updated .gitignore to ignore local development artifacts:

    • __pycache__/
    • *.py[cod]
    • .ipynb_checkpoints/
    • .python-version
    • .vscode/

Validation

Ran:

python -m pytest -q tests/test_animate.py

@Shrey8
Copy link
Copy Markdown
Author

Shrey8 commented May 3, 2026

Hi @robmackowiak & @sreekar-voleti!

Would appreciate a review when you have a chance. This PR improves animation robustness across sessions focusing on sampling_rate-aware interval + joint schema alias handling.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant