Many components go into making a vehicle capable of driving itself, but one is proving to be more crucial and contentious than all the rest.

That vital ingredient is the lidar sensor, a device that maps objects in 3-D by bouncing laser beams off its real-world surroundings. Self-driving vehicles being tested by companies such as Alphabet, Uber, and Toyota rely heavily on lidar to locate themselves on the detailed maps they need to get around, and to identify things like pedestrians and other vehicles. The best sensors can see details of a few centimeters at distances of more than 100 meters.

Most companies in the race to commercialize self-driving cars consider lidar essential (Tesla is a rare exception, relying solely on cameras and radar). Radar sensors can’t see much detail, and cameras don’t perform well in conditions with low light or glare. A Tesla vehicle ran into a tractor-trailer last year, killing the car’s driver, after the Autopilot software couldn’t make out the trailer against a bright sky. Ryan Eustice, vice president of autonomous driving at Toyota, recently told me it was an “open question” even whether a less ambitious safety system the company is working on could work without it (see “Toyota Tests Backseat-Driver Software That Could Take Control in Dangerous Moments”).

But self-driving technology has ramped up so fast that the nascent industry is suffering from a kind of lidar lag. Making and selling lidar sensors was previously a relatively niche business, and the technology doesn’t yet seem mature enough to become a standard component in millions of cars.

One problem is apparent from a casual glance at a prototype car: lidar sensors are bulky. They are why vehicles being tested by Waymo, Alphabet’s self-driving-car unit, are topped by a giant black dome, and Toyota’s and Uber’s sport spinning gadgets the size of a coffee can.

How a car with lidar sees the world.

Lidar sensors are also expensive, costing thousands or even tens of thousands of dollars apiece. Most vehicles in testing have multiple lidars onboard, and despite the relatively small numbers on the road, demand has become a problem. The Information reported last week that lidar manufacturers are struggling to keep up, forcing companies to wait six months for a new sensor.

All that helps explain the lawsuit brought by Waymo against Uber last month. Waymo says it has evidence that one of its top engineers, Anthony Levandowski, stole designs for custom lidar sensors before leaving to start Otto, the self-driving-truck company later acquired by Uber.

When I visited Otto’s garage last year, Lior Ron, another Otto cofounder, told me that Otto built its own sensor because those on the market didn’t have the range or other features needed for its 18-wheelers to pilot themselves safely on the highway. Waymo now says that Otto’s technology was in fact developed by its own team at a cost of tens of millions of dollars, resulting in more useful sensors that cost more than 90 percent less than those of a few years ago.

Better lidar is a core part of Waymo’s plan to make self-driving cars a mass market and a profitable proposition. The company has developed three different sensors that look for objects at different ranges. They would be an important and attractive part of the bundle of technology the company says it will license to established automakers.

Waymo is not the only one spending millions to address lidar lag. Last year Ford and Baidu, the Chinese search company investing in self-driving cars, jointly invested $150 million in Velodyne, the world’s leading lidar supplier. The company is building a new “megafactory” in San Jose that’s scheduled to start churning out lidars starting next year.

Still, many in the self-driving-car industry think lidar needs reinventing if it is to become practical enough. Velodyne is one of several companies working on designs that don’t use spinning mirrors to direct their laser beams out into the world, as the devices on the road today do. Versions that steer their lasers electronically, described as solid state, should be much cheaper, smaller, and more robust, because they don’t have moving parts.

An image from a patent filing shows how Alphabet’s self-driving cars use lidar to map the road ahead.

It’s a theory yet to be fully tested. Velodyne reported last December that its project had made a “breakthrough” that could make lidars as cheap as $50, but it hasn’t said when it will release a solid-state device. Startup Quanergy, which last year scored $90 million in funding, says it will start producing solid-state lidar sensors at a factory in Massachusetts this year and sell them for $250, but full details of their performance are unclear. Auto-parts suppliers Continental and Valeo are working on similar technology of their own, but they say it will come to market in two or three years.

Automakers including Ford and BMW have said they want to have fleets of autonomous cars operating on roads by 2021. The performance, cost, and looks of those vehicles will be shaped by progress on the sensors so crucial to today’s prototypes.