Skip to content

fix: raise NotImplementedError for VISJAC_P depthest=True - #252

Merged
petercorke merged 2 commits into
mainfrom
bug/visjac-p-depthest
Nov 23, 2026
Merged

petercorke merged 2 commits into
mainfrom
bug/visjac-p-depthest

Conversation

@petercorke

Copy link
Copy Markdown
Owner

VISJAC_P(depthest=True) was accepted and ignored. The block stored depthest and never read it, so the Jacobian was always computed with the fixed depth (bug list item 9, found while annotating blocks/camera.py for Issue 60).

Depth estimation cannot be done by the block as it is: the estimator in VisualServo.py needs the camera's motion between frames, and the block's only input is the image points. A depth input port (the existing # TODO allow a depth input) would be a new feature.

  • Visjac_p(depthest=True) raises NotImplementedError, and the message says to give the depth with depth. depthest=False, the default, is unchanged.
  • The docstring says so, adds :raises:, describes what the block computes (the original ended in an unfinished sentence), and has .. versionchanged:: 2.5.0. The stale # do depth estimation here comment is removed.

Tests: depthest=True raises, and depthest=False gives the same Jacobian as the camera. mypy reports no issues and the full suite passes (2147 passed, 33 skipped).

The generated bdsim stub for VISJAC_P still says depthest defaults to True. That is in bdsim, so it is not changed here.

AI-assisted: written with Claude Code (Claude Sonnet 5.5) and reviewed by the maintainer.

🤖 Generated with Claude Code

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>
@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity · 0 duplication

Metric Results
Complexity 0
Duplication 0

View in Codacy

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.

@petercorke
petercorke merged commit 833eb61 into main Nov 23, 2026
34 checks passed
@petercorke
petercorke deleted the bug/visjac-p-depthest branch November 23, 2026 07:05
@github-actions github-actions Bot mentioned this pull request Nov 23, 2026
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.

1 participant