Deploying a ROS node on Raspberry Pi in external mode with Simulink
3 ビュー (過去 30 日間)
古いコメントを表示
Hi all,
I am working on a project that uses ROS and the Robotics Toolbox Package to run Simulink models (with ROS publishers and subscribers) on a Raspberry Pi. The model is generated on my laptop running Linux, and I can currently deploy a "standalone" ROS node to the Pi, where it communicates with other nodes running on that system. In this case all Simulink does is create the model, and send it to the Pi. Simulink doesn't have any capabilities of changing controller values within the model on the Pi, or reading data that is output from the model on the Pi.
What I am trying to do is deploy my Simulink model on the Pi, have it communicate with other ROS nodes that are running on the Pi, and then be able to read data back through Simulink. The last part is what I have yet to acheive, and I am wondering if anyone has some tips.
There are two paths that I can possibly see making this work, with each of them having some parts that I don't understand, which is preventing me from my goal:
- Deploy the Simulink model in "external mode" as an executable file. I have seen other projects use this method to communicate data between Simulink (on a PC) and a Raspberry Pi where the model is actually deployed. However, in needing to communicate with other ROS nodes, I am not certain that this deployed model will technically be within the ROS network. It is simply an executable that can be run outside of ROS master's knowledge. Will the model be able to publish and subscribe to ROS topics if it is running as a .elf file?
- Deploy the Simulink model as a standalone ROS node. This is currently how I have approached the problem to this point. Unfortunately, the node appears to be isolated from the laptop after it is deployed and cannot send information back to the Simulink program for reading data.
Any help would be very much appreciated!
0 件のコメント
回答 (2 件)
Tohru Kikawada
2019 年 5 月 5 日
編集済み: Tohru Kikawada
2019 年 5 月 5 日
I'd recommend you to try the first path. In the external mode, the deployed model can be running as a ROS node simultaneously like below: https://mathworks.com/help/robotics/ug/enable-external-mode-forrobotics-system-toolbox-models.html
0 件のコメント
Maitreyee Mordekar
2020 年 7 月 1 日
Hello Nathaniel,
You could try to go through the following video. The video explains how you can publish and subscribe between an ROS node in Simulink and a standalone ROS node deployed onto Pi:
I hope this helps!
-Maitreyee
1 件のコメント
Pedro Fabriz
2021 年 8 月 28 日
Hi! Is it possible to create a node in raspberry pi (like this node exists before i connected simulink) and them communicate with this node using simulink?
参考
カテゴリ
Help Center および File Exchange で Network Connection and Exploration についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!