Repository navigation
fix: EstPose_p passes its frame argument to estpose - #210
Merged
Merged
Conversation
The block accepted frame ("world" or "camera") but never stored or used
it, so the pose was always given in the world frame. It now stores the
argument, rejects other values at construction, and passes it on. Adds
tests in tests/test_blocks.py, skipped when bdsim is not installed.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 5 |
| 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.
Summary
The
EstPose_pblock accepted aframeargument ("world"or"camera") and documented it, but never stored or used it, so the pose was always given with respect to the world frame. The block now storesframe, rejects any other value withValueErrorwhen it is constructed, and passes it toCentralCamera.estpose, which already supports it. The docstring gains a.. versionchanged:: 2.5.0note, because a block built withframe="camera"now returns a different pose.Adds
tests/test_blocks.py, the first bdsim block tests undertests/. It uses a camera that is not at the world origin, so the two frames give different answers, and checks the default ("world"),"camera", and a bad value. The module is skipped when bdsim is not installed. Moving the other block tests out of the package and installing bdsim in CI is a separate change.Not changed:
estposereturnsNoneif the solver fails, and the block then outputsNone.Testing
pytest tests/test_blocks.py: 4 passed. Three of the four fail onmainwithout the fix.mypyreports no issues. Not run: CI does not install bdsim yet, so these tests are skipped there until the follow-up change.This change was written with AI assistance (Claude Code) and the diff has been read by the maintainer.
🤖 Generated with Claude Code