DARPA, the US government agency that invented the internet (among other things) created a contest to build a self-driving car.
The first DARPA Grand Challenge, in 2004, was a 150 mile (240 km. route). The robot-car that drove the furthest before breaking down, built by Carnegie-Mellon University (CMU), lasted 11.78km.
Undeterred, DARPA tried again. Subsequently, the 2005 DARPA Grand Challenge involved driving about 132 miles (212km) autonomously. Five cars finished, with Stanford coming in first. By 2007, DARPA issued their third and final challenge, to navigate the streets of a fake city. Carnegie Mellon won.
Sebastian Thrun, Stanford’s team lead, and Red Whittaker, of CMU, were former colleagues and friendly rivals. Autonomous cars built by their students repeatedly came in first or second in the various challenges.
Google co-founders Larry Page and Sergey Brin attended the 2005 DARPA Grand Challenge in disguise. They soon after hired Thrun. Initially, most analysts assumed Google would lean on his expertise in artificial intelligence – the core of a self-driving car – to improve the core Google search engine. However, the company eventually built out a separate business for self-driving cars. In late 2016 Google spun the self-driving car division into its own company, Waymo.
By 2018 Waymo was testing self-driving cars, albeit with safety drivers, around Phoenix. By late 2018, they commercialized the service. In 2019, Waymo announced plans to build an auto plant in Michigan to convert ordinary cars to autonomous vehicles to scale up their AV taxi service.
Today, every automaker is working furiously to perfect self-driving technology for cars, busses, and trucks.