Elon Musk has called them the most impactful technology on the horizon. But unions are lobbying against their widespread use, citing studies showing they may kill up to 500,000 jobs.

They are autonomous trucks, which supporters pitch as the remedy to a growing demand for shipping and for greater safety on the road. If the technology becomes good enough, the logistics industry will be radically changed, with trucks operating nearly around the clock as they crisscross the country. 

The number of companies racing to perfect automated trucking technology is long. Last year, Tesla revealed plans for its own autonomous truck called Semi, which relies on battery power and has a range of up to 500 miles. Meanwhile, Daimler, one of the world’s largest trucking companies, has announced a $573 million investment in self-driving trucks. And Aurora, another major player in the space, has gone so far as to create its own autonomous truck operating system.

Still, it will be years before drivers are completely absent from behind the wheel of 18-wheelers, experts tell Fortune. The technology must still be improved so it can reliably operate in extreme weather while officials must rewrite regulations that were originally created for human truck drivers.

As it stands, the U.S. government has opened the door to autonomous trucking—but only to a point. The U.S. Department of Transportation announced a $100 million plan for autonomous car research, including a $60 million grant for private companies. In March, Transportation Secretary Pete Buttigieg said that the government would not stand in the way of innovation, and that there would be “meaningful developments” in autonomous vehicle policy this decade.

“This is a marathon, not a sprint,” Steve Viscelli, a sociologist at the University of Pennsylvania researching automation and labor markets, told Fortune. “This is a decades-long sustained investment by the U.S. government. And so I would not bet against this technology being successful.”

A huge increase in efficiency

Automated trucking, especially for long-haul trips, is considered by many shipping CEOs as a huge step toward greater efficiency. Regulations limit human trucks drivers to eight hours of work before taking a break—and no more than 11 hours daily—so they can rest.  

But in reality, the amount of time drivers spend physically driving a truck is about six to six and a half hours daily, Wiley Deck, a former administrator in the U.S. Department of Transportation, told Fortune. Self-driving trucks would let companies nearly triple that to 17 hours daily.

“That’s a huge and significant increase in efficiency for that vehicle,” Deck said. 

Deck is currently vice president of government affairs and public policy for Plus, an autonomous driving startup that has attracted nearly $700 million in venture funding since 2016. The company has already tested its trucks widely across the U.S. and is now running trials in Europe and China, after a successful experimental run last year on two long-haul routes in Chinaduring which its vehicles drove over 60,000 miles without incident.

Automated trucks have already been tested on public roads in the U.S. 

“We haul freight from Phoenix to Tucson every day in autonomy,” Jim Mullen, chief administrative and legal officer at automated trucking company TuSimple, told Fortune. “We’re also moving freight from Tucson to Dallas and Dallas to Orlando.” 

But use of self-driving trucks is still relatively limited to the Sun Belt states, as the technology isn’t so good in bad weather—such as intense snow and fog.

Infrastructure in certain parts of the country will also have to catch up. High-speed 5G internet connections let self-driving vehicles communicate wirelessly with traffic signals, roadside assistance, and with one another. But these networks are still missing in many parts of the U.S.

“No 5G makes things like remote driving much harder,” Viscelli said.

A changing labor market

The biggest impact of automation may well be to the labor market. Unions are worried that automation will kill jobs and make trucking less safe.

But experts say that the reality is more complicated. Companies in the automated trucking industry insist truck drivers won’t be put out of work by robots, despite fears to the contrary.

“I think you’re going to see jobs changing and jobs expanding,” Deck said.

Recruiting new drivers has become increasingly difficult in recent years, he said, especially for long-haul truckers. The high-stress nature of the job, long hours away from home, and potential safety hazards make the job unappealing to many people. 

“It’s constantly challenging for motor carriers to find drivers,” Deck said.

The U.S. is in the midst of a historic truck driver shortage. In 2021, there were 80,000 fewer drivers than would ideally be available to meet demand, according to the American Trucking Associations. 

And while the number of qualified drivers, or those willing to make a career out of long-haul trucking, is low, the demand for long-haul shipping and distribution is only increasing.

The pandemic gave a big lift to online shopping, increasing e-commerce sales by nearly $219 billion between 2020 and 2021. And while the growth of internet shopping may be slowing somewhat in 2022, some habits will be hard to kick, with one study forecasting that e-commerce sales will grow from $5.5 trillion today to over $7 trillion in 2025. 

And more demand for e-commerce will mean more demand for long-haul trucks to ferry those products across the country.

“A self-driving truck’s job is going to be fundamentally different,” University of Pennsylvania’s Viscelli said. “We have a ton of pent-up demand for additional transportation services, and that starts with e-commerce.”

Because of technological limitations, human truck drivers will still have some role. For example, people will still have to be behind the wheel in cities and urban environments, where software cannot navigate at the moment. 

This could lead to hybridization in the logistics industry, with some routes being handled by automated long-haul trucks. Human drivers would be responsible for unloading the trucks or for driving shorter routes in more urban environments.

“The trucking industry is a very diverse industry,” Mullen said. “You will see hybrid moves in some segments of the industry; other segments of the industry might be entirely autonomous.”