Simulink fails to create ROS subscriber

1 view (last 30 days)
Johan Fanas
Johan Fanas on 29 Jan 2021
Commented: Cam Salzberger on 1 Feb 2021
I am trying to subscribe to a topic using the subscriber block in Simulink and I am getting the error shown in the attached image. I created the custom message and it appears in the command window when I do rosmsg list, so I don't know why it says it can't find that message in the library. Maybe there is something else I need to add so Matlab finds the generated message. I am using Matlab 2020b.

Answers (1)

Cam Salzberger
Cam Salzberger on 29 Jan 2021
Hello Johan,
This may be because you have conflicting libraries on your platform's library path. It may be related to this bug, or this one, that were both fixed in R2020b Update 3. Try getting the latest update and see if that resolves the issue.
Also see here for a similar issue with suggested resolutions. Though that question is regarding ROS 2, similar issues may be found in ROS 1.
Cam Salzberger
Cam Salzberger on 1 Feb 2021
Hey Johan,
That issue is a little more difficult to diagnose from the error message. I'd suggest that you contact technical support with your custom message package(s) and your model. They can better dig into what's going on in the model, and diagnose the issue.

Sign in to comment.




Community Treasure Hunt

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

Start Hunting!