Generating pointcloud2 msg from numpy matrix
I have a numpy matrix with shape(720,1280,3). Which is x,y,z location data and dtype=np.float32 I also have a image with shape(720,1280,3). Which is r,g,b location data and dtype=np.uint8. And numpy matrix is get by the ros_numpy. What I want is use the image replace the rgb data in pointcloud2.
Can I transform those two numpy data into a pointcloud2 msg?