YTread Logo
YTread Logo

#227 The ugly truth about LIDARs for obstacle avoidance (RPLIDAR A1, Arduino, ESP8266)

Jun 05, 2021
Obstacle

avoidance

is an essential issue for autonomous vehicles. In this discussion, we often hear the word lidar. These devices have recently become cheaper and more affordable for many manufacturers, but are they worth your money to avoid the pitfalls? Realty Youtubers here's the guy with the Swiss accent with The new episode and the new ideas on sensors and microcontrollers. Let's first define the problem. Obstacle

avoidance

means that a vehicle must not collide with any other vehicle or

obstacle

. The

obstacle

avoidance system has to create a stop sign to avoid damage. The purpose of a stroke system is more to optimize the path.
227 the ugly truth about lidars for obstacle avoidance rplidar a1 arduino esp8266
The objects around our vehicle are obstacles that must be avoided. Let's take our tank. We need to be able to detect all the barriers. the surface up to about 30 centimeters from left to right we need about 50 centimeters and how far we have to be able to detect obstacles this distance depends on the speed of our vehicle and its braking distance for a tank this is only a few centimeters for a drone it can be 50 meters and for a car even more to avoid obstacles for our tank, we need to know the distance to everything in this cubicle and if we just want to move forward automatically, we don't need to look back, so our problem is very similar to James Bond problem right now Mr.
227 the ugly truth about lidars for obstacle avoidance rplidar a1 arduino esp8266

More Interesting Facts About,

227 the ugly truth about lidars for obstacle avoidance rplidar a1 arduino esp8266...

