Skip to content

fix: correct MPFIT covariance extraction and lighthouse indexing - #373

Merged
bl4ckb0ne merged 1 commit into
collabora:masterfrom
shkwon98:fix/mpfit-covariance
Sep 15, 2026
Merged

bl4ckb0ne merged 1 commit into
collabora:masterfrom
shkwon98:fix/mpfit-covariance

Conversation

@shkwon98

Copy link
Copy Markdown
Contributor

Problem

The online MPFIT path passes free-parameter covariance directly to helpers expecting lighthouse-only covariance. These helpers also index blocks by processing order rather than the actual lighthouse index. Additionally, the fixed 28×28 buffer can be too small for the optimizer output.

Fix

  • Expand covariance into full parameter indices before extracting pose blocks.
  • Select lighthouse blocks by their original index.
  • Size storage by the parameter count and return only the object's 7×7 covariance.

- Expand free-parameter covariance before extracting lighthouse and object pose blocks, preserving indices for fixed parameters.
- Select lighthouse covariance by the actual lighthouse index when poses are skipped or reordered for the reference lighthouse.
- Size optimizer covariance storage from the full parameter count instead of a fixed 28x28 buffer, and return only the object pose's 7x7 block.

Validation: built survive and poser_mpfit in Debug mode; git diff --cached --check passed. Runtime and regression tests have not been run.

@bl4ckb0ne bl4ckb0ne left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM. If any generative AI was used in this commit it must be disclosed using the Assisted-by trailer tag.

@shkwon98

Copy link
Copy Markdown
Contributor Author

@bl4ckb0ne For this task, I only received AI assistance for writing commit messages and pull requests.

@bl4ckb0ne

Copy link
Copy Markdown
Collaborator

Mh then in that case i don't think the Assisted-by trailer tag is required, thanks for clarifying the usage.

@bl4ckb0ne
bl4ckb0ne merged commit df22f2d into collabora:master Sep 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants