how to use the custom ros message from ros in simulink

1 回表示 (過去 30 日間)
Fei Yin
Fei Yin 2020 年 5 月 25 日
回答済み: Cam Salzberger 2020 年 5 月 26 日
Hello, everyone,
ich habe created a custom ros message in ros and a publisher with the custom defined message to publish my data. Now i want to creat a subscriber in simulink to subscribe the topic which i have published in ros. The question is , how can i to use custom ros message in simulink, which is already defined in ros.

回答 (1 件)

Cam Salzberger
Cam Salzberger 2020 年 5 月 26 日
Hello Fei,
If you have already used the custom messages with publishers and subscribers within MATLAB, then you should be able to use with within Simulink without any further changes. If the message shows in "rosmsg list", it should be available in Simulink.
If you have only used the custom messages in a ROS installation outside of MATLAB, you need to generate the message definitions within MATLAB as well. See this overview and this example for instructions on how to bring custom messages into MATLAB. You will need this support package.
-Cam

カテゴリ

Help Center および File ExchangeSpecialized Messages についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by