JOHN LEONARD: Its been said that any sufficiently advanced technology is indistinguishable from magic. But magicians have secrets to their tricks.

ARCHIVAL (BLOOMBERG WEST, 1-12-14):ANCHOR: Self-driving cars arent a thing of the future, they are here.

NARRATION: Following news about self-driving cars, its hard to know what to think. Theyre inevitable:

ARCHIVAL (KNTV, 2-26-18):ANCHOR: Driverless cars could be on the streets as soon as April.

NARRATION: Theyre impossible:

ARCHIVAL (C-SPAN, 7-4-18):JONATHAN LAST (WEEKLY STANDARD DIGITAL EDITOR): I am here to promise you driverless cars will never happen.

NARRATION: Theyre a punch line:

ARCHIVAL (CBS, THE LATE SHOW WITH STEPHEN COLBERT, 11-3-18):STEPHEN COLBERT: No steering wheel means the commute will be so much more efficient when we can give each other both middle fingers.

NARRATION: And even some researchers in autonomous vehicles are on the fence.

JOHN LEONARD (PROFESSOR, MASSACHUSETTS INSTITUTE OF TECHNOLOGY): I have to confess, like, Im actually really torn, because part of me feels that self-driving is impossible. But things that I think are impossible are happening today. What the, sort of, secret behind that?

NARRATION: It turns out there is a secret, of sorts, and its been hiding in plain sight for much of the three decades John Leonard has spent researching robotics. And to understand this secret, it helps to look at a more recent problem Leonard has taken on preparing his son Matthew for the Massachusetts drivers test.

JOHN LEONARD (DRIVING WITH HIS SON): Inch your way out. Make sure you can see both ways. Wait, wait. Theres a car coming from your right.

NARRATION: If its been awhile since youve learned, it may be easy to forget how much work driving takes to master.

JOHN LEONARD: Look good?

MATTHEW LEONARD: I think so, yeah.

JOHN LEONARD: Go for it.

NARRATION: Even in a residential neighborhood, theres some chaos on the road, and reacting correctly is how you stay safe.

JOHN LEONARD: Be very careful here because its not wide enough for two cars.

NARRATION: Matt is getting the hang of it because modeling a chaotic world in real time is a task humans have evolved to handle well. Teaching machines to do this is a harder problem.

And scientists have been working on this problem for decades. In 2004, teams of engineers from all over the country entered a government-sponsored race to get a car from California to Nevada without a driver.

MATTHEW JOHNSON-ROBERSON (ASSOCIATE PROFESSOR, UNIVERSITY OF MICHIGAN): This was really a revolutionary idea at the time. It was really unclear whether or not a vehicle would be capable of doing that.

NARRATION: Matthew Johnson-Roberson was part of a heavily favored team from Carnegie Mellon University. But heavily favored didnt turn out to mean winning. Their vehicle only made it seven miles farther than any other car but it ended up getting stuck and catching fire.

NARRATION: Not a single car in the race made it to the finish. So when they held another race in 2005, DARPA made some key changes.

MATTHEW JOHNSON-ROBERSON: They realized that this sort of completely unstructured, kind of completely open-ended, off-road race was really very, very difficult. And so what they did is they built sort of GPS waypoints that were more constrained, they made the terrain more benign, made it easier for the cars to finish.

NARRATION: In 2007, many of the same crews took on a more difficult urban course in a race where John Leonard led MITs team.

JOHN LEONARD: For me the, the Urban Challenge was like my Woodstock of robotics. It was really that, sort of, pivotal moment of that decade in robotics.

RAJ RAJKUMAR (SYSTEMS ENGINEERING LEAD, CARNEGIE MELLON UNIVERSITY 2007 DARPA TEAM): This was a remarkable transition from a notion that was considered science fiction to something that seemed to be feasible.

NARRATION: In both events, it may have looked like the cars were driving just like we do. But rather than model the world in real time, the successful teams relied on an essential shortcut that wasnt necessarily obvious from the outside.

JOHN LEONARD: And one of the things that the teams there that did the best used were very high-definition maps, sort of, breadcrumb trails so, even though you cant see it, its almost as if there are virtual railroad tracks that the robot is driving along. Its not like real, sort of, rails in the road. But the positioning in effect gives the robot this, sort of, virtual track to follow.

NARRATION: And in the years since 2007, autonomous vehicle technology has gotten better, but the hype has gotten even bigger.

ARCHIVAL (ELON MUSK, SXSW 2018):ELON MUSK: Self driving will encompass essentially all modes of driving and be at least 100 to 200 percent safer than a person by the end of next year.

ARCHIVAL (CNN, 1-14-18):ANCHOR: Driverless cars are the cars of the future.

NARRATION: But veterans of the effort to teach cars to drive themselves are striking a much more cautious tone.

STEVEN SHLADOVER (RESEARCH ENGINEER, UNIVERSITY OF CALIFORNIA, BERKELEY): I am not saying its impossible. Im just saying its going to be a long, slow slog to get there, and itll be step by step. We know its going to start with the simpler environments, and then gradually advance to more complicated environments.