Bond, I trust you've had a nice fry now that the problem is defined and we can move on and see if lidar is the solution. I try. The lidar systems fixed in a previous video should find the link in the upper right corner of your screen, they can measure the distance in one direction and surely we will not be able to perform the task and now the robot f sends me this cool RP lidar a1 that costs around of $100 to try it. It rotates typically seven times per second and measures distance continuously in all directions, a huge improvement over stationary ligers.
227 the ugly truth about lidars for obstacle avoidance rplidar a1 arduino esp8266
It uses a laser beam and triangulation to measure the distance to an object, so let's give this device a simple task. I connect it with an FTDI adapter. to my PC and start the software that comes with it as a first test. I put the lidar in a box. Do you see a rectangle? Of course, it's nice and if we move the sensor, the square moves only if one of the walls moves closer. Approximately 15 centimeters or six inches, the lidar no longer sees it because it is blind at short distances, so the lidar works and does exactly what we expect: it sees all the obstacles around it with high speed and precision and, as we all know the walls, we can calculate. the size of the room or floor for an optimized path that covers every inch of an area very good for a cleaning robot with some math we could even calculate the movement of the robot relative to these walls this is very useful for slam but it is also Good for obstacle avoidance, one question might be: is it able to detect small obstacles like this 0.8 millimeter thick ruler?
227 the ugly truth about lidars for obstacle avoidance rplidar a1 arduino esp8266
Yes, it does it over short distances, but not always, as we see, it is still surprising that the angle covered by this ruler is only 0.25 degrees, as you can imagine. This device creates a lot of data in the standard configuration it measures 200 points per rotation it does 200 times 7 equals 1400 measurements per second the time between two values ​​is therefore only 700 microseconds so your sketch cycle should not take more than 700 microseconds, which is not much and Arduino in general is too slow for that, in reality things are a bit more complex, maybe the room is long and your robot drives parallel to a wall, the lighters fixed or ultrasonic sensors would not detect this wall.
Because? Because both need a reflected signal to measure distance, a wall reflects the beam in another direction, not toward the receiver, and is therefore certainly not detectable. This is one of the reasons why stealth bombers are invisible to radar systems. They use surfaces that don't. They do not reflect the beam back to the radar station, they reflect it in other directions, that is why the first stealth plane looked so strange for our purpose, however, this effect is terrible because the parallel walls are invisible to fix the controls sliding and the ultrasonic sensors that our vehicle crashes into. situations with the wall, how does our new 360 degree lidar behave in this situation?
This is how you see a parallel wall. It is also invisible to him at a certain distance, but is clearly visible at short distances because the laser is reflected, a clear advantage. About the other two concepts, it protects from all obstacles from left to right, but what if we have a small obstacle on the ground or a hanging obstacle? The laser beam is very narrow and only covers one plane. That's why it's called 2d lidar. To show you this effect, I move the Box a little over this measurement plane, it becomes completely invisible to our lidar, so we are not at all safe to hang obstacles if our laser is below the highest point, which is always the case because we don't need the lidar to work behind us, we can tilt it a little and now we see hanging obstacles that can become dangerous for us, this way we protect the upper part, but it no longer sees small obstacles that are on the floor.
This is one of the reasons I selected a tank, so no problem, our tank is not stopped by such small barriers, but this is not a real situation. We also have to stop so that small barriers solve this problem. We could tilt our lidar in the other direction, of course, hanging obstacles would again be a problem. A typical dilemma that cannot be solved with our 2D lidar. This is why the doors of autonomous vehicles are three-dimensional with multiple beams that deliver results on multiple levels, but these devices are still expensive. I found 3D radars that cost less.
Over a thousand dollars but they only cover a 130 degree angle which might not be enough to deal with the wall problem from before and 9 degrees vertically is also pretty small. The next problem, if we want to drive fast, the range of our lidar can become A problem, the range in the specifications of our RP lidar at 1 is 0.15 to 6 meters. We already tested the shorter distance, so let's examine the long distance in our usual location in the garage, which is an interior with low light levels, the walls are gray, and I. put the lidar on the floor precisely 6 meters from the wall and it actually shows results.
We see the walls and also the motorcycle, which by the way is not mine, so the specifications are met. If I only move a few centimeters back, we lose the signal, therefore , this device can be used by reasonably fast vehicles at least if they have good brakes. The last question that can be asked is not relevant to avoiding obstacles. How accurate is it? This box measures 43 x 35 centimeters. The lidar measures 41 x 35, which is a bit short and you see the value fluctuate around 2 to 3 millimeters. The specs say it should be able to measure below 0.5 millimeters, which is definitely not true in standard mode.
If we switch to stability mode, we get this stability. However, the accuracy is so-so. Same thing, the last obstacle is that if the road suddenly disappears, the vehicle would fall. This obstacle cannot be detected by all the sensors that we have discussed so far. Cleaning robots usually have an IR diode pointing at the ground, as soon as it stops reflecting, the robot stops. For fast-moving devices, this is a serious problem because most cars are damaged by fairly shallow holes in a road. In short, the RP lidar is a stylish device and lives up to its specifications.
It is a 2D lidar and can detect walls and obstacles in a plane. It is very good for swipe applications to avoid obstacles. It has a clear advantage over fixed sliders or ultrasonic sensors because it detects barriers in a much wider range and can avoid collisions with walls. Its spatial resolution is excellent and can detect a 0 obstacle. .8 millimeters or 0.25 degrees at short distances, however, is not enough for small objects lying on the ground or low obstacles because it only measures in two dimensions and creates tons of data, so your sketch has to be pretty fast To deal with the speed, maybe you can even need a subsystem just for obstacle detection.
Ultimately, it is a huge improvement over fixed LIDAR systems and an improvement over ultrasonic sensors. What can we do? A combination of such a LIDAR with an ultrasonic sensor pointing in the driving direction would maintain all the advantages of the lighter plus would avoid the problem of small obstacles ultrasonic devices have an opening angle of about 30 degrees a cheap system that consists of at least five ultrasonic sensors it would probably be better for obstacle avoidance I built one with three sensors covering about 90 degrees but this sensor was not able to solve the long wall problem that's why we have to cover 180 degrees, a 2d lidar definitely It is not a solution.
This is the

ugly

truth

, even if manufacturers try to advertise it for that purpose. I hope this video was helpful or at least. less interesting to you if true, consider supporting the channel to ensure its future existence. You will find the links in the description. Thank God.

If you have any copyright issue, please Contact