-
Notifications
You must be signed in to change notification settings - Fork 82
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
Support for camera's calibration from input topic #7
Comments
I'd also investigate how other ROS nodes do this. There are a few methods for getting camera calibration files and I'm honestly not sure which is the best / most "standard". Some are using the topic, some are reading directly from the output of the camera calibration node (which contains the same info as the CameraInfo msg type), some are setting parameters in a config file like any other. Maybe a param for the "camera calibration filepath" to get the params from a camera calibration file and/or use the topic with |
I will take a look at Gazebo's for TB3 and see what that openVSLAM supports.
I saw this conversion. And I think I saw 3 model types (Not sure) Will cross-check and see where and what conversions are needed. like steve mentioned I will take a look at how other camera's ROS drivers handle this and see what's the best approach. |
I'd look at rtabmap as an example, see what they do |
Sorry for the delay here. And as of RTAB-MAP they register to So if we decide to use And as of the Gazebo Realsense for TB3 Plugin. It is same as perspective in openvslam. So no issues there. |
@ymd-stella does that seem reasonable? Is there any assumption in the code that its the same parameters camera that is across the board? What if there's an auto-focus camera in use? I think this would involve storing the important camera parameters along with the keyframe (if necessary, or just rectify at start so none of that matters). |
How strong calibration parameters could change in case of auto-focus was triggered? As I understand, now OpenVSLAM loads some averaged parameters on start, counting them as a first approximation to be constant for the whole session. |
I don't think sensor_msgs/CameraInfo is appropriate for representing the camera model supported by OpenVSLAM. If you do use topics, you should design a different type. Also, I have doubts about using topics for camera parameters. Shouldn't we use service or parameter API?
I had never thought of using a camera with changing parameters.
It is stored as a reference. This is also the reason why the camera should have fixed parameters. @AlexeyMerzlyakov
Where are you talking about? |
Usually, the ROS camera driver is being publishing camera calibration parameters in a camera info topic. The main goal of this ticket - is to support the camera calibration parameters delivered by info topics (like RTABMap-ROS does) in addition to input file. This could be convenient when running OpenVSLAM as a SLAM node as a part of whole navigation2 stack, where we could tune to what camera driver is published. Also, the structure of OpenVSLAM calibration format differs from that published in
During the camera operation such things like auto-focus could affect camera calibration parameters (e.g. focal length was changed when camera tuned to closer objects). Should this be taken into account and can calibration parameters be changed during the run-time in a camera info messages, that is my initial question. |
The "typical ROS-y" way of working with cameras is to have a synchronized topic If you're saying, though, that CameraInfo doesn't contain the right fields to describe the openVSLAM models, then this isn't a valid option and we can drop that part (though it looks like it is from glancing at example configuration files https://github.com/OpenVSLAM-Community/openvslam_ros/blob/ros2/example/kitti/KITTI_mono_03.yaml#L7-L26)
Its actually becoming increasingly common for robots to use things like smart phone cameras and other auto-focusing tools rather than fixed-lens ML cameras only. This in general isn't a problem if the pipeline rectifies the images on receipt and then throws them through the system (because then all of the stuff in openVSLAM would be calibration independent). It just requires taking in the current state of the camera calibration to use for that initial rectification. There isn't strictly a problem with the current implementation, but its extremely non-standard and we'd like to make the We're mostly working here on using best practices / conventions / tools, where possible, since our aim is to make this the #1 integration into VSLAM for ROS2. |
So, what's the final decision here? I can start making an initial draft of additional functions to add for handling the conversion and passing it to openVSLAM along with frame using an overloading function maybe... |
If As I understand from above, currently we are putting off dynamically changing calibration coefficients, since it is not supported by current implementation of OpenVSLAM. However, this could be resolved by camera ROS-driver providing a rectified input images. So, for now, let's assume one of the calibration coefficients from Finally, we do not need to add any new information or change map DB file produced by OpenVSLAM. @ymd-stella, @SteveMacenski, please correct me if I wrong. |
@saching13, are there any updates or news on it? |
@AlexeyMerzlyakov Sorry. I don't have an update yet. Have been a little overwhelmed at work for the past few weeks and couldn't allocate time to this. Will be working on it this weekend. Will post an update next week. |
I went through the code over the weekend and I can think of two ways to try this out.
Thoughts ? |
I think the latter is better. |
So how is this coming along. It would be really nice to do some experiments with this package on my realsense robot.
This the topic for fisheye1. They are the same.
|
maybe you could use this as a base. https://github.com/mindThomas/image_undistort/tree/t265_stereo_undistort |
Currently, camera calibration parameters are passing to openvslam_ros through a setting file only. Adding an ability to read incoming topic provided by a camera ROS driver would be a good point to work with.
It could be checked whether OpenVSLAM does support possible distortion models, coefficients formats, etc... from incoming topics. For example, Gazebo Realsense for TB3 is publishing {d, k, r, p} calibration coefficients while input file for OpenVSLAM has another camera coefficients format {fx/fy, cx/cy, k, p}, so it probably need to add a conversion from one format to another.
The text was updated successfully, but these errors were encountered: