CameraInfo does not follow render product resolution in Isaac Sim 5.1 (intended or bug?) #545
Replies: 3 comments
-
|
Hi @zfrancisco-zivid, Thanks for the detailed report and minimal repro — this is clearly documented. You're correct that read_camera_info() does not account for the render product resolution when the camera uses the opencvPinhole or opencvFisheye lens distortion model. In those code paths, width, height, fx, Interestingly, the fallback code path (when no lens distortion model is set) does use get_resolution(render_product_p ath) — so the inconsistency is limited to the opencvPinhole and opencvFisheye paths. We're checking with the team on whether this is intended behavior or a bug, and will follow up here once we have clarity. In the meantime, your workaround of manually scaling the intrinsics and resolution is the render_w, render_h = camera.get_resolution()
scale_x = render_w / camera_info.width
scale_y = render_h / camera_info.height
camera_info.width = render_w
camera_info.height = render_h
camera_info.k[0] *= scale_x # fx
camera_info.k[2] *= scale_x # cx
camera_info.k[4] *= scale_y # fy
camera_info.k[5] *= scale_y # cy
camera_info.p[0] *= scale_x # fx
camera_info.p[2] *= scale_x # cx
camera_info.p[5] *= scale_y # fy
camera_info.p[6] *= scale_y # cy Will update this thread once we have more information. |
Beta Was this translation helpful? Give feedback.
-
|
An internal ticket has been created to tracked this issue with the opencvPinhole and opencvFisheye lens models and we will update this thread once we have clarity. |
Beta Was this translation helpful? Give feedback.
-
|
Hi @DonghyunSung-MS, great news — the bug you reported with |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I observed an inconsistency between
ImageandCameraInfowhen publishing camera data in Isaac Sim 5.1.Setup
Observed behavior
/imagetopic:/camera_infotopic:So the image follows the render product resolution, but CameraInfo still reflects the original USD camera resolution.
Investigation
Looking into the source code of
read_camera_info(render_product_path):Therefore, CameraInfo is not scaled when render resolution is changed.
Minimal reproducible example
Question
Is this behavior intended?
In ROS2 ecosystem,
ImageandCameraInfoare expected to match:Otherwise, downstream nodes (point cloud, SLAM, rectification) may produce incorrect results.
Expected behavior
If render product resolution is changed, CameraInfo should:
Workaround
Currently, we manually scale:
based on render resolution.
Additional question
Is there a recommended way to generate CameraInfo that matches render product resolution?
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions