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

조회 수: 28 (최근 30일)
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?

답변 (1개)

Frederik
Frederik 2025년 3월 8일
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
Joubert Jose
Joubert Jose 2025년 3월 10일
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 2025년 3월 25일
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.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 ROS Network Access in Simulink에 대해 자세히 알아보기

제품


릴리스

R2024b

Community Treasure Hunt

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

Start Hunting!

Translated by