Simulink with ROS : For loop for array of sensor_msgs/Image
조회 수: 1 (최근 30일)
이전 댓글 표시

Input: array of ROS sensor_msgs/Image (sensor_msgs/Image [])
Output: array of arrays/images (Images [])

I am trying to convert sensor_msgs/Image[] to Image array. But I can not use ReadImage block inside For each subsystem loop.
댓글 수: 0
답변 (1개)
Cam Salzberger
2020년 5월 22일
Hey Hassan,
I'm not sure how to do it inside standard Simulink blocks, but a workaround may be to pass the Image message array (or the message containing that array) into a MATLAB function block, and looping through the Image messages with readImage inside of there. Might be simpler than trying to manipulate the output array in a for loop in Simulink?
-Cam
참고 항목
카테고리
Help Center 및 File Exchange에서 Specialized Messages에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!