Code Monkey home page Code Monkey logo

Comments (9)

wanghaoNB avatar wanghaoNB commented on July 17, 2024

不知道

from pyrplidar.

sir1st avatar sir1st commented on July 17, 2024

first, change the baudrate to 115200.
second, use the linux based system, not the windows.

from pyrplidar.

sir1st avatar sir1st commented on July 17, 2024

my rplidar a1 device doesn't work on win10 paltdorm, but with the same code(change the port from COM3 to /dev/ttyUSB0), it works on deepin os.

from pyrplidar.

wafflecat avatar wafflecat commented on July 17, 2024

my rplidar a1 device doesn't work on win10 paltdorm, but with the same code(change the port from COM3 to /dev/ttyUSB0), it works on deepin os.

Make sure your LED goes green. You need to install the CP210x USB to UART bridge driver.
http://bucket.download.slamtec.com/a7a9b856b9f8e57aad717da50a2878d5d021e85f/LM204_SLAMTEC_rplidarkit_usermanual_A2M4_v1.1_en.pdf

The driver install is available in their SDK .zip.
https://www.slamtec.com/en/Support#rplidar-a-series

Verify everything works using frame_grabber.exe first.
https://github.com/Slamtec/rplidar_sdk/releases

from pyrplidar.

sir1st avatar sir1st commented on July 17, 2024

I did check everything else. the frame grambber works really good on win10 os. Here is the screen shot.
微信截图_20220103191251
Sadly, once I start the simple_scan.py (with the config of lidar.connect(port="COM3", baudrate=115200, timeout=3)), the rplidar a1 doesn't work anymore. It even not rotates, just stay static... After I close this python program, the ridar starts rotation again..
Here is the totally logs:

PyRPlidar Info : device is connected
Traceback (most recent call last):
File "c:/Users/11747/Desktop/pyrplidar-master/examples/simple_scan.py", line 30, in
simple_scan()
File "c:/Users/11747/Desktop/pyrplidar-master/examples/simple_scan.py", line 16, in simple_scan
scan_generator = lidar.force_scan()
File "E:\Software\Anaconda3\lib\site-packages\pyrplidar.py", line 170, in force_scan
discriptor = self.receive_discriptor()
File "E:\Software\Anaconda3\lib\site-packages\pyrplidar.py", line 42, in receive_discriptor
discriptor = PyRPlidarResponse(self.lidar_serial.receive_data(RPLIDAR_DESCRIPTOR_LEN))
File "E:\Software\Anaconda3\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
But this code (with the port="/dev/ttyUSB0") works really good on Deepin OS. I can bet that no hardware chagnes except the running os

from pyrplidar.

wjacobward avatar wjacobward commented on July 17, 2024

Anyone have luck fixing this issue in Windows? I have the exact same problem. A1 lidar works fine in Slamtec's frame_grabber, but fails with "index out of range" with this library. That seems to indicate that there is no data being sent by the device over the serial port.

from pyrplidar.

kamil52512 avatar kamil52512 commented on July 17, 2024

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)"

from pyrplidar.

razoentaki avatar razoentaki commented on July 17, 2024

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)"

Tried, but it did not solve the problem.

from pyrplidar.

JhiWhoonKang avatar JhiWhoonKang commented on July 17, 2024

Anyone who solved this problem?

from pyrplidar.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.