Skip to content

fix: resolve camera resolution warning#192

Merged
ktro2828 merged 1 commit into
mainfrom
fix/viewer/resolution-warning
Sep 30, 2025
Merged

fix: resolve camera resolution warning#192
ktro2828 merged 1 commit into
mainfrom
fix/viewer/resolution-warning

Conversation

@ktro2828

@ktro2828 ktro2828 commented Sep 30, 2025

Copy link
Copy Markdown
Collaborator

What

This pull request enhances the rendering of sensor calibration, specifically improving support for camera sensors by allowing camera resolution to be passed through the rendering pipeline. The main changes involve updating the render_calibration methods in the RerunViewer to accept an optional resolution parameter and ensuring this information is properly handled and logged for camera modalities.

Before this PR, the following warning is displayed:

$ t4viz scene ./data/annotation_dataset/65785904-4f0a-4e3f-adf7-2935ecdb5db8/
[2025-09-30T05:54:11Z WARN  re_space_view_spatial::ui_2d] Pinhole projection lacks resolution.

Camera calibration improvements:

  • Updated the render_calibration and related methods (_render_calibration_with_schema, _render_calibration_without_schema) in t4_devkit/viewer/viewer.py to accept an optional resolution parameter, allowing camera resolution (width, height) to be specified and passed through the rendering pipeline. [1] [2] [3] [4] [5] [6]
  • Modified the logging for camera sensors to include the resolution in the rr.Pinhole call, ensuring that the camera's image size is accurately represented in the visualization.
  • Updated the _render_sensor_calibration method in t4_devkit/helper/rendering.py to pass the sample data's width and height as resolution when rendering camera calibrations.

Type and import updates:

  • Added Vector2Like to the imports from t4_devkit.typing in t4_devkit/viewer/viewer.py to support the new resolution parameter type.
    chore: bump to v0.3.0 #191

Signed-off-by: ktro2828 <kotaro.uetake@tier4.jp>
Copilot AI review requested due to automatic review settings September 30, 2025 05:53
@github-actions github-actions Bot added the bug Something isn't working label Sep 30, 2025

Copilot AI 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.

Pull Request Overview

This PR fixes a camera resolution warning by enhancing the rendering of sensor calibration to properly handle camera resolution information. The changes add support for passing camera resolution through the rendering pipeline and ensures this information is properly logged for camera modalities.

  • Added optional resolution parameter to calibration rendering methods
  • Updated camera sensor rendering to include resolution in rr.Pinhole calls
  • Modified helper rendering to pass sample data dimensions for camera sensors

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
t4_devkit/viewer/viewer.py Added Vector2Like import and resolution parameter to calibration rendering methods
t4_devkit/helper/rendering.py Updated sensor calibration rendering to pass resolution for camera sensors

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread t4_devkit/viewer/viewer.py
@github-actions

github-actions Bot commented Sep 30, 2025

Copy link
Copy Markdown
Contributor

☂️ Python Coverage

current status: ❌

Overall Coverage

Lines Covered Coverage Threshold Status
2678 2034 76% 50% 🟢

New Files

No new covered files...

Modified Files

File Coverage Status
t4_devkit/helper/rendering.py 15% 🔴
t4_devkit/viewer/viewer.py 84% 🟢
TOTAL 49% 🔴

updated for commit: a8b8c4f by action🐍

@ktro2828 ktro2828 merged commit 47eb584 into main Sep 30, 2025
4 of 5 checks passed
@ktro2828 ktro2828 deleted the fix/viewer/resolution-warning branch September 30, 2025 06:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants