MATLAB ROS2 node is not discoverable on Ubuntu (Virtual Machine)
Show older comments
Hi everyone,
I am experiencing a "ROS 2 node discovery issue" when connecting MATLAB R2026a on Windows to a ROS 2 Humble environment running inside an Ubuntu Virtual Machine (VMware, Bridged Network Mode).
Problem:
- MATLAB can see active topics via ros2 topic list, and I can successfully publish and subscribe to topics between MATLAB R2026a and Ubuntu Humble.
- Running ros2 node list in MATLAB only shows /matlab_node. Running ros2 node list in Ubuntu does not show the MATLAB node. Neither side sees the other's nodes.
Using the exact same Ubuntu Humble VM with MATLAB R2024b on another machine works completely fine. Both nodes and topics discover bidirectionally without any issues. The problem only occurs after transitioning to MATLAB R2026a.
My System & Environment Details:
- Host OS: Windows 10/11 (64-bit)
- MATLAB R2026a (with ROS Toolbox)
- ROS 2 Humble on Ubuntu 22.04 LTS (VMware Workstation, Bridged Adapter)
- Both Host and VM are on the same physical subnet (192.168.100.x) and can ping each other bidirectionally.
- Domain ID set identically on both ends.
Troubleshooting Steps Already Tried:
- Explicitly configured Domain ID on MATLAB:
setenv('ROS_DOMAIN_ID', '30');
- export ROS_DOMAIN_ID=30 in Ubuntu ~/.bashrc.
- Tested both default rmw_fastrtps_cpp and rmw_cyclonedds_cpp on both systems after clearing and restarting the ROS 2 daemon (ros2 daemon stop/start).
- Created custom DEFAULT_FASTRTPS_PROFILE.xml as per the MATLAB documentation.
- Verified inbound rules for C:\Program Files\MATLAB\R2026a\bin\win64\matlab.exe across Domain, Private, and Public profiles.
- Configured standalone Python 3.10 and recreated the Python virtual environment in ROS Toolbox preferences.
Has there been a change in how MATLAB R2026a initializes its background ROS 2 process or domain discovery compared to R2024b? Any insights or workarounds would be greatly appreciated.
Thank you,
Atta ul Wasay
Answers (1)
Abhishek
about 1 hour ago
0 votes
This is a known ROS 2 cross-distribution interoperability issue where topic communication works correctly, but node graph discovery (for example, ros2 node list) does not.
The key difference is that MATLAB R2024b uses ROS 2 Humble, while MATLAB R2026a uses ROS 2 Jazzy. Your previous setup was therefore Humble ↔ Humble, whereas the current setup is Jazzy ↔ Humble.
This root cause is caused by changes introduced in newer ROS 2 Jazzy, specifically in internal discovery-related message which is rmw_dds_common/msg/Gid.msg, between Humble and Jazzy.
To fix the issue:
- Update external ROS 2 Humble to the latest patch release.
- Or, apply the upstream fix described in ros2/rmw_fastrtps Issue #733
Thanks,
Abhishek.
Categories
Find more on Custom Message Support in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!