現在この質問をフォロー中です
- フォローしているコンテンツ フィードに更新が表示されます。
- コミュニケーション基本設定に応じて電子メールを受け取ることができます。
Why this error is occuring while deploying in ROS2?
4 ビュー (過去 30 日間)
古いコメントを表示
Ahmed
2025 年 3 月 21 日
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 件のコメント
Jagadeesh Konakalla
2025 年 3 月 25 日
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
2025 年 3 月 25 日
Hey there, thanks for reaching out.
Yes, you're right. I'm using external mode.
But I need to tune variables real time when being deployed, that's the goal and that's why I'm using external mode. I change the variables by using the knob block in the library. Will copying and performing colcon build let me do that?
The other ROS2 machine is a laptop that has Ubuntu 22 and ROS2 Humble and connected by Wi-Fi. Just like the Intel Nuc where I'm trying to deploy. I tested the Simulink model several times there before trying to deploy on the Nuc. Everything seems to remain same, that's why I can't seem to figure out what's going wrong.
Jagadeesh Konakalla
2025 年 3 月 25 日
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
2025 年 3 月 25 日
But the remote target is a Linux machine with ROS2.
- Build and run as in using generate code? Used generate code once. Transfered the src file that was produced to the ros workspace in the Nuc and then used colcon build. It had a problem but was solved and worked fine. However I'm interested in external mode for reasons stated earlier. I need to change variable real time.
- I think so, Device vendor set as Intel and Device type as x86-64(Linux 64). Earlier when I tested on the laptop, Device type was x86-64(Windows 64). It work fine. I tested on Nuc before setting to Linux.
Jagadeesh Konakalla
2025 年 3 月 25 日
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.
Ahmed
2025 年 3 月 25 日
編集済み: Ahmed
2025 年 3 月 25 日
Wi-fi configurations are same as the laptop I tested on. I tested with different network as well like the hotspot of a mobile. Result from Testing connection is positive. I should add, the port on the Nuc was not the default port 22. that's why connection test failed. But it was changed to port 22 later and since then connection test was positive
Is connection seems to be the issue because of that line in diagnostics that says "Attempting to establish connection with hostname '10.55.3.116' through port 17725" ?
Actually, running program on the Nuc from MATLAB/ Simulink has never been attempted before to my knowledge. That's what I have been trying to verify, the publishing/ subscribing between host simulink and Nuc and that's where I keep facing the error that I mentioned in the beginning. I haven't tried subscribing to Nuc yet, only tried publishing so far. I expected it to work as it worked on a laptop. The laptop and the Nuc aren't that different right?
Here's the model I'm trying to deploy on the Nuc.

I tested build and run and it works fine.
Anything else that I should check?
Jagadeesh Konakalla
2025 年 3 月 25 日
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
2025 年 3 月 25 日
Here's the error snapshot

Didn't face any issue with port 17725 when deployed on laptop. Can you suggest how I should check if there's any issue? And how can I change the port? Simply type there a random number in place of 17725?
Abhishek
2025 年 3 月 26 日
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
2025 年 3 月 28 日
Hi there, I've tried as instructed. I changed the port number to 65535. Verbose was also enabled. It works on the laptop but the error still persists on the Nuc even after providing a different value in the 'Port' field. Here's the detailed error log. Is that what you were talking about or is it a different thing?

As for the root priveleges, during connection test in the diagnostics, it showed that user has administrative privileges. Is it not indicative of that?
Ahmed
2025 年 4 月 2 日
Hi, I tried the way you suggested for the root access. I followed the steps showed on the link you shared. However, the problem that is occurring is during the testing connection it cannot connect due to wrong name or password as it shows on the diagnostics. Also, I think simulink can't find ROS workspace.
採用された回答
Ahmed
2025 年 4 月 5 日
編集済み: Ahmed
2025 年 4 月 22 日
The issue has been solved. The problem was the firewall. It was activated in the Nuc therefore causing hamper in communication between the Nuc and Simulink therefore causing hindrance in external mod. In my opinion, if firewall could cause such a hindrance in external mode then it should have been discerned during the connection testing phase, during which no such an issue was discovered. I hope developers will keep that under consideration for future versions.
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!エラーが発生しました
ページに変更が加えられたため、アクションを完了できません。ページを再度読み込み、更新された状態を確認してください。
Web サイトの選択
Web サイトを選択すると、翻訳されたコンテンツにアクセスし、地域のイベントやサービスを確認できます。現在の位置情報に基づき、次のサイトの選択を推奨します:
また、以下のリストから Web サイトを選択することもできます。
最適なサイトパフォーマンスの取得方法
中国のサイト (中国語または英語) を選択することで、最適なサイトパフォーマンスが得られます。その他の国の MathWorks のサイトは、お客様の地域からのアクセスが最適化されていません。
南北アメリカ
- América Latina (Español)
- Canada (English)
- United States (English)
ヨーロッパ
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom(English)
アジア太平洋地域
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)