OrbbecSDK_ROS1 icon indicating copy to clipboard operation
OrbbecSDK_ROS1 copied to clipboard

ROS CameraInfo message gets populated with incorrect information for Femto Mega

Open swankun opened this issue 1 year ago • 0 comments

When running the Femto Mega camera at the 3840x2160 resolution, the CameraInfo ROS message gets populated with the following intrinsic matrix:

$$ K = \begin{bmatrix} f_{x} & 0 & c_{x} \ 0 & f_{y} & c_{y} \ 0 & 0 & 1 \end{bmatrix} = \begin{bmatrix} 13489.9306640625 & 0 & 11447.90771484375 \ 0 & 13487.794921875 & 6276.52734375 \ 0 & 0 & 1 \end{bmatrix}, $$

which is clearly incorrect, as the camera center point $\left( c_{x}, c_{y} \right)$ are much different the nominal values of $\left( \frac{3840}{2}, \frac{2160}{2} \right)$.

However, when we request the camera parameters using the provided get_camera_params ROS service, the camera matrix (denoted by l_intr_p in the service response) the we get is as follows

$$ K = \begin{bmatrix} 2248.32177734375 & 0 & 1907.984619140625 \ 0 & 2247.9658203125 & 1046.087890625 \ 0 & 0 & 1 \end{bmatrix}. $$

This leads us to believe that the base width and base height are incorrectly populated in the following code by the SDK

https://github.com/orbbec/OrbbecSDK_ROS1/blob/09325b1f6fbc533e19969c6eacd76420938b33d0/src/ros_setup.cpp#L280-L281

which leads to the incorrect scaling factor in https://github.com/orbbec/OrbbecSDK_ROS1/blob/09325b1f6fbc533e19969c6eacd76420938b33d0/src/utils.cpp#L183-L191

The CameraInfo message is also incorrect for the registered depth image provided by the driver.

swankun avatar Sep 18 '23 15:09 swankun