Slamtec / rplidar_ros

BSD 2-Clause "Simplified" License
497 stars 532 forks source link

【Rplidar S2】SomeCan not start scan: 80008000! #61

Closed berlin2049 closed 2 years ago

berlin2049 commented 2 years ago

1634717076(1)

Although the parameter "serial_port" and "serial_baudrate"(1000 000) are set correct, sometimes still cannot start the ladar and report error.

berlin2049 commented 2 years ago

Edit function 【u_result RPlidarDriverImplCommon::startMotor()】 in 【sdk\src\rplidar_driver.cpp】 line 2175, as below

u_result RPlidarDriverImplCommon::startMotor() { if (_isSupportingMotorCtrl) { // RPLIDAR A2 setMotorPWM(DEFAULT_MOTOR_PWM); delay(500); return RESULT_OK; } else { // RPLIDAR A1 rp::hal::AutoLocker l(_lock); _chanDev->clearDTR(); delay(500); return RESULT_OK; } } 1634717871