Filter löschen
Filter löschen

Deploy ROS2 Node to Raspberry Pi while accessing GPIOS and communication interfaces

6 Ansichten (letzte 30 Tage)
Dear all,
I am looking for Hardware to deploy the firmware for a robot. I know that it is possible to use Simulink to run models on a Raspberry Pi that can access to its communication interfaces and GPIOs. I also know that Simulink is able to deploy ROS2 nodes to a Raspberry Pi once ROS2 is installed.
I was wondering if it is posible to merge blocks of both toolboxes in a single model that is run in the Raspberry, I mean, can I generate a ROS2 node that uses the GPIOs of the Raspberry by using Simulink?
I have been looking information about this in the Internet but I have not found anything.
Thanks a lot in advanced!

Antworten (1)

UDAYA PEDDIRAJU
UDAYA PEDDIRAJU am 25 Okt. 2023
Hi Julio,
As per my understanding, you’re looking to deploy a “ROS2” node on a Raspberry Pi using Simulink, and you want this node to be able to access the Raspberry Pi’s GPIOs and communication interfaces. It is possible and you can refer to the below attachments.
  1. Generate a Standalone “ROS2” Node from Simulink: https://www.mathworks.com/help/ros/ug/generate-a-standalone-ros2-node-from-simulink.html.
  2. Node Generation and Deployment: https://www.mathworks.com/help/ros/ros-node-generation-and-deployment.html.
  3. Get Started with “ROS2” in Simulink: https://www.mathworks.com/help/ros/ug/get-started-with-ros-2-in-simulink.html.
  4. Deploying “ROS” Node on Raspberry Pi Video: https://www.mathworks.com/videos/deploying-ros-node-on-raspberry-pi-1587374778793.html.
  5. Stream Images from Raspberry Pi Using “ROS”: https://www.mathworks.com/help/supportpkg/raspberrypi/ref/stream-images-from-raspberry-pi-using-robot-operating-system-ros.html.
  6. Merging Blocks: As per your query about merging blocks of both toolboxes in a single model, Simulink does provide the functionality to merge signals using the Merge block. This might be useful in combining inputs from both toolboxes into a single output: https://www.mathworks.com/help/simulink/slref/merging-signals.
Please note that you need to have Simulink Coder installed on your system to generate code for a standalone “ROS2” node. Also, ensure that “OpenSSH” is installed on the target “ROS” device before deployment.
I hope this helps!

Community Treasure Hunt

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

Start Hunting!

Translated by