Ask Your Question
0

MATLAB pointCloud to PointCloud2

asked 2018-04-17 17:52:14 -0500

I am looking to convert a MATLAB pointCloud object to a ROS PointCloud2 message. My application is receiving a point cloud, and processing the data in MATLAB. Then I wish to publish this cloud to ROS in the PointCloud2 format. I assume that since MATLAB can read the XYZ and RGB values in my subscribed PointCloud2 then there are translations between the two.

This is my current MATLAB pointCloud object that I wish to transform to something similar to the PointCloud2 that i receive.

MATLAB pointCloud

This is my received PointCloud2 message in MATLAB:

ROS PointCloud2 in MATLAB

I would very much appreciate any help! I think that I really don't understand how the PointCloud2 messages are formatted...

edit retag flag offensive close merge delete

Comments

cmfuhrman gravatar imagecmfuhrman ( 2018-04-17 18:03:24 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2018-05-23 10:50:47 -0500

Currently there does not appear to be a built-in method to create a PointCloud2 in the MATLAB Robotics Systems Toolbox.

edit flag offensive delete link more

Comments

Is there any update on this?

I am in the same situation and need to convert a Matlab pointCloud object to PointCloud2 object and the publish it.

Shantnu gravatar imageShantnu ( 2018-06-05 16:58:34 -0500 )edit

I was not able to publish a PointCloud2 from MATLAB easily. I was using MATLAB to process images and publish as PointCloud2, but ended up sending the images that make up the pointCloud and creating PointCloud2 with depth_image_proc node. Hope this helps you!

cmfuhrman gravatar imagecmfuhrman ( 2018-06-06 22:22:49 -0500 )edit
0

answered 2019-03-14 14:25:34 -0500

sea-bass gravatar image

Hi all,

It's almost been a year, but I just learned about this question!

I've written MATLAB and Simulink utilities to convert from Computer Vision System Toolbox to ROS PointCloud2 messages, and you can find them at the MATLAB Answers post (sorry, not enough points to upload here).

https://www.mathworks.com/matlabcentr...

  • Sebastian
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

2 followers

Stats

Asked: 2018-04-17 17:52:14 -0500

Seen: 645 times

Last updated: May 23 '18