Repository navigation
chore: annotate the camera blocks and correct their docstrings - #253
Merged
Merged
Conversation
IMAGEPLANE(watch=True) failed with AttributeError ('StartPlug' object has no
attribute 'start'), because ImagePlane added its input signals to the
watchlist itself and bdsim 1.5 now does that in GraphicsBlock.start. It also
made a second figure, leaving the one the base class makes empty, and
opened a figure when graphics were turned off. watch goes to the base class,
start() uses the figure and axes it makes, data is collected in record(),
which runs for every accepted sample, and step() only redraws.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Part of Issue 60. Adds annotations to every parameter and return in blocks/camera.py, removes :type: lines the annotations replace, and corrects docstrings: the ImagePlane examples were SCOPE examples, the Visjac_p default for depthest and the EstPose_p shape of P were wrong, the Visjac_p text was an unfinished sentence, and the module docstring sat after the imports. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Visjac_p stored depthest and never used it, so depthest=True silently gave the Jacobian for the fixed depth. Depth estimation needs the camera motion, which the block does not have as an input, so it raises instead. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Not up to standards ⛔🔴 Issues
|
| Category | Results |
|---|---|
| ErrorProne | 1 high |
🟢 Metrics 0 complexity · 0 duplication
Metric Results Complexity 0 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.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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.
Annotates
blocks/camera.py, the first file in the type-hint work of Issue 60 (it had no annotations at all: 32 of 32 parameters and 9 of 9 returns). Annotation and docstring changes only, no behaviour change.X | None,dict[str, Any]). The camera arguments are typed asCameraBase, orCentralCamerawhere the block needsvisjac_porestpose. Theoutput,stepandstartsignatures match bdsim's.:type:lines that the annotations replace are gone, and the ones where shape adds information stay. TheImagePlaneexamples wereSCOPEexamples and are nowIMAGEPLANEexamples.Visjac_psaiddepthestdefaults to True (it is False) and ended in an unfinished sentence,EstPose_pgavePas ndarray(2,N) (it is 3xN), and theCAMERAport list named an inputposethat isξ. The module docstring sat after the imports, so it was not a docstring.ImagePlane'sstylewas documented as accepting a list, which raisesValueError.Stacked on PR 251 (ImagePlane for bdsim 1.5) and the
VISJAC_Pdepthestfix (PR below), which have to merge first, because they change theImagePlaneandVisjac_pcode annotated here. TheVisjac_pdocstring keeps the text of that fix.AI-assisted: written with Claude Code (Claude Sonnet 5.5) and reviewed by the maintainer.
🤖 Generated with Claude Code