Note: Question also asked on ROS answers: https://answers.ros.org/question/288948/matlab-pointcloud-to-pointcloud2/
ROS create PointCloud2 from MATLAB pointCloud
조회 수: 6 (최근 30일)
이전 댓글 표시
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.
This is my received PointCloud2 message in MATLAB:
I would very much appreciate any help! I think that I really don't understand how the PointCloud2 messages are formatted...
채택된 답변
Sebastian Castro
2019년 3월 14일
Hello Connor,
It's almost been a year since you asked, 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 here.
If anyone would like to test them, let us know how it worked at roboticsarena@mathworks.com.
- Sebastian
댓글 수: 3
Amir Darwesh
2020년 6월 20일
Hi Jose,
I'm facing an issue with the lidarMsgOut.Data length. For some reason, the length cannot go beyond 128, even though I am setting lidarMsg.out.Data_SL_Info.CurrentLength to 554496.
Any help is appreciated!
Charles Zhang
2021년 3월 29일
Not sure if you still need this, but you should change your default array size limit for this message:
https://www.mathworks.com/help/ros/ug/manage-array-sizes-in-simulink-ros.html
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Get Started with ROS and ROS2 Connectivity Interface에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!