Skip to content

Fix camera aperture offset warning for negative offsets - #7268

Open
sylvesterkaczmarek wants to merge 5 commits into
isaac-sim:developfrom
sylvesterkaczmarek:fix/camera-aperture-offset-warning
Open

Fix camera aperture offset warning for negative offsets#7268
sylvesterkaczmarek wants to merge 5 commits into
isaac-sim:developfrom
sylvesterkaczmarek:fix/camera-aperture-offset-warning

Conversation

@sylvesterkaczmarek

Copy link
Copy Markdown

Description

Fixes the unsupported camera aperture-offset warning in convert_camera_intrinsics_to_usd().

The current condition applies abs() to the result of a boolean expression rather than to the signed principal-point offsets themselves. As a result, positive deviations of c_x / c_y from image center trigger the warning, while equally valid negative deviations silently do not.

This change applies the absolute value to each offset before comparing it with the tolerance, so unsupported principal-point offsets are detected symmetrically on either side of image center.

Type of change

  • Bug fix

Validation

  • Added pytest.mark.unit regression coverage for negative horizontal and vertical principal-point offsets.
  • Added a centered-principal-point case verifying that no warning is emitted.
  • Source change is one condition only.
  • Added the required isaaclab changelog fragment.
  • Full Isaac Lab test suite was not run locally.

Checklist

  • I have read and understood the contribution guidelines
  • I have added regression tests
  • I have added the required changelog fragment
  • No new dependencies

@sylvesterkaczmarek
sylvesterkaczmarek requested a review from a team August 21, 2026 12:19
@github-actions github-actions Bot added bug Something isn't working isaac-lab Related to Isaac Lab team labels Aug 21, 2026
@greptile-apps

greptile-apps Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Corrects camera aperture-offset warning detection by comparing the absolute horizontal and vertical principal-point offsets independently.

  • Detects unsupported offsets symmetrically around the image center.
  • Adds unit coverage for negative horizontal and vertical offsets and for a centered principal point.
  • Adds the corresponding Isaac Lab changelog fragment.

Confidence Score: 5/5

The PR appears safe to merge with no actionable correctness or security issues identified.

The revised predicate matches the documented intent for both Python and NumPy scalar inputs, and the regression tests cover the corrected negative-offset behavior and centered case.

Important Files Changed

Filename Overview
source/isaaclab/isaaclab/utils/sensors.py Correctly moves abs() from the combined boolean result to each signed principal-point offset.
source/isaaclab/test/utils/test_sensor_utils.py Adds focused regression tests for negative offsets and the centered no-warning case.
source/isaaclab/changelog.d/sylvesterkaczmarek-camera-aperture-offset-warning.patch.rst Accurately documents the corrected symmetric aperture-offset detection.

Reviews (1): Last reviewed commit: "Add camera offset warning changelog" | Re-trigger Greptile

@isaaclab-review-bot isaaclab-review-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Isaac Lab Review Bot

The PR correctly fixes the warning predicate by applying abs() to each principal-point offset, making detection symmetric around the image center. Focused regression tests and the required isaaclab changelog fragment are included.

  • Design and architecture: The change remains confined to the existing advisory warning in isaaclab.utils.sensors; package boundaries, dependencies, and module responsibilities are unchanged.
  • API: The function signature, defaults, return structure, and calculated USD camera parameters remain unchanged. The only observable behavior change is that negative principal-point offsets now emit the same unsupported-offset warning as positive offsets.
  • Implementation: The revised condition independently compares the absolute horizontal and vertical offsets against the existing tolerance. The tests cover negative offsets on each axis and confirm that a centered principal point remains silent. No material implementation issue is evident from the changed paths.

No blocking issues. No inline issue met the actionable-evidence threshold; the assessment above records the review feedback.

Automated review; human maintainers own approval decisions.

@AntoineRichard AntoineRichard 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.

AI review disclosure: This review was produced with assistance from multiple AI systems.

Thank you for putting this PR together.

Assessment: Predicate fix is correct and tests cover negative and centered offsets.

Findings: Invalid .patch.rst filename and fragment content lacks a recognized Fixed heading/bullet.

Requested changes: Rename to .rst; format as Fixed/carets/bullet; run changelog gate.

Changelog filename: Rename the current <slug>.patch.rst fragment to <slug>.rst for this patch-level change. IsaacLab accepts <slug>.rst (patch), <slug>.minor.rst, and <slug>.major.rst; it does not accept a .patch.rst suffix.

Test scope: Focused predicate tests are sufficient; do not expand them.

Documentation / AI skills: No additional documentation update is required: changelog is the appropriate release-note surface. No AI-skill update is required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working isaac-lab Related to Isaac Lab team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants