Skip to content

docs: document camera_stability tuning knobs - #437

Merged
kstonekuan merged 2 commits into
Hebbian-Robotics:mainfrom
Machumerre:patch-1
Sep 10, 2026
Merged

kstonekuan merged 2 commits into
Hebbian-Robotics:mainfrom
Machumerre:patch-1

Conversation

@Machumerre

Copy link
Copy Markdown
Contributor

What it does

  • Adds a new subsection in docs/how-to/enable-built-in-checks.md that explains the two optional arguments introduced in src/hflow/checks.py:948-949:
    • shake_threshold_dps – the angular velocity threshold (degrees per second) that defines a “shake”.
    • unstable_min_duration_s – the minimum duration (seconds) a camera must exceed the threshold to be considered unstable.
  • Provides a short example of how to use these knobs when enabling the check.
  • Updates the table of built-in checks to include the new parameters, mirroring the style used for topics=, nominal_fps=, and dimension_scales=.

Why it matters

  • Users who run camera_stability on hand-held footage will no longer see the entire episode marked as unstable.
  • The documentation now matches the code, preventing confusion and making the check useful for real-world recordings.

Summary

Why

Validation

Checklist

  • I added or updated outcome-focused tests for changed business logic.
  • I updated documentation for changed behavior, flags, formats, or requirements.
  • I ran uv run ruff check --fix, uv run ruff format, and uv run ty check.
  • I ran the relevant pytest suite.
  • I did not add recordings, generated media, credentials, private URLs, or runtime artifacts.
  • I preserved stored-data compatibility or documented an explicit version change.

### What it does
* Adds a new subsection in `docs/how-to/enable-built-in-checks.md` that explains the two optional arguments introduced in `src/hflow/checks.py:948-949`:
  * `shake_threshold_dps` – the angular velocity threshold (degrees per second) that defines a “shake”.
  * `unstable_min_duration_s` – the minimum duration (seconds) a camera must exceed the threshold to be considered unstable.
* Provides a short example of how to use these knobs when enabling the check.
* Updates the table of built-in checks to include the new parameters, mirroring the style used for `topics=`, `nominal_fps=`, and `dimension_scales=`.

### Why it matters
* Users who run `camera_stability` on hand-held footage will no longer see the entire episode marked as unstable.
* The documentation now matches the code, preventing confusion and making the check useful for real-world recordings.
@github-actions

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown

👋 Hi @Machumerre — thank you so much for your first contribution to HFlow!

A maintainer will review your pull request as soon as possible. In the meantime:

💡 Tip: one open pull request per contributor at a time. Issues with an assignee are taken; everything else is fair game.

We are excited to have you here and appreciate your help making the project better! 🙌

@kstonekuan kstonekuan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The example imports CameraStability, which does not exist. Use functools.partial(camera_stability, ...), the idiom already at :84-99.

The code fence is never closed.

Both descriptions are wrong in ways that matter: shake_threshold_dps is not total angular velocity (a fast pan is stable), and unstable_min_duration_s filters intervals only, so unstable_share and unstable_s do not move when you raise it.

Missing the reason the knobs exist, which is what #436 asked for.

Also: the section landed after "See also", and the file uses straight quotes.

@kstonekuan

kstonekuan commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Still want this one? The cap means it is holding your slot.

Shortest path: replace the CameraStability snippet with the functools.partial form (that class does not exist), close the fence, move the section beside the existing camera_stability paragraph at :172-177, and say why the knobs exist: hand-held footage clears the resolution floor continuously, so the check reads as broken.

Happy to unassign if you would rather hand it back.

Replaces the appended section with prose beside the existing camera_stability
paragraph, in the voice the rest of the page uses.

The example now runs. The previous one imported a CameraStability class that
does not exist, and my first replacement was wrong too: a functools.partial
has no __name__, so app.check needs name=. Both documented partial forms are
executed now, not eyeballed.

Says what Hebbian-Robotics#436 asked for and the table did not: why the knobs exist (hand-held
footage clears the resolution floor continuously, so the check reads as
broken), and that unstable_min_duration_s filters intervals only while
unstable_share and unstable_s do not move.

Also notes the name= requirement in the paragraph above, since hitting it is
what caught my own snippet.

@kstonekuan kstonekuan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, merging. Taking it over so the docs gap closes and your slot frees.

The section is prose beside the existing camera_stability paragraph now, and the example runs: functools.partial has no __name__, so app.check needs name=. Added that to the paragraph above.

shake_threshold_dps is a shake-versus-deliberate comparison, not angular velocity, and unstable_min_duration_s filters intervals only.

@kstonekuan
kstonekuan merged commit 44c33be into Hebbian-Robotics:main Sep 10, 2026
6 checks passed
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.

2 participants