sick_safetyscanners icon indicating copy to clipboard operation
sick_safetyscanners copied to clipboard

Use system tool to ping connection of a sick scanner

Open LotfiZ opened this issue 2 years ago • 2 comments

Context

In some applications, we need to restart the scanners (from a PLC) without necessary restart the unit that run ROS driver.

Actual Behavior

If we restart the scanners while the ROS driver is running, the actual behavior is that no data are output because there is no way to check if the connection is dropped so the node is getting stuck. This is explained here : #79, #95.

Feature Behavior

From #79, @puck-fzi gave some options to implement a watchdog, so i tried to implement the "easier" one but not the best i concede. However, in our case its working!

So i used the system tool to ping the IP address of the scanner in a separate thread and check if a packet is received or not. If its not the case, shutdown the node and after that you can respawn with specific tag in a launch file or maybe with another way. The objective here is to check for a disconnection while the ROS driver is running.

Finally, i dont know if this pull could be merged to the principal branch but it could be useful for people who had the same issue.

Thank you!

LotfiZ avatar Sep 19 '22 18:09 LotfiZ

Hi Thanks for contributing.

I will have a look through it. The feature might be useful for different applications. Thanks

lenpuc avatar Jan 10 '23 15:01 lenpuc

For now, I will not integrate it into the main branch, however, I am leaving this PR open, so other people can see and use it

lenpuc avatar Apr 04 '23 09:04 lenpuc