Closed EricVoll closed 3 years ago
If you're going to check the camera parameters, I think it makes sense to check the height, width, and principal points as well. I think checking that all are >0 should catch NaNs too.
You are right about the height and width of the image. But I did not check the principal point because theoretically it can be zero. That might not happen often in practice though.
Fair point. You might (in very rare circumstances) have principal point coordinates of 0, but I don't think it's possible (at least with a pinhole camera model) for them to be negative, so you might want to do a >= check there.
This PR warns the user if the camera_info topic reports focal lenghts of zero in the camera_info topic, which results in an Error 400 down the road when trying to create anchors, since the ASA backend can (of course) not handle unkown camera intrinsics.
If you feel like this is not necessary since this is a responsibility of the user, please go ahead and delete this PR.