How to convert PointCloud2 fields from RGBA to RGB
Hi, I have pcd files and when I publish PointCloud2 using pcl_ros as
rosrun pcl_ros pcd_to_pointcloud my_file.pcd 0.1
It has the field of rgba
, not rgb
.
How can I convert this field to rgb
?
I'd like to re-publish this as PointCloudXYZRGB.
Asked by iHany on 2023-05-22 20:30:34 UTC
Comments
In my case, this works in my case.
My code snippet looks like (not a working example though):
ader, fields, _pcd)
Asked by iHany on 2023-05-23 02:43:29 UTC
Useful links: https://pointclouds.org/documentation/structpcl_1_1_point_x_y_z_r_g_b_a.html
http://docs.ros.org/en/jade/api/sensor_msgs/html/point__cloud2_8py_source.html
Asked by iHany on 2023-05-23 02:45:23 UTC