-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
improper data with Arduino #13
Comments
i can't see what is improper ? I got the same. |
Can you check the output carefully. The data is not continuous data. If the first data is theta: 200.25 Dist: 01659.00 Q: 47 then next it should be 201, 202, 203 etc. But it is directly from 200 degree to 50 degree. It is a random data. It should give the data from 0 degree to 360 degree. So I am asking solution for getting the proper data. |
Yes i know, i have the same output. I'm not sur if it's a problem. it seems to be the normal behaviors because in the window app "fram_grabber" wich is given in the source code, they sort the array of point by the angle value. It is not clear how the lidar should work and i can't find anthing about this, but a solution is to sort output value by yourself in your code (as the arduino library doesn't do it). It would be way better to have output allready sorted by angle... Maybe its a problem related to the serial link, if the µC can't handle so much and so fast data some are deleted in the buffer ? You can try to contact slamtech here : [email protected] they are fast but its really hard to have real answer on their products... If you find a solution, post it here ! :) |
Which kind of Lidar do you have ? |
RP LIDAR A1M8 360 Degrees Laser Range Finder- 6 Meter Range |
Hello sir, do you mind share some details how to connect arduino mega to RP LIDAR? I'm using PR LIDAR A1M6 REV6, I can't get any data from the lidar to arduino, all I got is timeout error. |
@gunnicus Suggesting you to use Raspberry pi 4 (2/4/8 GB RAM) |
Thanks you so much sir for your reply..it looks like my rplidar is a bit different compare to yours |
@gunnicus The New RP Lidar is a compact version but the configurations and protocol is same as the old Version. You can try this |
Thank you sir, that's very kind of you. Yes basically I did that, but no luck, I can spin the lidar if I write analogWrite(RPLIDAR_MOTOR, 255) inside loop(), but all the commands timed out... |
@gunnicus Can you specify your Application or you can share the code to check the issue, It will help me to provide the proper suggestion. |
Hello Sir, please see the attached pitcure it is my wireing. The code is simple_connect example, the only change I made is to use Serial1 instead of Serial : lidar.begin(Serial1); . Thank you so much for your help. |
Hello sir, I did more test, the issue seems to be the power supply for the core. I measured the voltage between the vcc5v and groud, the voltage is only 4.1v, I checked the spec it says min voltage is 4.9v. If you run the lidar with Arduino mega, what is the voltage supplied to the core interface? |
@gunnicus You can use external power supply for 5v and make a Common Ground between 2 different source. |
Hi, |
Hello sir, I finially got the lidar working with Arduino using external power as you suggested. |
If angle = 492 About the qualiy you need to check in the datasheet, its Witten. The best thing you Can Do is to draw scan points and Sees if it match reallity |
I have my setup connected like this, but the data I'm getting seems useless. I shouldn't be getting so little measurements between startbits, right? and I guess this 'quality' is also too low. and if I plot the data there is always somehow a circle, a horizontal line and a diagonal line in it that shouldn't be there. does anybody have a clue about what could be the issue? (I also tried with an lab power supply connected to VCC_5V, but that gave exactly the same results. The hardware seems fine. Because if I connect using the usb connector and framegrabber then the output looks ok. [degree;distance;quality;startbit] |
@gunnicus hello bro, I am currently stuck with this problem. My rplidar is not spinning when I upload the code, and I even supplied my arduino with 12 volts external and still no spinning. How did you manage to solve the problem? Could you post a pic of your setup if you still have it? |
|
@siemeT I am working with the A1M8 model and I m stuck the same with data being really inconsistent. Are we supposed to sort the angles later on, between each startBit. If so, then even startBits are not consistent, as in they appear very frequently, not in intervals of 360. |
I have tried the simple_connect example with Arduino Mega. Because I can't use Arduino UNO for checking results. Here, I have tried to use Serial1 for checking lidar data, but the data is improper.
Output:
theta: 200.25 Dist: 01659.00 Q: 47
theta: 50.80 Dist: 01700.00 Q: 47
theta: 340.80 Dist: 02213.00 Q: 47
theta: 73.33 Dist: 02208.00 Q: 47
theta: 211.89 Dist: 02222.00 Q: 47
theta: 111.44 Dist: 02229.00 Q: 47
theta: 79.00 Dist: 02234.00 Q: 47
theta: 204.55 Dist: 02238.00 Q: 47
Is there any way to solve this problem?
The text was updated successfully, but these errors were encountered: