ROS | Camera depth image wrong depth values

Hello,

We have a robot with a camera mounted on it’s front.
In order to test the depth values the camera produces, we have this setup:
image.

We have aligned the camera to be exactly in the center of the block in front of it.

The block dimesions are width: 200 cm, height: 100 cm, thickness: 10 cm.
Distance between camera and block is ~164.4 cm from in a straight line to the block’s center.
Using the Pythagoras theorem, the distance from the top left corner and the camera should be ~198.8 cm (sqrt(164.4^2 + 100^2 + 50^2)).
Actual result is around ~163.9 cm.

image

data[720 / 2 * 1280 + 1280 / 2] is the middle pixel of the 720 * 1280 image.
data[0] is the top left 0,0 pixel according to ROS2 doc.

For what its worth, there is a big jump between pixel 817919 and 817920:
image

The robot is imported via urdf, if it matters (vaguely remember seeing something about scale issues in such a case).

I just realized that the depth is not the radial distance for each pixel, in other words it is not the distance of each pixel to the center point of the camera. Rather, it is the distance from the vertical plane of the camera, in other words a smooth surface in front of the camera, no matter how big would have the same distance.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.