SICKAG / sick_safetyscanners

ROS driver for SICK safety laser scanners
https://www.sick.com/de/en/opto-electronic-protective-devices/safety-laser-scanners/c/g187225
Apache License 2.0
61 stars 59 forks source link

Feature/handle reconnection #130

Closed smalik007 closed 1 year ago

smalik007 commented 1 year ago

What is changed

  1. Changed returned types of TCP request API to bool from void, to capture unsuccessful connection to device and use those boolean on upper level APIs to take any action.
  2. Added configurable TCP connection retries using tcp_max_request_retries rosparam on initialization, if the device does not respond with max retries, the node exits cleanly with a ROS msg.
  3. On a successful connection, user has option to enable/disable udp packet monitoring using udp_connection_monitor rosparam, If enabled it will keep monitoring the udp packets that device is broadcasting for also configurable by watchdog time of udp_connection_monitor_watchdog_timeout_ms rosparam, when no udp packet is received for configured amount of time, the driver would go to reinitialize state and follow same sequence as described in point 1. When the connection is re-established and we receive a response to TCP packets the node resumes with normal operation.
  4. Added Connection Status field in GeneralSystemStateMsg.msg to have the device status reflected on the /diagnostics topic.
  5. Changed launch files to use config params loaded as yaml file to make it more readable and easy to maintain.
smalik007 commented 1 year ago

Declining because of conflict with master due a update just few hours ago, will re-submit again.