scanse / sweep-sdk

Sweep SDK
MIT License
90 stars 85 forks source link

RUNTIMEERROR: READING FROM SERIAL DEVICE FAILED - Sweeppy #133

Open ennemoser opened 6 years ago

ennemoser commented 6 years ago

Dear Scanse Community,

I am using the scanse sweep lidar on Windows with python. When I start the example python code it runs fine for a while and then stops and throws me the error below. It seems it can't retrieve sweep.getscan() from the init__.py and makes the scan stop. Does anyone know how to avoid this exception and to continue the scan?

quick start example code:

from sweeppy import Sweep

with Swee p('/dev/ttyUSB0') as sweep: sweep.start_scanning()

for scan in sweep.get_scans():
    print('{}\n'.format(scan))

this is the error and that stops the loop:

Traceback (most recent call last): File "C:/Users/benja/PycharmProjects/LidarUDP/LIDAR_UDP_Unity.py", line 9, in for scan in sweep.get_scans(): File "C:\Users\benja\AppData\Roaming\Python\Python36\site-packages\sweeppy-1.3.0-py3.6.egg\sweeppy_init__.py", line 207, in getscans RuntimeError: reading from serial device failed -->

sweep firmware version

libsweep version + affected bindings

operating system

Windows with Python

Platform/Hardware Setup