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:
.
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.
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:
The robot is imported via urdf, if it matters (vaguely remember seeing something about scale issues in such a case).