Hello,
I'm trying to create a Simulink model using the ROS network. My PC is the master of the network, and there is also a remote device: a Raspberry Pi 4. A USB3 camera is connected to Raspberry Pi4, it works with its own drivers. What I've done since now is the following: on the Raspberry I run a file named camera.launch (included in the drivers package), it creates nodes and topics for the camera. Using the subscriber block in Simulink I subscribe one of the topics created to exctrat the image, also using ros read image block and viewer block to display the image. Then I process the image with a blob detection. What I would like to do next is publish the image processed to the ROS network. To do this I use the publisher block. The problem is how can I create a new topic and node if needded, to send the image processed to? Is it possible to this in Simulink?
Also, during the simulation time the video viewer shows a video and not a single image. How can I obtain a single image from ros read image or the viewer video? I see in the latter one there is a snapshot key but how can I do this automatically within press that key?
Thank you
Silvia