Hello, I want to use Simulink to display image from virtual Turtlebot camera inside Gazebo environment. I use ROS Kinetic on Ubuntu 16.04 and Gazebo 7.9 with Turtlebot model (i launch it with roslaunch turtlebot_gazebo turtlebot_world.launch)
I have all my ROS environment running and configured correctly. I can connect Matlab/Simulink to ROS without any issue. I start ros master on the Ubuntu machine then in matlab i type:
d = rosdevice
and i see all my ROS information, i configured everything in Simulink and everything works as intended, i can type
in Matlab and it matches what i see in Ubuntu with ROS, i can run a Simulink model that sends messages to topic /mobile_base/commands/velocity and Turtlebot inside Gazebo reacts to commands, all perfect.
The issue starts when I'm trying to display in Simulink image from camera by subscribing to /camera/rgb/image_raw topic. The displayed image is all black and block "Read Image" shows error code 1.
I checked in Ubuntu/ROS the image using rosrun image_view image_view image:=/camera/rgb/image_raw/ and it shows correct image all right.
I thought maybe something is wrong with my model so i decided to do this example step by step, exactly as described (including the step where i set max array size to be greater than 921,600 pixels) https://www.mathworks.com/help/robotics/ug/_mw_5e2d4386-0dfb-42f6-999a-0be47c23dc68.html and yet in the end the image output is also all black.
Help will be appreciated.