Open wnghdwnsrl opened 3 years ago
Hello,
StopMotorRPLIDAR()
and StartMotorRPLIDAR()
that I just added in https://github.com/ENSTABretagneRobotics/Hardware-MATLAB/releases/download/v1.5.3/hardwarex_with_3rd_support.zip (not tested), but I am not sure this would be a viable workaround...Thank you for your comment!
StartMotorRPLIDAR() and StopMotorRPLIDAR() function in hardwarex_with_3rd_support file are working.
Thank you for your help again
Hello, I used StartMotorRPLIDAR() and StopMotorRPLIDAR() functions well But there is another problem using two functions. When I stopped motor and started RPLIDAR A1 again, GetScanDataResponse() didn't work and matlab had forcely ended. (exit all pages). Is there any solutions about this problem?
Maybe before the StopMotorRPLIDAR()
, we need StopRequestRPLIDAR()
, and after StartMotorRPLIDAR()
, we need StartScanRequestRPLIDAR()
before calling GetScanDataResponse()
.
If it does not work, in test_rplidar.m, check https://github.com/ENSTABretagneRobotics/Hardware-MATLAB/blob/e4512bcb3285fe7d0d557c54c422f6eebd096148/test_rplidar.m#L7-L16 where it is suggested that if you set bStartScanModeAtStartup
to 0
in RPLIDAR0.txt
you need to uncomment those lines. Maybe you will need to follow a similar logic after the StartMotorRPLIDAR()
...
Thank you, it works well with no errors. but i have one more question. when I stop and restart motor and move RPLIDAR A1 scan area, then it scans just before data( not new area). I think i need to clear buffer to scan new data. If I want to clear RPLIDAR A1 buffer, Is there any solution that you can advise?
I just added ClearCacheRPLIDAR()
(which calls clearNetSerialRxCache()
from the SLAMTEC C++ SDK), see v1.5.5 release : https://github.com/ENSTABretagneRobotics/Hardware-MATLAB/releases/tag/v1.5.5. Otherwise, I do not see an obvious way to solve this problem...
Hello, I 'm using RPLIDAR A1 for project in matlab 2019b but there are two problem using it.