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

Matlab Ros Extract Point Cloud 2 BLOB

asked 2014-08-15 14:41:28 -0500

atp gravatar image

I'm using Matlab with ROS support, and I'm successfully reading PointCloud2 data from a Kinect. How can I extract the x,y,z,rgb data from the BLOB structure contained in the sensor_msgs/PointCloud2 message?

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted

answered 2014-08-18 09:05:59 -0500

paulbovbel gravatar image

The message contents are binary encoded, so Matlab doesn't know how to extract the data.

If you want to implement it yourself, you can take a look at how ROS does it in the read and write functions:

In the short term, it may be a lot easier for you to work with the depth image instead, as Matlab has all sorts of image processing/decoding functions.

edit flag offensive delete link more

answered 2015-01-13 11:04:06 -0500

karim02 gravatar image


I am new in ROS.

I am using MATLAB with ROS Hydro, I couldn't extract the cloud of points, in the "Trutlebotcommunicator" classdef I am using when I am whriting

    h.CloudPointsSub = h.Node.addSubscriber('/camera/depth/points', 'sensor_msgs/PointCloud2',1);


the code stck, and I should restart matlab.

Pleas could you explain to me How did read the PointCloud2 data from sensor_msgs/PointCloud2 message.

edit flag offensive delete link more

answered 2015-06-16 03:38:37 -0500

gori89 gravatar image

I have the same problem. Did you manage to read it?

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



Asked: 2014-08-15 14:41:28 -0500

Seen: 686 times

Last updated: Jan 13 '15