ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
cv::StereoBM (in rtabmap) may not be able to generate a disparity image, so the point cloud sent to PCLVisualizer is empty and not added, causing other functions assuming that the cloud is there to throw this error. If you send your stereo images to stereo_img_proc, can it produce a valid disparity image and a point cloud? Can you also update your question with an example of left and right images (those sent to rtabmap) with corresponding camera_info
?
2 | No.2 Revision |
cv::StereoBM (in rtabmap) may not be able to generate a disparity image, so the point cloud sent to PCLVisualizer is empty and not added, causing other functions assuming that the cloud is there to throw this error. If you send your stereo images to stereo_img_proc, can it produce a valid disparity image and a point cloud? Can you also update your question with an example of left and right images (those sent to rtabmap) with corresponding camera_info
?
EDIT
After trying the bag, here some problems:
A screenshot of the problems: Note the y error on left with superposed left and right images. On right the grid is 1 meter, frustums of both cameras are shown for reference (looking upward as there is no optical rotation).
3 | No.3 Revision |
cv::StereoBM (in rtabmap) may not be able to generate a disparity image, so the point cloud sent to PCLVisualizer is empty and not added, causing other functions assuming that the cloud is there to throw this error. If you send your stereo images to stereo_img_proc, can it produce a valid disparity image and a point cloud? Can you also update your question with an example of left and right images (those sent to rtabmap) with corresponding camera_info
?
EDIT
After trying the bag, here some problems:
A screenshot of the problems: Note the y error on left with superposed left and right images. On right the grid is 1 meter, frustums of both cameras are shown for reference (looking upward as there is no optical rotation).
EDIT2:
When I tested the bag, I didn't see problem with the number of disparities. See doc of StereoBM. Note that the number of disparities will create a border without disparity values of the same size on the left of the image. On images of 200 pixels width and StereoBM/NumDisparities
set to 128, you will have more than half of the image without disparity values. This can create empty clouds if no disparity can be computed for the other half. Thus number of disparities should be lowered for small images. Last note, if you are trying to map a white wall (textureless surface), disparity will be null, causing also an empty cloud. The recent code should not add to PCL visualizer an empty cloud, so the pcl error would not appear anymore.