The ydlidar_ros2_driver_node provides two services /stop_scan and /start_scan which turn off/on the laser respectively. The main loop always attempts doProcessSimpleScan().
When the laser has been turned off via /stop_scan, the main loop assumes an error and improperly logs "[ERROR] time Failed to get scan".
An error should not be logged when the /stop_scan service has turned off the laser.
using version 1.0.2 Modified for Humble 10/2022
*** Calling ydlidar_ros_driver's /stop_scan service
ros2 service call /stop_scan std_srvs/Empty
[ydlidar_ros2_driver_node-1] [YDLIDAR] Now lidar scanning has stopped!
[ydlidar_ros2_driver_node-1] [ERROR] [1716343284.161687969] [ydlidar_ros2_driver_node]: Failed to get scan
[ydlidar_ros2_driver_node-1] [ERROR] [1716343284.234454572] [ydlidar_ros2_driver_node]: Failed to get scan
[ydlidar_ros2_driver_node-1] [ERROR] [1716343284.307347786] [ydlidar_ros2_driver_node]: Failed to get scan
The ydlidar_ros2_driver_node provides two services /stop_scan and /start_scan which turn off/on the laser respectively. The main loop always attempts doProcessSimpleScan().
When the laser has been turned off via /stop_scan, the main loop assumes an error and improperly logs "[ERROR] time Failed to get scan".
An error should not be logged when the /stop_scan service has turned off the laser.
using version 1.0.2 Modified for Humble 10/2022