Repository navigation
fix: raise when the pose estimate of ESTPOSE_P fails - #264
Merged
Merged
Conversation
The block output None when CentralCamera.estpose found no solution, and the next block in the diagram received None as its input. It now raises RuntimeError, which bdsim reports with the block, the time and the input. The estpose :return: text also now says it can be None. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 6 |
| Duplication | 0 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes bug list item 11. The
ESTPOSE_Pblock outputNonewhenCentralCamera.estposefound no solution (OpenCVsolvePnPreturned no pose), and the next block in the diagram receivedNoneas its input.EstPose_p.outputraisesRuntimeError("pose estimation failed: method 'ippe' found no pose for 8 points"). bdsim prints the block, the time and the input and stops the run with a "Fatal failure" error caused by this one. I chose to raise, not hold the last pose, so that a bad setup is not hidden; a long run of failures would otherwise look like a frozen pose.:raises RuntimeError:and a.. versionchanged:: 2.5.0note.CentralCamera.estposealready returnedSE3 | None, and its:return:text now saysNoneis possible.Tests: with every image point at one position the
ippemethod finds no pose, soestposegivesNone(checked first), and the block raises with the method and point count in the message. A real bdsim diagram ofCONSTANT -> ESTPOSE_Pfails at compile with the error as its cause, and bdsim prints the block name. The existing frame tests are unchanged. mypy reports no issues and the full suite passes (2163 passed, 33 skipped).AI-assisted: written with Claude Code (Claude Sonnet 5.5) and reviewed by the maintainer.
🤖 Generated with Claude Code