Coder Social home page Coder Social logo

Comments (6)

jjehl avatar jjehl commented on August 29, 2024

Your error means that the data are wrong. Be sure to use a rplidar A2 and check that the raw serial data are received correctly.

Please find here : https://github.com/Roboticia/Roboticia-drive/blob/master/software/roboticia_drive/sensor/lidar_a2.py
an example about how to use the module.

from rplidar.

willnil avatar willnil commented on August 29, 2024

Yes I am using rplidar A2. I ran the code in my laptop using python IDLE and I can get the scan datas. But when I run the code in the Raspbian OS of the Raspberry Pi 3, the errors above occured. So do you know how to receive the raw serial data correctly? Is this happened due to hardware (Raspberry Pi3) or software(pyserial, pushing out the read/write calls faster than the hardware can accept them?, I2C)

Thanks in advance.

from rplidar.

jjehl avatar jjehl commented on August 29, 2024

I ran on raspberry pi3 without problem. It is a sofware issue with your pi3.
_ Be sure to set the correct usb to collect the data
_ Try to colect serial from another source to check if it works (arduino is a good test)
you can test with the roboticia OS derived from Raspbian because with this setup I am sure it works : http://www.roboticia.com/?page_id=258

Edit :
just to be sure : You have the usb card adaptater to collect the data from the lidar and to plug the lidar with usb on the RPI ?

from rplidar.

willnil avatar willnil commented on August 29, 2024

Yes I am using the UART adapter from the RPlidar A2. The lidar is plugged with USB on RPi.

I just checked using the lsusb command in the raspbian terminal. The number(name) of usb changed once the lidar motor is started and thus the data cannot be read. I think this is the problem.

from rplidar.

DIYalways avatar DIYalways commented on August 29, 2024

@willnil I meet the same problem when i use a UART TO USB cable receiving the serial data, and guess it is a bug of raspbian system. I wonder have you solve this problem?

from rplidar.

willnil avatar willnil commented on August 29, 2024

@DIYalways hello the problem is caused by the insufficient power supply to the RPLidar. Once I connected the rplidar to a power port instead of the usb port of my laptop, that solved my problem.

from rplidar.

Related Issues (20)

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.