Getting point cloud from image_rect_color using stereo_image_proc
I have a bag publishing left and right camera_info and image_rect_color topics. How can I use stereo_image_proc to get the point cloud?
stereo_image_proc/disparity nodelet subscribes to image_rect and gives out disparity, which can be used by the stereo_image_proc/point_cloud2 nodelet.
Do I need to modify the source code, make a custom launch file or this can be done via an easier way that I am unable to see immediately? Afai understand, I have to convert to mono image and then maybe remap or publish to the relevant topic.
ROS_NAMESPACE=stereo rosrun stereo_image_proc stereo_image_proc -> here the whole node subscribes to raw images which I don't have as a topic.
https://github.com/ros-perception/ima... . Read the source. So, I need to comment out the debayer and rectify blocks. But I need an image_rect from image_rect_color(color to mono basically?) and then I can use the two nodelets.
As I had zero distortion - plumb bob model, with the parameters needed being [0,0,0,0,0], all I needed to do was remap:
rosbag play my_bag_file.bag /my_cam/left/image_rect_color:=/my_cam/left/image_raw /my_cam/right/image_rect_color:=/my_cam/right/image_raw