-
Notifications
You must be signed in to change notification settings - Fork 92
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
stereo_undistort_node: rectification fails to generate valid P matrices #44
Comments
Sample output from the following command:
|
Had a quick look and all the inputs appear reasonable so this is likely a bug, I will try go through it in more detail today or tomorrow |
Thanks for looking into the issue. |
Hey @ZacharyTaylor - just wanted to let you know I can no longer reproduce this issue at my end. I am not sure what changed as no code seems to have changed. Maybe a clean build of the catkin workspace is what fixed it. Not sure. Sample output from the following command:
Notice that the |
FYI: There is some evidence to suggest the issue is caused by using compiler tools (
On my machine I have two alternatives for each (version 6 & 7) but they are all set to version 6. |
I can confirm @GoosebumpsFactory. I ran into the exact same problem and solved it by downgrading gcc from version 7 to 6. I followed link for changing the version. |
Any idea on how to solve this issue without downgrading gcc? |
It seems that this problem still exist. |
catkin build -DCMAKE_C_COMPILER=/usr/bin/gcc-6 -DCMAKE_CXX_COMPILER=/usr/bin/g++-6 |
Can confirm that the issue still exists
with Two observations:
|
I took another look at it. It appears to be caused by a numerical instability in the computation of image_undistort/src/camera_parameters.cpp Line 657 in a8fa9cd
In ROS Kinetic / Ubuntu 16.04 it returns a matrix like that one 0.9999524852420787, 0.003604255274427447, -0.009057405925931806, -0, -0.003604403123952235, 0.9999935041179618, -0, -0, 0.009057347090091339, 3.264654221433209e-05, 0.9999589808576612, -0, -0, -0, -0, 1 .
However, in ROS Noetic / Ubuntu 20.04 I tried to find a minimal example showing the problem for some time. However, it just seems to be the compile flag. Compiling You can see https://github.com/meyerjo/minimal_eigen_example for a minimal example and the respective output both in ubuntu 16.04 and in ubuntu 20.04 with the different optimization flags set. |
One addition: another solution would be to update Eigen to 3.4.0. This seems to at least solve this particular problem of the matrix inversion with the -Ofast flag (did not check the complete output). |
I am running ros noetic on ubuntu 20.04. and still cannot solve this issue, even with the above mentioned hot fixes. D ist still all zero. And I also noticed that even though my calibration with kalibr applied omni radtan model, the output of stereo_undistort gives equidistant as distortion model in the camera info. In the code I noticed that when it comes to the omni-radtan case, it is expecting 6 intrinsic parameters. But according to kalibr supported models omni has only 5 intrinsics parameters and radtan has 4 distortion coeffs. undistorter.cpp :
|
Thank you for releasing this useful package. I am seeing some unexpected behavior in
stereo_undistort_node
, which might be due to improper usage by me or possibly a bug in the code. I am seeingP
matrices generated bystereo_undistort_ node
with non-zeroy
andz
offsets.Here is a reproduction test that should help reproduce the issue at your end.
Usage:
roslaunch image_undistort rect_test.launch
The folder on google drive contains:
static.bag
: the example dataset that comes withKailbr
camchain-static.yaml
: generated using a fresh build ofKailbr/master
; I have also triedKalibr-CDE
rect_test.lauch
: a launch file that produces the following error at my end:[ERROR] [1538875392.391423846]: Image P matrices must match (excluding x offset)
[ERROR] [1538875392.391476697]: Camera info processing failed, skipping disparity generation
When I observe the rectified images using the following command they appear to be flipped in y-axis:
rqt_image_view /test/rect/first/image
Any pointers on debugging this issue would be really helpful. Thanks.
The text was updated successfully, but these errors were encountered: