Why this error is occuring while deploying in ROS2?
Show older comments
Hey all, I am trying to deploy in a ROS2 device from Simulink. I keep facing this error. FYI, the device being deployed in is Intel Nuc. It is being deployed through Wi-Fi. I also deployed in another ROS2 machine without any error therefore the Simulink model has no error by design. Please don't hesitate to ask for further information. Glad to provide to solve the issue.

11 Comments
Jagadeesh Konakalla
on 25 Mar 2025
From the error, looks like you are using external mode. Is that correct ? Or you just wanted to build and deploy ?
I suggest you to use Local Host Workflow and use Generate Code only option. You can see tar file in the folder where the simulink model is present. You can copy this tar file to Intel Nuc where the ROS 2 installation is available. Then you can untar and perfrom colcon build and run the executable node. Let me know if this works or not.
Also, you mentioned that it worked on other ROS 2 machine. What is the opertaing system of ROS2 machine that is working ? How is that connected to your Host machine ?
Ahmed
on 25 Mar 2025
Jagadeesh Konakalla
on 25 Mar 2025
We designed ROS 2 deployment workflow considering that Remote target is Linux machine with ROS 2 installed. I guess that may be the reason for failure.
- Are you able to do to Build and Run workflow on the Intel Nuc ?
- If so, in the Target Harware Resource, can you ensure that Device vendor and Device type Set correctly ?
Thanks,
JagadeeshK
Ahmed
on 25 Mar 2025
Jagadeesh Konakalla
on 25 Mar 2025
I understand that you are interested in ROS 2 external mode. You should be able to do if the Remote machine is linux.
Do you see any wi-fi configurations are different than the one working before ?
From the external mode error that you shared, it could be issue with connection only.
When you run simple program on the Intel Nuc, do you those nodes and topics in the Host MATLAB ? If so, looks like setup is good. Also verify that whether the two communication works, i.e publish from Host MATLAB and verify that remote Intel Nuc can see those nodes and topics and vice versa.
Jagadeesh Konakalla
on 25 Mar 2025
The external mode tries make connection to the target machine on the default Port 17725. Is there any issue on the Port 17725 ? You can change to other Port. Also, can you enable Verbose and provide the error snapshot.

Ahmed
on 25 Mar 2025
Abhishek
on 26 Mar 2025
Yes, try providing a different values in the 'Port' edit field in place of 17725. If this does not resolve the issue, enable the 'Verbose' option and provide the detailed error log.
Additionally, ensure that Simulink has the necessary access to initiate the process by verifying that the user has root privileges. You may create a dummy user with root access to determine if the issue is related to insufficient permissions. For reference on setting up a root user, refer to this MATLAB answer.
Ahmed
on 28 Mar 2025
Ahmed
on 2 Apr 2025
Accepted Answer
More Answers (0)
Categories
Find more on ROS Network Access in Simulink 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!

