Skip to content
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

In Windows force_scan does not work and start_scan mangles data after 20000 cycles #9

Open
oferbentovim opened this issue Feb 28, 2023 · 0 comments

Comments

@oferbentovim
Copy link

when i run the simple_scan example i get :

PyRPlidar Info : device is connected
Traceback (most recent call last):
File "pyrlidarneat.py", line 31, in
simple_scan()
File "pyrlidarneat.py", line 16, in simple_scan
scan_generator = lidar.force_scan()
File "C:\Users\user 67\AppData\Local\Programs\Python\Python36\lib\site-packages\pyrplidar.py", line 170, in force_scan
discriptor = self.receive_discriptor()
File "C:\Users\user 67\AppData\Local\Programs\Python\Python36\lib\site-packages\pyrplidar.py", line 42, in receive_discriptor
discriptor = PyRPlidarResponse(self.lidar_serial.receive_data(RPLIDAR_DESCRIPTOR_LEN))
File "C:\Users\user 67\AppData\Local\Programs\Python\Python36\lib\site-packages\pyrplidar_protocol.py", line 110, in init
self.sync_byte1 = raw_bytes[0]
IndexError: index out of range
PyRPlidar Info : device is disconnected

if i replace scan_generator = lidar.force_scan() with scan_generator = lidar.start_scan()
the program will run well for approximately 20,000 readings and then return start to return quality flags larger than 30 and distances larger than 16000.
tried the dtr solution to no avail
i have a hunch that the serial buffer is mangled but could not find how
any help will be greatly appreciated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant