-
Notifications
You must be signed in to change notification settings - Fork 333
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
Converting Point Cloud to Image Fails Without RGB Channel #366
Comments
Hey, its the same problem for me. I tried exactly the same script, but the PointCloud type isn't suitable. Did you made it running with one of these nodes? |
So I'm using a Velodyne VLP-16 with ROS Noetic. Relevant repo: https://github.com/EPVelasco/pc2image I ended up using this repo inside of a ROS Kinetic docker container and setting up the network as host. I also had to change my cv2 image encoding from mono16 to rgb8 in the source code of the mentioned link above due to some downstream requirements on image encoding. Unfortunately the code I linked does not work with ROS Noetic as the pcl library changed some things since this code was written. Could probably do a rewrite of this code, but I don't have a need to dig into it right now. The code seems to be pretty simple, it's just a matter of dealing with pcl function call changes if you wanted to make it compatible with newer versions of ROS. |
The
convert_pointcloud_to_image.cpp
tool does not work for many common point clouds. It depends on the point cloud including an RGB field, which would only make sense for RGB-D sensors.It looks like this may be a fundamental issue with the pcl library not supporting this type of conversion. Source of the bug:
perception_pcl/pcl_conversions/include/pcl_conversions/pcl_conversions.h
Line 521 in bd7a060
https://github.com/PointCloudLibrary/pcl/blob/83eecf88f56b9e6812d8875bfb30e1140e01dd5a/common/include/pcl/conversions.h#L316
I have found some converters people rolled themselves, though they are a bit old, so will take some work to get working on ROS Noetic:
https://github.com/v-lopez/pointcloud_to_rangeimage/tree/srcsim-fixes
https://github.com/EPVelasco/pc2image
The text was updated successfully, but these errors were encountered: