-
Notifications
You must be signed in to change notification settings - Fork 126
Example doesn't work #10
Comments
which example are you running? have you installed the latest pyserial? |
Updating pyserial resolved the issue (I am using an A2). I am using an RPLidar A2 to run the simple example on the bottom of the front page. It works about 70% of the time and gives me the error above the rest of the time. Any idea why that might be happening? Does the Lidar need a warm up time to work reliably? Here is the out of two runs of the same script, seconds apart:
I edited my serial number just in case. |
i encountered similar issue previously. If im not mistaken, is this problem occurs only after u reinitialize a scan after the motor start rotating and scanning? |
OK. I will keep an eye out for it. Thanks very much for your help. I was getting pretty frustrated by the error. |
I had the same problem on a Raspberry Pi 3 connected to an A1 but force upgraded pyserial 3.3 and this seemed to clear up the issue. The example in the readme now works. |
@Sparafucil3 Did you ever figure out a fix to this? I continue to get: File "/usr/local/lib/python2.7/dist-packages/rplidar.py", line 199, in _read_response |
I solved this error. You should put time.sleep(...) before "loop"; For example; time.sleep(5) |
I see the same error message interfacing an RPLidar A1M8 from Raspberry Pi 2. I upgraded the version of pyserial(3.4) and added the loop, still see the same behavior. Has anyone else found other answers? |
Did anyone figure this out? Running into similar issues with a A1M8/Raspberry Pi (Rasbian) setup. Just like Craig I also tried to upgrade pyserial and adding sleep before the loop, but still running into issues. |
Erik:
I do believe I found a solution many years ago, but will need to find the
code on where I overcame it. Hope to have a response to you soon.
…On Wed, Jun 3, 2020 at 1:16 PM Erik van Zummeren ***@***.***> wrote:
Did anyone figure this out? Running into similar issues with a
A1M8/Raspberry Pi (Rasbian) setup. Just like Craig I also tried to upgrade
pyserial and adding sleep before the loop, but still running into issues.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#10 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADII2E63HPTP6ZQX6HYX543RU2AOTANCNFSM4DQGUULQ>
.
|
Ah that'd be truly wonderful. Please let me know in case you manage to find it! |
@evanzummeren Which example are you running? It has been so long and I no longer have access to the lidar system, if you can show me which line you are having difficulties with hopefully I can help. If you look at my repos, you should be able to see some code I had working and used to implement a SLAM algorithm - they should work. |
Hi I saw this thread and am having the same error I get this error every time with a basic script like the following. When I run with debug logging it seems to show import time
The following is the debug logging output I'm using a RPlidar A2M8 and the device runs fine with simplegrabber or RoboStudio but I want to use Python with a C++ extension |
I think rplidar.py may be too slow to handle it. Does anyone know of a Window X64 version that uses Python with a C++ Extension? I'm not expert enough to build my own wrapper |
Output is below. I am not sure this is a library problem or a problem initiating the scanner on my side.
{'hardware': 2, 'model': 40, 'firmware': (1, 20), 'serialnumber': u'DAD28AC1E8839EF2C0E69EF702652105'}
('Good', 0)
Traceback (most recent call last):
File "lidar.py", line 15, in
for i, scan in enumerate(lidar.iter_scans()):
File "/usr/local/lib/python2.7/dist-packages/rplidar.py", line 357, in iter_scans
for new_scan, quality, angle, distance in iterator:
File "/usr/local/lib/python2.7/dist-packages/rplidar.py", line 326, in iter_measurments
data_in_buf = self._serial_port.in_waiting
AttributeError: 'Serial' object has no attribute 'in_waiting'
The text was updated successfully, but these errors were encountered: