0
$\begingroup$

Rosanswers logo

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...


Originally posted by cmfuhrman on ROS Answers with karma: 200 on 2018-04-17

Post score: 0


Original comments

Comment by cmfuhrman on 2018-04-17:
Note: Question also asked on MATLAB Answers: https://www.mathworks.com/matlabcentral/answers/395620-ros-create-pointcloud2-from-matlab-pointcloud

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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


Originally posted by cmfuhrman with karma: 200 on 2018-05-23

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by Shantnu on 2018-06-05:
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.

Comment by cmfuhrman on 2018-06-06:
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!

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.