I keep dropping connection to a ROs device

조회 수: 29 (최근 30일)
CHRISTOPHER MILLAR
CHRISTOPHER MILLAR 2022년 1월 26일
댓글: CHRISTOPHER MILLAR 2022년 8월 22일
Hi,
I am working with some sensors that I access using ROS toolbox
Recently I have been getting the following error:
Caught "std::exception" Exception message is:
Connection to process with Exchange: "f59c06ba-0ce7-423c-85ba-168468cf70d9 " was lost.
I thought it was becuase sometimes the PC that has the ROS sensors connected to it (a different PC that I run Matlab on) screen locks after a while if there is no activity on the local machine. But I am getting the error message while the connection is still live.
When this happens i can no longer send any ROS messages or even run rosshutdown command
To resolve this issue I have had to restart Matlab which is not an ideal solution
Has anyone got any ideas on how I can stop it losing its connection to the ROS PC
Regards
Chris
  댓글 수: 2
Cam Salzberger
Cam Salzberger 2022년 1월 28일
Hello Christopher,
The "connection to process with exchange ... was lost" error message generally means that the ROS node has crashed. It runs in a separate process from MATLAB, so the whole program doesn't crash, just the node. But it can make it difficult to restart rosinit.
This can be difficult to diagnose without more involved troubleshooting, so I'd suggest contacting technical support for assistance. A couple things that you can provide to support to help them diagnose would be:
  • When does this error occur (right away when doing rosinit, after doing something else, or after a random amount of idle time)?
  • Where is the ROS Master located (MATLAB machine or other ROS machine)?
  • Does this happen if you keep everything local to just MATLAB (Master, nodes, publishers/subscribers)?
  • While you are connected to the other ROS machine and everything is set up normally (before the error), run "ros.internal.generateSupportFile" in MATLAB and send the generated file to support. This will provide them with a lot of relevant information about your environment setup and the ROS network.
-Cam
CHRISTOPHER MILLAR
CHRISTOPHER MILLAR 2022년 1월 28일
Hi Cam,
Thanks alot for the response.
There is no real pattern that i can see. I thought it was only happening when the host PC was idle but I was able to work as normal yesterday even though the screen had locked. Its is just a recent issue
Thanks for these troubleshooting pointers
I will use your 4th point to try and troubleshoot the issue if it happens again.
Kind Regards
Chris

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

채택된 답변

Jagadeesh Konakalla
Jagadeesh Konakalla 2022년 8월 19일
The "connection to process with exchange ... was lost" error message generally means that the ROS node has crashed. It runs in a separate process from MATLAB, so the whole program doesn't crash, just the node. But it can make it difficult to restart rosinit.
This can be difficult to diagnose without more involved troubleshooting, so I'd suggest contacting technical support for assistance. A couple things that you can provide to support to help them diagnose would be:
  • When does this error occur (right away when doing rosinit, after doing something else, or after a random amount of idle time)?
  • Where is the ROS Master located (MATLAB machine or other ROS machine)?
  • Does this happen if you keep everything local to just MATLAB (Master, nodes, publishers/subscribers)?
  • While you are connected to the other ROS machine and everything is set up normally (before the error), run "ros.internal.generateSupportFile" in MATLAB and send the generated file to support. This will provide them with a lot of relevant information about your environment setup and the ROS network.
  댓글 수: 1
CHRISTOPHER MILLAR
CHRISTOPHER MILLAR 2022년 8월 22일
I resolved this error using the ros.rate(); function in my code
since i introduced this measure I had no further issues with my code
Thanks for responding and helping
Kind Regards
Chris

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

추가 답변 (0개)

카테고리

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

태그

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by