NARRATION: We can see some of the industrys first simple steps in a suburb outside of Phoenix, Arizona. A corporate offshoot of Google called Waymo has outfitted a fleet of minivan taxis that are piloting themselves and their passengers around town.

ALEXIS MADRIGAL (STAFF WRITER, THE ATLANTIC): Its very cool, as you can imagine. You call it with an app on your phone just like an Uber or a Lyft. It shows up. The door opens. And you can press the big button that says, Start ride. And then you kind of sit back. You look at the screen thats on, like, on the back of the, the front seats. And it kind of shows you what the car sees.

NARRATION: But whats happening in Chandler, Arizona, also demonstrates how far the current technology is from the robot chauffeurs we once predicted.

ANDREW CHATHAM (LEAD SOFTWARE ENGINEER, MAPPING, WAYMO): I think when we were kids, we might have thought that someday there would be a literal robot sitting in the front seat of a car wearing their chauffeur cap taking you from point A to point B. Thats not what we have today.

NARRATION: For one thing, you see people in the drivers seat in many Waymo cars right now ready to take over. And these cars only operate within certain areas. But getting rid of safety drivers and getting these cars in more places will require a few critical shortcuts or hacks to cut down on the chaos of driving in the wild. And those hacks look a lot like the ones that made the DARPA challenges work.

ANDREW CHATHAM: We can only drive in places that we have already built a map. And so, for a car from us to appear on your block, we need to have built a map of your block.

NARRATION: And Waymos maps are almost unthinkably more precise than the consumer-grade maps on your phone. Which means they take a lot of time and money to build.

ANDREW CHATHAM: Our maps have, down to about 15 centimeters, the location of every curb, stop sign, traffic light, driveway. And in some sense, people might say, Oh, that seems like youre cheating. But its not. We want to give the car every advantage we can to make the problem tractable.

NARRATION: And thats not the only problem. To make it work, they had to cut down on the chaos of real-life driving. Remember the DARPA challenges? Its no accident they took place in controlled courses and sunny locations where chaotic traffic or bad weather wouldnt overload the vehicles systems. And these suburbs of Phoenix offer very similar advantages to Waymo.

JOHN LEONARD: If its snowing, your sensors are not going to work as well. Your laser scanner is going to give false readings. Your cameras not going to see as well. If you were to suddenly cover the world with snow, then now that map of what the road surface looks like doesnt match the world. So, so its like losing your rails.

ANDREW CHATHAM: A critical part of working as well as we do is being selective in what we attempt to drive. We are not driving in the dense traffic of Mumbai where you have really hairy traffic situations. We are not yet driving in the worst blizzard that you can imagine.

NARRATION: Bad weather is just one example of how real-world chaos can make self-driving cars lose their virtual rails. Streets choked with heavy traffic, pedestrians and bikes also pose problems for the software controlling these cars. And the stakes can be high if things go wrong.

STEVEN SHLADOVER: Think of the software that we use on our ordinary desktop computers. Weve all encountered the Blue Screen of Death. But if its the computer whos driving your car, its a lot more than a figure of speech. You really could die.

NARRATION: In the U.S. since 2016, at least four people have died in fatal accidents where authorities said autonomous software was either engaged or fully controlling the car during the crash. And the more we use autonomous software in transportation, the more lives will depend on it working well. Which leads to one of the most fundamental questions about this technology. Will it be safer than us?

MATTHEW JOHNSON-ROBERSON: Were actually incredibly safe drivers as human beings. And so one of the things thats hard to think about is that theres this massive number of fatalities, but its because we drive a massive amount as Americans.

NARRATION: And some researchers say it will be a long time before autonomous vehicles will be as safe as people. Despite industry claims about the safety benefits of self-driving cars, theres not enough independently gathered data to back up their claims and theres no federal agency tracking this nationally.

ALEXIS MADRIGAL: Right now we have almost nothing in the public record about how the cars actually work, what software is powering them, how that software was trained in the case of artificial intelligence, how good the performance actually is for any of the companies.

NARRATION: Several leading companies have begun toning down their predictions about the imminent arrival of driverless technology. And even engineers at Waymo acknowledge the difficulty of the road ahead.

ANDREW CHATHAM: We are continuing to work on the software. Next, we need to build maps. Its certainly going to be a lot of work. And then finally, we need to convince people that this is something they want and that is responsible.

NARRATION: In some ways, even todays most advanced vehicles are still struggling with problems engineers ran up against in those early DARPA challenges.

RAJ RAJKUMAR: The gap between what was accomplished then, and what needs to be accomplished for fully automated driving on public roads under different weather conditions, lighting conditions, traffic conditions, that gap is big. But, along the way, there will be multiple benefits from these technologies getting into vehicles.

NARRATION: And we are seeing benefits from the technology getting into vehicles on the street today. Its helping human drivers be better drivers with features like auto parking, lane assist, blind spot warnings.

ALEXIS MADRIGAL: Your car will just get, like, a little bit smarter through time. It will take over more of the tasks that suck. You know, long-haul driving, parking the car itself. Like all these things are available in some form, but theyll get better and better and better. And it will make it harder and harder for you to crash the car. These are things that, you know, are really a continuation of a very, very long path towards safer cars.