![Read Image message in Simulink](https://www.mathworks.com/matlabcentral/answers/uploaded_files/696554/Read%20Image%20message%20in%20Simulink.png)
Difference in current length and receive length in bus selector block in simulink
조회 수: 1 (최근 30일)
이전 댓글 표시
hi, im taking image array from ROS node which is of lenght 3072x1 but in simulink im receiving only 128x1 length and not able to retrive rest of the data. please refer below snap -
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/696029/image.png)
you can see that recive lenght is 3072 and current length is 128, please help me to solve this problem, im taking rgb image from ROS node and trying to process in matlab, thanks.
댓글 수: 0
채택된 답변
Abhijeet Gadkari
2021년 7월 27일
Hello Kartik,
sensor_msgs/Image is a type of ROS message that contains variable sized sub-message fields.
As shown in the Modify maximum Size of Variable-length Array section of that example, you need to set the correct array-size of the "Data" message field for "sensor_msgs/Image".
Following snapshot of the Simulink model shows this setup.
![Read Image message in Simulink](https://www.mathworks.com/matlabcentral/answers/uploaded_files/696554/Read%20Image%20message%20in%20Simulink.png)
Let us know if this answers your questions.
- Abhijeet
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Publishers and Subscribers에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!