Connecting Simulink on Windows to ROS2 Jazzy Running in a VMWare Virtual Machine

29 vues (au cours des 30 derniers jours)
Joubert Jose
Joubert Jose le 7 Mar 2025
Commenté : Abhishek le 25 Mar 2025
Hello,
I am Trying to connect MATLAB (and Simulink) running in my windows 11 Host computer to ROS2 Jazzy running in a Virtual Machine (VMWare) with Unbuntu 24.04.
Although many sources suggested using a briged network connection between host and guest, that did not work for me. I was able to set a network adapter to "Host-Only" between the VM and the Host. After disabling the windows firewall I was able to ping the VM through windows and vice versa.
I then Launched a turtleSim node on the VM, to see if i could visualize it in MATLAB, therefore:
  • In my Ubuntu terminal I sourced my environment and set a ROS_DOMAIN_ID to 99, and ran the node.
  • In my MATLAB console I: Set the same ROS_DOMAIN_ID
setenv('ROS_DOMAIN_ID', '99');
  • Tried to visualize topics and nodes running in the network:
ros2 topic list
ros2 node list
  • The output to both of these commands was: "Transport stopped."
  • Furthermore, in another test, I tried creating a node first, in the same domain ID, I got the following:
Is there anything I am missing and I should check? I am not very familiar with network connections and such things, so I don't know where to look to further debug this issue, is it more likely a connection issue, or a MATLAB issue?

Réponses (1)

Frederik
Frederik le 8 Mar 2025
Hello Joubert,
I have the exact same issue and found this:
ROS2 Jazzy is not yet compatible with the ROS Toolbox in Matlab and Simulink. You should install ROS 2 Humble if running Matlab 2024b. See the website above for more information.
Best regards and good luck.
  2 commentaires
Joubert Jose
Joubert Jose le 10 Mar 2025
Hello Frederik,
Thank you for your answer. I just tried to do the same using a VM with Humble and indeed it worked. I guess it will be the workaround until I get more info on working with Jazzy.
Thank you very much!
Abhishek
Abhishek le 25 Mar 2025
Hi Joubert and Frederik,
ROS Toolbox will support ROS 2 Jazzy in MATLAB R2025a. You can try it now with the MATLAB R2025a Prerelease.
Best regards.

Connectez-vous pour commenter.

Produits


Version

R2024b

Community Treasure Hunt

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

Start Hunting!

Translated by