{"id":4307,"date":"2018-07-13T21:52:05","date_gmt":"2018-07-14T01:52:05","guid":{"rendered":"https:\/\/dronebotworkshop.com\/?p=4307"},"modified":"2023-04-12T12:43:44","modified_gmt":"2023-04-12T16:43:44","slug":"getting-started-with-lidar","status":"publish","type":"post","link":"https:\/\/dronebotworkshop.com\/getting-started-with-lidar\/","title":{"rendered":"DF Robot LIDAR Sensors – Getting Started with LIDAR"},"content":{"rendered":"\n

\"Download \"Parts<\/a> \"View<\/a> \"Download<\/a><\/p>\n

Introduction<\/span><\/h2>\n

One advancing technology that has been impossible to ignore lately has been the work with self driving vehicles. \u00a0These vehicles have gone from scientific curiosity to mainstream within a few short years and soon we’ll be seeing them as regular traffic on our streets.<\/span><\/p>\n

A very distinctive component in a self driving vehicle is the spinning LIDAR sensor mounted on the top of the vehicle. \u00a0This is one of the principal components in self driving vehicles as it collects data regarding the surrounding area to allow the navigation systems to guide the vehicle safely.<\/span><\/p>\n

<\/div>\n

LIDAR may seem like a sophisticated system and it is, however recent cost reductions have made it possible for experimenters like you and me to work with LIDAR for our own projects. <\/span><\/p>\n

The folks at <\/span>DFRobot<\/span><\/a> have a number of low cost LIDAR devices available and they were kind enough to supply me with a couple of them. So follow along and learn how you can bring cutting edge technology like LIDAR to your own robotics projects.<\/span><\/p>\n

What is LIDAR?<\/span><\/h2>\n

LIDAR is a method of using focused light beams to detect distant objects. It works very much like RADAR and in fact the mnemonic \u201cLIDAR\u201d was initially a fusion of the words \u201cRADAR\u201d (Radio Detection And Ranging) and \u201cLight\u201d.<\/span><\/p>\n

A more common definition of \u201cLIDAR\u201d is Light Inspection, Detection and Ranging, this more accurately defines LIDARs role in inspection applications. \u00a0Some publications use the letter \u201cL\u201d in \u201cLIDAR\u201d to mean \u201cLaser\u201d although a LIDAR unit can be built using light sources other than a laser.<\/span><\/p>\n

LIDAR functions by sending out a light beam and measuring its reflected signal. Several aspects of the signal are measured including the light intensity and angle. These measurements can be used to calculate the distance to the reflecting object as well as some information regarding its reflectivity.<\/span><\/p>\n

In many applications the light beam is moved or scanned to get several points of reflection, this data is often displayed in a three dimensional array known as a \u201cpoint cloud\u201d.<\/span><\/p>\n

\"Getting<\/p>\n

In addition to its application in self driving vehicles LIDAR also finds use in many scientific applications including weather forecasting and climate sciences, urban planning, deep sea exploration, surveying, aeronautics and forestry . It even has extraterrestrial uses, LIDAR has been used to scan both the Moon and Mars and it will undoubtedly be a key component in the robotic exploration of other worlds<\/span><\/p>\n

LIDAR History<\/span><\/h3>\n

LIDAR was conceived shortly after the development of the laser, early work on LIDAR was documented in 1963. The high cost of laser equipment kept LIDAR use confined to government and military agencies for several decades.<\/span><\/p>\n

LIDAR requires a strong focused light source, a sensitive and fast receiver and a quick processor to analyze the signal and produce meaningful data. \u00a0Super fast processors like the ones used in video games have brought the processing costs down drastically. <\/span><\/p>\n

The development of semiconductor lasers and high powered LEDs has brought the cost of LIDAR down to the level where home robotics experimenters like ourselves can now purchase inexpensive LIDAR units for use in our own projects.<\/span><\/p>\n

The two devices we will be looking at today are perfect examples of modern low cost LIIDR sensors.<\/span><\/p>\n

LIDAR Robotics Applications<\/span><\/h3>\n

There are a number of cases in which you would employ LIDR in the design of a robot. <\/span><\/p>\n

LIDAR sensors function in a similar manner to the familiar ultrasonic sensors that we have used before. Like their ultrasonic counterparts they can be used for collision avoidance and distance measurement.<\/span><\/p>\n

As a stationary LIDAR sensor is several times more expensive than an ultrasonic sensor ne needs to consider what advantages the use of LIDAR would have over a common HC-SR04.<\/span><\/p>\n

The LIDAR sensor is more accurate and can pinpoint a much finer area. It can also be polled up to 100 times per second so it is less likely to miss a the sudden appearance of an object in its path. \u00a0LIDAR sensors can also cover a greater range than ultrasonic sensors, the two sensors we are looking at today have ranges of 12m or 4 feet.<\/span><\/p>\n

By coupling a LIDAR sensor with a pan and tilt or spinning mechanism we can get three dimensional data very quickly, a fat that is not possible for an ultrasonic sensor due to its slow response time. The advanced device, the RPLIDAR unit, has a spinning platform built into the unit.<\/span><\/p>\n

In designing a robot it is desirable to make use of both ultrasonic and LIDAR sensors. \u00a0Some objects do not reflect infrared light well and are better detected with ultrasonic sound, conversely some objects are better detected with light. By combining readings from both sensors we can get a more accurate idea of our robots position in the world.<\/span><\/p>\n

How LIDAR Works<\/span><\/h2>\n

The principle of LIDAR operation is pretty simple. A focused light beam is aimed at an object and a sensor looks for its reflection. If the beam is detected its intensity and angle (or phase) is measured. These values are then plugged into an equation run by a fast onboard computer to determine the reflecting objects position and characteristics.<\/span><\/p>\n

\"LIDAR<\/p>\n

By \u201csweeping\u201d the beam and receiver array mechanically we can quickly build up a 3D \u201cimage\u2019 of the surrounding area. This is often displayed in a \u201cpoint cloud\u201d to help us humans visualize what the LIDAR is \u201cseeing\u201d.<\/span><\/p>\n

Of course LIDAR is not the only method that can be used to sense external surroundings. Let\u2019s see how LIDAR compares to other remote position sensing method.<\/span><\/p>\n

LIDAR vs Other Technologies<\/span><\/h3>\n

There are a few other technologies that we can use to provide our intelligent machines with knowledge about the world around them.<\/span><\/p>\n

LIDAR vs Ultrasonic Sensors<\/span><\/h4>\n

We have looked at ultrasonic sensors before<\/a>, specifically the popular HC-SR04 devices. They are inexpensive and easy to use components that take up about the same amount of space as the stationary LIDAR sensor we will be looking at today. They also consume about the same amount of current.<\/span><\/p>\n

Ultrasonic sensors work on essentially the same principle as our LIDAR sensors except they use ultrasonic sound instead of infrared light. They have a range from about 2 cm to 4m so they can cover items at closer range than LIDAR but not as far.<\/span><\/p>\n

Ultrasonic sound is not as directional as light so an ultrasonic sensor can\u2019t be used to create a point cloud. As sound travels much slower than light you are limited to how much data you can gather in a short period of time. And not all objects reflect ultrasonic sound, some items absorb \u00a0sound and don’t reflect enough of it back to get a good reading.<\/span><\/p>\n

Still ultrasonic sensors have a lot of good points in their favor. They are much cheaper than LIDAR, can detect objects reasonably close and are very easy to use.<\/span><\/p>\n

LIDAR vs IR Light Sensor<\/span><\/h4>\n

This is a bit of a confusing comparison as a LIDAR device is a form of IR Light Sensor. \u00a0The type of IR Light Sensor that I\u2019m referring to is the sort with an IR LED and receiver diode, used for collision detection applications. These assemblies output a pulse when they detect an object at or closer than a preset distance. You can adjust the distance they trigger at using an onboard potentiometer.<\/span><\/p>\n

These devices are cheap and as they also work using IR light beams they are very fast. They have a range that extends from just a few millimeters to about 10 cm, so they work at a much closer range than LIDAR does.<\/span><\/p>\n

These simple IR light sensors don\u2019t provide any data on the quality of the returned light or an actual distance measurement.They are best used as alarm type sensors that trigger when an external object is detected at a preset range. Great to send an interrupt to tell your robot that it\u2019s about to hit a wall!<\/span><\/p>\n

LIDAR vs RADAR<\/span><\/h4>\n

LIDAR is based upon the same principle as RADAR except it makes use of light beams instead of high frequency radio waves. <\/span><\/p>\n

A full fledged RADAR array isn\u2019t that practical for a small robot project, however small microwave and radar sensors are available. These can be used in similar applications as LIDER and have similar or greater ranges and capabilities. Some items absorb or pass radio waves and are not detected well using RADAR.<\/span><\/p>\n

As RADAR is based upon radio waves (microwaves) it is as fast as LIDAR, LIDAR does have an advantage in resolution but RADAR is still pretty capable. At the low power levels required for a small sensor RADAR won\u2019t pose a threat to human or animal health but will consume a bit more current than LIDAR sensors.<\/span><\/p>\n

Self driving vehicles use a combination of LIDAR and RADAR sensors.<\/span><\/p>\n

So as you can see there are advantages and disadvantages of all types of sensors, including LIDAR. In a complex robot project you would likely use most, if not all, of the above technologies.<\/span><\/p>\n

Now that we have seen how LIDAR stacks up against other technologies let\u2019s take a look at teh two LIDAR devices that we will be working with today.<\/span><\/p>\n

DFRobot LIDAR Sensors<\/span><\/h2>\n

DFRobot were kind enough to send me not one but two LIDAR devices from their wide assortment of robotics products.<\/span><\/p>\n

TF Mini LIDAR<\/span><\/h3>\n

The TF Mini LIDAR<\/a> is a fixed position LIDAR source-sensor array that retails for an unbelievably low price. Despite its minimal cost it has some impressive specifications:<\/span><\/p>\n