Code Monkey home page Code Monkey logo

Comments (11)

kuehjialee avatar kuehjialee commented on July 17, 2024 6

Hi there, thanks for the pyrplidar.
I was searching how begin with RPLIDAR A1M8. And I found your project. It's is very clear and well documented. Congratulations.
I have experiencing some issue when I try to connect to my lidar.
I got the follow crash in every example:

λ python check_connection.py PyRPlidar Info : device is connected Traceback (most recent call last): File "check_connection.py", line 33, check_connection() File "check_connection.py", line 13, info = lidar.get_info() File "C:\Python27\lib\site-packages\p discriptor = self.receive_discripto File "C:\Python27\lib\site-packages\p discriptor = PyRPlidarResponse(self File "C:\Python27\lib\site-packages\p self.sync_byte1 = raw_bytes[0] IndexError: string index out of range

Could you help me?
I tried on Windows and Linux already. No successs. Thanks in advance.

Hi. I realized that the Baud Rate of 115200 is used in this library. So, instead of using 256000 as stated in the example codes, please change it to 115200. This will solve your problem.

from pyrplidar.

kamil52512 avatar kamil52512 commented on July 17, 2024 3

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.

TCIII avatar TCIII commented on July 17, 2024 1

This works for the A1M8 (all firmware versions) and the A2M8 (latest firmware version) that run a 115,000 baud:

Setup the RPLidar

PORT_NAME = '/dev/ttyUSB0'
lidar = RPLidar(None, PORT_NAME, timeout=3)

from pyrplidar.

adolfoherrera1417 avatar adolfoherrera1417 commented on July 17, 2024

Hello, I have been getting this same error and have already changed the Baud Rate to 115200, but that did not seem to help. Any other changes I could make?

from pyrplidar.

kuehjialee avatar kuehjialee commented on July 17, 2024

How about your serial port? Sometimes, your serial port name will change after shutting down. Double check your "Port" and "Baud Rate".

from pyrplidar.

irbigturtle avatar irbigturtle commented on July 17, 2024

Hi, I am having the same issue. I double checked the baud rate and port multiple times. I also reinstalled the driver - no change. Any thoughts? Same model A1M8

from pyrplidar.

Ajasra avatar Ajasra commented on July 17, 2024

The same problem with the code. With right Baud Rate and com port.

from pyrplidar.

Yang-Changhui avatar Yang-Changhui commented on July 17, 2024

请问一下,大家这个问题解决了吗

from pyrplidar.

Yang-Changhui avatar Yang-Changhui commented on July 17, 2024

hi,I met the same problem,I want to know if you solve the problem.If you could help me ,I will appreciate it

from pyrplidar.

ZGX010 avatar ZGX010 commented on July 17, 2024

i find https://github.com/SkoltechRobotics/rplidar

from pyrplidar.

yurikleb avatar yurikleb commented on July 17, 2024

Changing the baud to 115200 worked for my RPLIDAR A1M8 on Ubuntu in python3

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.