From 542190622453d9d9b5a517c9e29d482fe5087971 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20Hamb=C3=B6ck?= Date: Tue, 16 Sep 2025 01:24:27 +0200 Subject: [PATCH] fix: change calculation from fy to match square pixel assumption --- .../isaacsim.ros2.bridge/python/impl/camera_info_utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/extensions/isaacsim.ros2.bridge/python/impl/camera_info_utils.py b/source/extensions/isaacsim.ros2.bridge/python/impl/camera_info_utils.py index 81ccf4f3..1266bcdc 100644 --- a/source/extensions/isaacsim.ros2.bridge/python/impl/camera_info_utils.py +++ b/source/extensions/isaacsim.ros2.bridge/python/impl/camera_info_utils.py @@ -81,10 +81,10 @@ def read_camera_info(render_product_path: str) -> Tuple: width, height = get_resolution(render_product_path=render_product_path) focalLength = camera_prim.GetAttribute("focalLength").Get() horizontalAperture = camera_prim.GetAttribute("horizontalAperture").Get() - verticalAperture = camera_prim.GetAttribute("verticalAperture").Get() + # We assume that we have square pixels so fy = height * focalLength / (horizontalAperture * (height / width)) fx = width * focalLength / horizontalAperture - fy = height * focalLength / verticalAperture + fy = height * focalLength / (horizontalAperture * (height / width)) cx = width * 0.5 cy = height * 0.5