kinecvt v2 depth messages are mono16, not TYPE_16UC1
When i tried to run :
roslaunch rtabmap_ros rgbd_mapping_kinect2.launch
i kept getting an error about the image encoding, but and when i looked, i saw the depth had an encoding of mono16, not
TYPE_16UC1, as was expected. This is from the kinect2_bridge application.
So I changed all TYPE_16UC1 to MONO16 in the code, and added "mono16" to the cv_bridge lines, like:
cv_bridge::CvImageConstPtr ptrDepth = cv_bridge::toCvShare(depth, "mono16");
does this look okay?
Now when i run i don't get any errors, but I don't think the point cloud is being built correctly.
Most of the time their is no cloud in the main part ofo the window, and sometimes it is there, but rotated 90 and translated pretty far from what I am currently pointing the camera at
Re: kinecvt v2 depth messages are mono16, not TYPE_16UC1
I checked the kinect2_bridge code and depth images are supposed to be TYPE_16UC1 (see here). What is exactly the error?
Well, TYPE_16UC1 in sensor_msgs is mono16 in OpenCV (or CV_16UC1). Your patch is ok though. I will add your changes as the depth images (if they are TYPE_32FC1) are eventually converted to CV_16UC1 anyway in the rtabmap library.
For the 90 rotation, make sure that TF is published by kinect2_bridge. See publish_tf parameter.