When unexpectedly unplugged the sweep_node consumes 100% of CPU cycles and reports no errors. Use on autonomous unmanned systems will require improved failure reporting. Ideally this can be done without spiking CPU usage as well. Finally I would like to achieve failure recovery, so I can just plug the sensor back in and it starts back up smoothly(assuming /dev path stays the same).
Repro steps:
Plugin sensor
Start a system monitor: htop
Start sweep_node roslaunch sweep_ros sweep.launch
Wait until scans are collected(1-5s): rostopic hz /pc2
Unplug sensor
Observed result
CPU usage goes from ~0.1% to over 90%
No error messages in /rosout or log files
Node stops publishing to /pc2 topic
Expected result
Error message indicating some form of sensor failure/read timeout
When unexpectedly unplugged the sweep_node consumes 100% of CPU cycles and reports no errors. Use on autonomous unmanned systems will require improved failure reporting. Ideally this can be done without spiking CPU usage as well. Finally I would like to achieve failure recovery, so I can just plug the sensor back in and it starts back up smoothly(assuming /dev path stays the same).
Repro steps:
htop
roslaunch sweep_ros sweep.launch
rostopic hz /pc2
Observed result
/pc2
topicExpected result