I keep dropping connection to a ROs device

13 次查看(过去 30 天)
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
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 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