-
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
Baseline calculation problem in rtabmap stereo with camera info from D435i #1310
Comments
The information regarding the baseline does not appear in the camera info as each cameraInfo topic describes a single sensor. It appears in the tf messages. |
If I understand correctly from the PR the data in "/camera/infra1/camera_info" and /camera/infra2/camera_info" is currently not correct(RealSense ROS v2.2.15) and the mentioned PR will solve it? |
This issue is being discussed for a long time now. The main reason is that I wan't convinced what "correct" is, nor how to check it. |
It's not parameters that should be obtained from the Intel-Realsense hardware team? |
I'd like to know if that PR works for you. |
I've updated to the PR you mentioned, it seems that now the baseline in not 0.0 but I'm still getting this error: I've tried to switch between the cameras topics but the stereo_odometry node crashed with a segmentation fault from Eigen. |
@DronistB Thanks for your verification feedback! We've linked to the contributor of PR#1242 to see if any input about this. Thanks! |
@DronistB Personally I have been struggling with getting a rectification process working with the T265 camera. Whether or not you would be struggling with similar issues is unfamiliar to me. |
Hi, |
I am not sure that rtabmap, and thus the stereo_odometry node, supports the fisheye calibration used for the Realsense cameras |
Thanks @mindThomas |
@DronistB Did you get it through? Thanks! |
@DronistB Did you still have question about this? Looking forward to your update. Thanks! |
@DronistB Sorry we didn't hear from you for weeks. Will close this at this point. Please feel free to create new one if you still have questions or issues. Thanks! |
I also have the same issue when run vins-fusion supported rtabmap: |
I would be really happy to get a solution to this problem as well.
Does the get_intrinsics function returns false data? |
The value regarding the distance between the 2 cameras is not coming from |
According to stereo convention: |
@pavloblindnology I think the documentation of the stereo convention is contradicting.
Given that the z-axis is pointing in the camera viewing direction and the y-axis is pointing down, then the x-axis is pointing right such that the optical center of the right camera must be at a positive x-axis value relative to the left camera. Hence Tx should be positive for the right camera.
However this line in the documentation tends to suggest the opposite, namely that Tx of the right camera should have negative sign. |
@mindThomas It's actually not contradicting. "is related" doesn't mean "is identical". It's related, sure, because it's negative value proportional to baseline. Anyway, we have exact formula for Tx calculation, which always has higher priority than somewhat unclear description. And it gives a negative value. Besides, the logic of P-matrix which I described above assumes Tx negative for right camera. |
@pavloblindnology The sentence specifically say that Tx and Ty is the position of the optical center of the second (right) camera in the first (left) camera's frame |
@mindThomas Where did you get that sentence? From sensor_msgs/CameraInfo we read
|
@pavloblindnology I will give you that the wording in the documentation, i.e. the use of 'related', is ambiguous. Saying something is related can basically mean anything. A function argument, In any case I do agree with your math and the interpretation that you highlight. ProofAnother way to look at it in my opinion is rather to say that the fourth column of the projection matrix for the RIGHT camera (
With the convention that
Where:
And to project from WORLD into the RIGHT camera frame we would add the transformation matrix between the frames:
Comparing this to the previous LEFT projection equation leaves us with:
Which concludes the derivation by stating that:
Where Q.E.D. |
@mindThomas Sure. Your derivation is correct. My analysis wasn't a derivation - just a quick analysis of the final result. |
Thank you @pavloblindnology and @mindThomas for your deep and elaborate discussion and the time and effort you put into it. |
@dorohni I have created the following PR which would correct this baseline issue and fix the Projection matrix according to our discussion. |
Hi,
I'm getting this error in rtabmap odometry stereo:
The stereo baseline (0.0) should be positive (baseline=-Tx/fx). We assume a horizontal left/right stereo "
"setup where the Tx (or P(0,3)) is negative in the right camera info msg."
It takes data from both /camera/infra1/camera_info and /camera/infra2/camera_info to calculate based on this equation:
baseline = right_.fx()!=0.0 && left_.fx() != 0.0 ? left_.Tx() / left_.fx() - right_.Tx()/right_.fx():0.0;
I found out that both left_.Tx and right_.Tx in the camera info topics are both 0.0,
How can it be if the baseline should be 0.05m(The distance between the infra camera)?
The text was updated successfully, but these errors were encountered: