Code Monkey home page Code Monkey logo

Comments (7)

egonzalez1958 avatar egonzalez1958 commented on July 17, 2024 1

I'm using an A2-M12, and get:
File "usr/local/lib/python3.7/dist-packages/pyrplidar.py", line 156, in scan_generator
data = self.receive_data(discriptor)
File "usr/local/lib/python3.7/dist-packages/pyrplidar.py", line 54, in receive_data
raise PyRPlidarProtocolError()
pyrplidar_protocol.PyRPlidarProtocolError

Any hint on handling this problem that happens randomly?

from pyrplidar.

gzchenjiajun avatar gzchenjiajun commented on July 17, 2024

same problem

from pyrplidar.

Mytre avatar Mytre commented on July 17, 2024

This seems to be an issue with newer firmware versions? an example using start_scan_express, depending on the value i can have pyrplidarprotocolerror from line 54 on pyrplidar.py, and also an error on line 151 on pyrplidar.py data =self.receive_data(discriptor) .

changing start_scan_Express(3) to 4 gives me this, using 2 or one I get sync bytes are mismatched and no idea how to fix this.

from pyrplidar.

Mytre avatar Mytre commented on July 17, 2024

This error alongside bytes mismatch happen if you try to run any type of scan while the LiDAR has the motor on , disconnecting the lidar and stopping motor and reconnecting will make this error go away as long as you had set up the A3 by editing libraries to adjust for the baudrate.

from pyrplidar.

AdroitBit avatar AdroitBit commented on July 17, 2024

I solve this issue by adding baudrate=256000 argument into RPLidar class and the lidar just spins. (reconnection still required)

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.

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.