TL;DR:
A LiDAR fires short pulses of infrared light and times how long each echo takes to come back. Half the round trip, times the speed of light, is the distance.
Each measurement is a distance along a known direction. Thousands of them per sweep make a point cloud.
It does not see color, it struggles with glass, mirrors, very dark surfaces and thick fog, and it tells you where surfaces are, not what they are.
LiDAR shows up on delivery robots, robot vacuums, survey drones and research quadrupeds, usually described as the thing that lets a robot "see in 3D". That is true in a narrow sense. A LiDAR does not take pictures. It measures how far away things are, one direction at a time, very quickly. Knowing exactly what comes out of the sensor makes it much easier to understand what a robot can and cannot do with it.
The one measurement it makes
The name stands for light detection and ranging. The core idea is time of flight. The sensor sends out a short pulse of light, the pulse hits a surface, a little of it bounces back, and a detector notes when the echo arrives. Light travels at about 299,792,458 meters per second, or roughly 30 centimeters every nanosecond. The pulse goes out and comes back, so the distance to the surface is half the total path:
distance = (speed of light × round-trip time) / 2Most LiDARs on small robots use near-infrared light that you cannot see, commonly around 905 nanometers, while some longer-range units use around 1550 nanometers.
Worked example: from an echo to a distance
Suppose an echo arrives 66.7 nanoseconds after the pulse left.
Convert the time to seconds:
66.7 ns = 66.7 × 10⁻⁹ s.Round-trip path:
3.0 × 10⁸ m/s × 66.7 × 10⁻⁹ s = 20.01 m.Halve it for the one-way distance:
20.01 / 2 ≈ 10.0 m.
The same arithmetic shows why the electronics are hard to build. To tell 10.00 meters from 10.01 meters, the sensor must notice a difference in round-trip time of 2 × 0.01 m / (3.0 × 10⁸ m/s) ≈ 6.7 × 10⁻¹¹ s, about 67 picoseconds. Good LiDARs time echoes that precisely, many thousands of times per second.
From distances to a point cloud
A single distance is not much use until you know which way the beam was pointing. A scanning LiDAR spins or steers its beams, and for every pulse it records the direction as two angles: the azimuth (left and right around the sensor) and the elevation (up and down). A distance plus two angles pins down one point in space.
To turn that into ordinary x, y, z coordinates, you use a little trigonometry. With range r, azimuth az and elevation el:
x = r × cos(el) × cos(az)
y = r × cos(el) × sin(az)
z = r × sin(el)For a point 10 meters away at an azimuth of 30 degrees and an elevation of 0: x = 10 × cos 30° ≈ 8.66 m, y = 10 × sin 30° = 5.0 m, z = 0. Check it with Pythagoras: 8.66² + 5.0² ≈ 75.0 + 25.0 = 100, and √100 = 10, the range you started with.
Repeat that for every pulse in a sweep and you get a point cloud: a list of points, each with coordinates and usually an intensity value. A 2D LiDAR, like the one on many robot vacuums, measures in a single flat slice. A 3D LiDAR stacks many beams at different elevations, so one sweep covers a band of the world around the robot.
The extras some sensors report
Intensity. How strong the echo was. Bright paint and road signs return a lot of light, dark rubber returns little. It is a hint about the surface, not a color.
Multiple returns. One pulse can partly hit a leaf and partly hit the wall behind it. Some sensors report both the first and the last echo.
Speed toward or away from the sensor. LiDARs that use frequency-modulated continuous wave (FMCW) instead of pulses can measure the Doppler shift of the echo, which gives the radial speed of the surface.
What a LiDAR cannot tell a robot
Knowing the limits matters as much as knowing the principle, because these are the places where robots built on LiDAR alone get confused.
Situation | What happens | Why |
|---|---|---|
Glass doors and windows | Missing points, or points behind the glass | Most of the light passes through instead of bouncing back |
Mirrors and shiny metal | Phantom objects in odd places | The beam reflects away like a ball off a wall, then returns from somewhere else |
Very dark or matte black surfaces | Shorter range or gaps | Too little light comes back to detect |
Heavy rain, fog, dust | Clutter close to the sensor | Droplets and particles scatter the pulses early |
Telling a person from a pole | Nothing on its own | It measures shape and position, not identity |
This is why robots usually combine LiDAR with other sensors: cameras for color and recognition, an IMU for fast motion, wheel or joint encoders for how far the robot itself has moved. Each covers gaps in the others.
How robots use the points
Once the robot has a point cloud, it can do three common jobs. It can avoid obstacles by checking whether any points fall inside the space it is about to drive through. It can build a map by stitching sweeps together as it moves. And it can find itself on an existing map by matching what it sees now against what it saw before. Doing the last two at once is called SLAM, simultaneous localization and mapping, and it is one of the main reasons LiDAR is popular on mobile robots.
Safety: LiDARs sold for robots are designed to be eye safe in normal use. Never open the housing, remove filters or modify the laser, and treat any unit without a clear laser safety label with caution.
If a line on a LiDAR datasheet like "angular resolution" or "returns per point" doesn't make sense, press the key and ask DuckyHelper about it. It sees the datasheet on your screen and explains it out loud.
Frequently asked questions
Is LiDAR the same as radar?
Same idea, different waves. Radar uses radio waves, which pass through fog and rain better but give coarser detail. LiDAR uses light, which gives finer detail but is easier to block.
Why does a robot vacuum only need a 2D LiDAR?
It mostly needs to know where walls and furniture legs are at one height to plan its path, so a single flat slice is enough.
Does a LiDAR work in the dark?
Yes. It brings its own light, so darkness does not matter. Bright sunlight can add noise, which better sensors filter out.
