-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Published camera_info messages not compatible with image_geometry::StereoCameraModel #872
Comments
I was not aware of that convention. It means that there shouldn't be published a static transform for infra2 nor a topic named |
That spec can be found in the comment of the CameraInfo message definition: |
Additionally to @stwirth 's comment, for me the convention is also being compatible with stereo_imag_proc. The expectation I have is that with the appropriate topic remapping, one could run stereo_image_proc.launch by streaming monochrome images + camera info without any hiccups. Currently, you are going to get asserts failed in the point cloud nodelet and in the disparity nodelet due to the frame mismatch. I run into this issue in particular as I'm benchmarking different methods of disparity estimation to improve upon the on-board 3D reconstruction and wanted to reuse the point_cloud2 nodelet.
It would still be a separate and proper sensor, just with the optical center now located in infra1's frame. But I do see your point about no longer being able to treat infra2 as an isolated monocular camera. If someone incorrectly assumed you could just use the frame_id and the intrinsic matrix from infra2's camera_info, it would be incorrect.The consistency here is that this is true for all ROS stereo cameras. |
The frame_id of the camera_info message published on
/camera/infra2/camera_info
is camera_infra2_optical_frame. This is not compatible with theimage_geometry::StereoCameraModel
class as StereoCameraModel::fromCameraInfo() makes the assumption that the left and right camera_info messages are in the same frame. So modifying the second camera to use the first camera frame would be more in line with ROS convention.Without digging into the realsense-ros code, my hacky fix was to subscribe, modify the frame and projection matrix, and republish the modified camera_info as below, but an upstream fix would be preferred if posible.
The text was updated successfully, but these errors were encountered: