An issue with subscribing to custom messages from ROS network

1 vue (au cours des 30 derniers jours)
Nima Mathwork
Nima Mathwork le 1 Fév 2021
Commenté : Nima Mathwork le 3 Fév 2021
Hello everyone
I am using the ROS toolbox of MATLAB R2020b on windows 10. I used ROS Custom Message Support for building my custom messages. I established a ROS network with another system with Ubuntu 18.04 OS. While I can publish topics to the network through Simulink, I could only subscribe to those topics I published from Simulink and not the topics published from the Ubuntu system.
What could cause this issue?

Réponse acceptée

Cam Salzberger
Cam Salzberger le 1 Fév 2021
Hello Nima,
Issues with ROS communication between machines, especially if messages can be received from one machine but not the other direction, are most commonly caused by the ROS_IP environment variable not being set correctly in the other machine (in this case, your Ubuntu machine). See this post for more details.
Another possibility is that your firewall isn't allowing communication. One quick-fix can be to mark MATLAB as a trusted program.
-Cam
  1 commentaire
Nima Mathwork
Nima Mathwork le 3 Fév 2021
Thank you Cam
I set the ROS_MASTER_URI and ROS_IP according to the suggestion from the link you provided. I also edit the firewall setting to allow MATLAB and Python to communicate through the Windows firewall.
Now, everything works smoothly.

Connectez-vous pour commenter.

Plus de réponses (0)

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by