how to use the custom ros message from ros in simulink

1 view (last 30 days)
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.

Answers (1)

Cam Salzberger
Cam Salzberger on 26 May 2020
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

Categories

Find more on Specialized Messages in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!