Convert ROS greyscale image msg in Simulink

1 回表示 (過去 30 日間)
Michele Mondini
Michele Mondini 2018 年 2 月 21 日
回答済み: Tohru Kikawada 2019 年 5 月 2 日
Hi everyone,
I'm trying to convert a 320x240 greyscale image from Gazebo into Simulink (R2016b). Currently I was able to convert a 640x480 RGB image thanks to this previous answer. However,if I switch to different size (320x240 RGB) or if I only change the image format (640x480 GREYSCALE) I'm not able to perform a correct conversion anymore. The problem is that the input data bus size doesn't change accordingly after the new gazebo image format and dimensions setup (I double checked the size of the source image with rostopic echo ).
Where can be the error? Any suggestion? Thanks in advance

回答 (1 件)

Tohru Kikawada
Tohru Kikawada 2019 年 5 月 2 日
Try this Read Image block in Robotics System Toolbox. https://mathworks.com/help/robotics/ref/readimageblock.html

カテゴリ

Help Center および File ExchangeCode Generation についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by