pyrplidar icon indicating copy to clipboard operation
pyrplidar copied to clipboard

RPLIDAR S1 doesn't work

Open MegaraSoftware opened this issue 4 years ago • 4 comments

Hello, why does the RPLIDAR S1 not work? the protocol is the same?

PyRPlidar Info : device is connected
Traceback (most recent call last):
  File "lara.py", line 31, in <module>
    simple_scan()
  File "lara.py", line 17, in simple_scan
    scan_generator = lidar.force_scan()
  File "/usr/local/lib/python3.7/dist-packages/pyrplidar.py", line 170, in force_scan
    discriptor = self.receive_discriptor()
  File "/usr/local/lib/python3.7/dist-packages/pyrplidar.py", line 42, in receive_discriptor
    discriptor = PyRPlidarResponse(self.lidar_serial.receive_data(RPLIDAR_DESCRIPTOR_LEN))
  File "/usr/local/lib/python3.7/dist-packages/pyrplidar_protocol.py", line 110, in __init__
    self.sync_byte1 = raw_bytes[0]
IndexError: index out of range
PyRPlidar Info : device is disconnected

MegaraSoftware avatar Apr 18 '20 13:04 MegaraSoftware

Hello, have you solved this problem?

JTDeve avatar Nov 25 '20 06:11 JTDeve

no sorry.

Mit freundlichen Grüßen

Rene Schönfelder

Am Mi., 25. Nov. 2020 um 07:37 Uhr schrieb JTDeve <[email protected]

:

Hello, have you solved this problem?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Hyun-je/pyrplidar/issues/3#issuecomment-733500281, or unsubscribe https://github.com/notifications/unsubscribe-auth/AH3N4UYZABM3CWEVJMMNCELSRSQ37ANCNFSM4MLLHU5Q .

MegaraSoftware avatar Dec 16 '20 22:12 MegaraSoftware

Pi4 + S1

PyRPlidar Info : device is connected Traceback (most recent call last): File "simple_scan.py", line 30, in simple_scan() File "simple_scan.py", line 16, in simple_scan scan_generator = lidar.force_scan() File "/home/pi/.local/lib/python3.7/site-packages/pyrplidar.py", line 170, in force_scan discriptor = self.receive_discriptor() File "/home/pi/.local/lib/python3.7/site-packages/pyrplidar.py", line 42, in receive_discriptor discriptor = PyRPlidarResponse(self.lidar_serial.receive_data(RPLIDAR_DESCRIPTOR_LEN)) File "/home/pi/.local/lib/python3.7/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 pi@raspberrypi:~/work/pyrplidar/examples $

neolu avatar May 30 '21 11:05 neolu

On Windows 10, modifying a file the pyrplidar_serial.py from library helps. In line 13 replace: "self._serial = serial.Serial(port, baudrate, parity=serial.PARITY_NONE, stopbits=serial.STOPBITS_ONE, timeout=timeout, dsrdtr=True)" to " self._serial = serial.Serial(port, baudrate, parity=serial.PARITY_NONE, stopbits=serial.STOPBITS_ONE, timeout=timeout, dsrdtr=False)"

kamil52512 avatar May 18 '22 08:05 kamil52512