-
Notifications
You must be signed in to change notification settings - Fork 98
Description
I am trying to use the stereo_undistort node together with the Intel Realsense T265 camera.
Although I have corrected the camera_info output to include the baseline as part of the Projection matrix, the initialization of the rectified image intrinsics fails, see: realsenseai/realsense-ros#1242
The code appears to be stuck in the for loop within setOptimalOutputCameraParameters since the resolution never converges and just gets bigger and bigger. When it finally quits due to it exceeding the number of iterations the resolution is so be that the undistortion map generation (i.e. remap within OpenCV) crashes.
I have tried to limit the number of iterations in setOptimalOutputCameraParameters to just 1, leading to a reasonable resolution. In that case the undistortion appears to work for both left and right camera, although the right image is flipped upside down?
As a side note, why is the rectification parameters recomputed each time a new image is received (as part of the image callback calling setInputCameraParameters --> generateRectificationParameters --> setOptimalOutputCameraParameters)?