ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

Generating pointcloud2 msg from numpy matrix

asked 2022-07-04 11:09:45 -0500

kankanzheli1997 gravatar image

updated 2022-07-04 11:27:05 -0500

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?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2022-07-06 00:05:23 -0500

kankanzheli1997 gravatar image

Finally, I sloved this problem by ros-numpy

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2022-07-04 11:09:45 -0500

Seen: 23 times

Last updated: Jul 06