필터 지우기
필터 지우기

Sending Images From Simulink to ROS

조회 수: 6 (최근 30일)
Syed Adil Ahmed
Syed Adil Ahmed 2020년 10월 15일
편집: Syed Adil Ahmed 2020년 10월 21일
Hi,
Ive been trying to send images from simulink to ros using the inbuilt /sensor_msgs/Image msg. For this purpose i tried deconstructing my MATLAB image into a ROS image by chaanging data to rgb rgb rgb .... format, so it can be sent serially. But when I do this and try to send. The bus assignment blocks dimensions for data dont match the dimensions of the data i calculated myself.
Can anybody explain the issue with this?
Also i tried changing image size and width to see if the dimensions of data variable change in the assignment block, but they remain same. Is it because Simulink doesnt support sending too large of data serially?
The image below shows what is inside the conversion from matlab to ros image function.
Thanks a lot for any help.

채택된 답변

Syed Adil Ahmed
Syed Adil Ahmed 2020년 10월 21일
편집: Syed Adil Ahmed 2020년 10월 21일
After searching and reading about ROS images and how matlab sends them through source code, i found the answer.
The answer lies in changing the array size maximum length for ros messages. This will allow you to send larger pictures, but probably will be slow.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Publishers and Subscribers에 대해 자세히 알아보기

제품


릴리스

R2019b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by