Robotics StackExchange | Archived questions

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?

Asked by kankanzheli1997 on 2022-07-04 11:09:45 UTC

Comments

Answers

Finally, I sloved this problem by ros-numpy

Asked by kankanzheli1997 on 2022-07-06 00:05:23 UTC

Comments