MATLAB Answers

how to use the custom ros message from ros in simulink

3 views (last 30 days)
Fei Yin
Fei Yin on 25 May 2020
Answered: Cam Salzberger on 26 May 2020
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.

  0 Comments

Sign in to comment.

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

  0 Comments

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!