0
$\begingroup$

Rosanswers logo

I am looking to create a PointCloud2 message in MATLAB and publish back to ROS via the Robotics Systems Toolbox. I am receiving a PointCloud2 message from my Intel Realsense camera and processing the RGB data for a lane detection algorithm. I am then using the distance data to know how far away the line is and to also integrate into my local Costmap for use in the Navigation Stack.

Is there a quick and dirty way to create this message in MATLAB. There is a function called readRGB and readXYZ within MATLAB to extract a depth image and a color image from the rgbd PointCloud2 but I cannot get that information back into the PointCloud2 message. I am not very familiar with using Point Clouds and would appreciate any help!!


Originally posted by cmfuhrman on ROS Answers with karma: 200 on 2018-05-15

Post score: 1

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Looking at the Robotics Systems Toolbox, there definitely isn't a quick way although there may be a dirty way!

If the Height, Width, ... , Fields, and Data properties allow writing you could add this data in manually yourself. But this is a very clunky task to achieve in MatLab.

Creating point cloud messages doesn't seem to be a task they wanted you do with this toolbox!


Originally posted by PeteBlackerThe3rd with karma: 9529 on 2018-05-16

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by cmfuhrman on 2018-05-16:
Do you recommend another method for processing a 3D cloud? I have been looking at the Point Cloud Library but have no experience with it.

Comment by PeteBlackerThe3rd on 2018-05-16:
I'm an only school c++ coder so I would naturally recommend PCL, it's very powerful as well as easy to extend with your own algorithms. If you're comfortable working in c++ then you should definitely give it at go.

Comment by PeteBlackerThe3rd on 2018-05-16:
They have a fairly good range of examples and theoretical tutorials to get you started, and it's fully integrated with ROS.

Comment by cmfuhrman on 2018-05-17:
Thank you for your assistance!

$\endgroup$

Your Answer

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