-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rplidar 3 descriptor length mismatch #5
Comments
same problem |
This seems to be an issue with newer firmware versions? an example using start_scan_express, depending on the value i can have pyrplidarprotocolerror from line 54 on pyrplidar.py, and also an error on line 151 on pyrplidar.py data =self.receive_data(discriptor) . changing start_scan_Express(3) to 4 gives me this, using 2 or one I get sync bytes are mismatched and no idea how to fix this. |
This error alongside bytes mismatch happen if you try to run any type of scan while the LiDAR has the motor on , disconnecting the lidar and stopping motor and reconnecting will make this error go away as long as you had set up the A3 by editing libraries to adjust for the baudrate. |
I solve this issue by adding baudrate=256000 argument into RPLidar class and the lidar just spins. (reconnection still required) |
On Windows 10, modifying a file the pyrplidar_serial.py from library helps. |
I'm using an A2-M12, and get: Any hint on handling this problem that happens randomly? |
Very long frustrating story short: the slamtec LiDARs are very touchy about their baudrate. I have a slamtec C1 unit. Chased down its baudrate in the documentation - once that was set, it connected well; am not getting the "descriptor length mismatch" error anymore. Check your lidar's document for the baudrate. |
After reading @octotus's comment I have remembered that RPLidar S2M1-R2 I am using had a mention of it's baud rate being 1M in it's documentation. I first didn't use 1M as baud rate because I couldn't find any example of baud rate being set as 1 million for any device. (What 1M means wasn't clear to me too) Whatever, I have given it a go and I was able to get device health and info. When it came to scanning I again got the same error. Looks like for get_health, get_info etc. commands the baud rate is 1 million but for scanning etc. it is 115200. So result is: Initialize the connection with 1 million, get whatever single response data you want and before actually using the scanner functions change the baud rate to 115200. If you again need to get a single response data, set the baud rate back and forth accordingly. |
I am having this issue right now with a3 trying to do a scan. anybody knows how to solve this issue?
The text was updated successfully, but these errors were encountered: