PepperlFuchs / pf_lidar_ros_driver

ROS driver for Pepperl+Fuchs R2000 and R2300 laser scanners
https://www.pepperl-fuchs.com/global/en/23097.htm
Apache License 2.0
39 stars 38 forks source link

safe feed time within the defined timeout #109

Closed hsd-dev closed 1 year ago

hsd-dev commented 1 year ago

Related to https://github.com/PepperlFuchs/pf_lidar_ros_driver/issues/107

protocol error (120 invalid handle) is only sent by the sensor when we send a request with handle to it. This could be: Start, Stop, Configuration of Scan, Watchdog feeding (via http)

Nothing on the scan is changed – so only the watchdog feed is left. An indication for this is that the error messages are with a gap of 60 s (default timeout):

[/r2000_node INFO 1676938855.149217]: Device state changed to Running
# Here the driver is running. Watchdog is getting fed successfully for 5,2h. 
# Then suppose that one feeding came too late. This will cause the release of the handle by the R2000.
[/r2000_node INFO 1676957815.357771]: protocol error: 120 Invalid handle or no handle provided
# Feeding the watchdog is not possible anymore, because the used handle was released.
[/r2000_node INFO 1676957875.153960]: protocol error: 120 Invalid handle or no handle provided

The PR sets a “safe” feed within the defined timeout.

hsd-dev commented 1 year ago

Still [WIP] because in case of

protocol error: 120 Invalid handle or no handle provided

the driver needs to detect a disconnect and then re-establish the connection