-
Notifications
You must be signed in to change notification settings - Fork 22
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
Get camera intrinsics from camera_info topic #26
base: master
Are you sure you want to change the base?
Get camera intrinsics from camera_info topic #26
Conversation
Thanks for the PR @schornakj. I didn't open #25 for you to fix it, but just wanted to get some input on whether something like that would fit with the library. We'll test this and let you know. |
Thank you for implementing this @schornakj! I have just tested this in our current setup using the Zivid One+ 3D camera and I am not too familiar yet with this type of camera's but the Zivid only publishes the If this is the standard for this type of cameras, would it be an idea to check for the existence of the |
It was a quick addition so it seemed worthwhile to just go ahead and do it.
Good point, I think the ROS nodes for other single-shot 3D cameras like Photoneo's PhoXi work similarly. We could check in this order:
I don't think we'd want to continue initializing the node with default camera intrinsics: if the camera matrix is wrong the reconstruction will be heavily distorted, and if the resolution is wrong I think it might crash with an out-of-bounds exception at some point. This is a situation where it would be beneficial to not be required to set camera intrinsics when the node initializes and instead tie them to each new incoming image, as described in this comment and this yak issue. |
Yeah, that sounds great. Just a question, what would be the benefit of keeping step 1. instead of skipping it altogether?
Initializing without correct intrinsics would indeed not make much sense.
When using a single camera with static intrinsics it may be overkill, but it is definitely a nice addition in a multi-camera setup or other situations with changing intrinsics. |
I think it depends on how much we trust the user to set correct intrinsics as parameters vs. how much we trust the camera driver to publish accurate data on its Revised steps:
|
Implements #25 (@gavanderhoorn)
ros::topic::waitForMessage
when initializing the yak_ros node to get camera intrinsics published on thecamera_info
topic for the subscribed depth camera. If no topic is found, fall back to loading from ROS parameters instead.image_transport::CameraPublisher
, which publishes acamera_info
topic. The default depth image topic is nowsim_depth_camera/image
, and camera info is published onsim_depth_camera/camera_info
.demo.launch
to use this new functionality. In particular note that the topic remaps have changed.