이 질문을 팔로우합니다.
- 팔로우하는 게시물 피드에서 업데이트를 확인할 수 있습니다.
- 정보 수신 기본 설정에 따라 이메일을 받을 수 있습니다.
Why this error is occuring while deploying in ROS2?
조회 수: 5 (최근 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!오류 발생
페이지가 변경되었기 때문에 동작을 완료할 수 없습니다. 업데이트된 상태를 보려면 페이지를 다시 불러오십시오.
웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 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 (한국어)