Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ROS node does not recover from power-cycle #79

Closed
kalectro opened this issue Mar 1, 2021 · 4 comments
Closed

ROS node does not recover from power-cycle #79

kalectro opened this issue Mar 1, 2021 · 4 comments

Comments

@kalectro
Copy link

kalectro commented Mar 1, 2021

When disconnecting the power to the scanners and reconnecting it, the ROS node is getting stuck. I would expect it to recover or fail when the scanner loses power.

Steps to reproduce for a MicroScan3:

  1. launch the sick_safetyscanners ROS node
  2. rostopic hz /scan (working)
  3. power-off the scanner -> rostopic hz will show no new messages
  4. power-on the scanner -> rostopic hz will continue showing no new messages
  5. rosnode kill
  6. rostopic hz will show messages again
@lenpuc
Copy link
Collaborator

lenpuc commented Mar 2, 2021

Hi,
thanks for opening the issue. Yes there is no watchdog implemented currently.
For implementing this there would be a few edge cases to be checked.

The communication from the sensor is based on UDP, therefore there is no check if the connection itself drops.
There are a few options to implement this:

  • Check if UDP packages arrive. However, there are dynamic reconfigure options to disable output from the scanner or sending the packages to different IP addresses. In this case the node should not stop and try to recover.
  • Periodically send a COLA2/TCP request to check if the sensor is alive.
  • Use system tool to check if a ping or so can be reached.

Is the sensor configuration from the safetydesigner the same as you are setting from ROS side, especially the IP addresses and which channels are enabled. And further are you using a defined UDP port and that is in the sensors persistent configuration as well. Then it might actually work through a power cycle.

@lenpuc
Copy link
Collaborator

lenpuc commented Mar 16, 2021

Since I am currently not planning to implement this, I am closing this.

If you plan on submitting a MR I am happy to discuss more details.

@lenpuc lenpuc closed this as completed Mar 16, 2021
@dbojadzic
Copy link

Is there a way to circumvent this by using the ROS2 package and lifecycle nodes to restart the communication?

@lenpuc
Copy link
Collaborator

lenpuc commented Sep 16, 2022

Hi, this is not implemented, you would need to implement the checks for reconnections. It is neither in the normal Nodes nor in the lifecycle nodes implemented yet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants