Futurists and science fiction writers have predicted for decades that one day smart robots would roll around town doing errands for us.

Today, that future seems still far off. But it's just around the corner. It's all thanks to Google, as well as car companies and universities that are making incredible advances in the technology for self-driving cars.

Google's Prius is already a better driver than you are

In 2004, I was invited by the Pentagon to cover a historic event in California's Mojave desert: The DARPA Grand Challenge.

Google's self-driving cars may soon appear on Nevada roads, where the state's Department of Motor Vehicles approved the nation's first autonomous vehicle license. (Reuters / Nevada Department of Motor Vehicles/Handout)

DARPA, the U.S. military's Defense Advanced Research Projects Agency, wanted to accelerate the development of self-driving cars for use on the battlefield. The agency challenged universities and private companies to enter their robotic vehicles in a contest -- a 142-mile course that had to be navigated by self-driving cars, trucks and even a motorcycle. The winner would receive a cash prize.

None of the entries made it even to the 10-mile mark.

While robot cars couldn't even handle a dirt road in the desert then, now they share the highways with us.

Google, for example, has developed a fleet of eight self-driving cars, including six Toyota Priuses, as well as an Audi and a Lexus.

A driver sits in the driver's seat without doing anything and a Google engineer in the passenger seat. This is a precaution and, it turns out, an unnecessary one. Google's self-driving cars have driven hundreds of thousands of miles on public roads without a single accident while under computer control. In fact, the most dangerous thing about Google's self-driving car is the human driver. Once he or she takes the wheel, the risk of accident increases.

Google's is just one of many successful self-driving car projects.

The major car companies -- including Audi, BMW, Cadillac, Ford, GM, Mercedes, Volkswagen and Volvo -- all have advanced self-driving car projects in the works. Many universities do, too. And of course, the Pentagon has been working on self-driving vehicle projects for decades.

Volvo demonstrated its self-driving car technology in Spain this month by the vehicles in a "convoy" in normal traffic. The convoy consisted of a lead truck driven by a professional driver, with a self-driving truck and three self-driving cars following.

From a technology point of view, the self-driving car is ready for wide-scale public use.

The only barrier to broad consumer availability is for governments to legalize them and for companies to build them and make them available for sale.

A robot gets a driver's license

The state of Nevada legalized self-driving cars last summer, a law that went into effect in March. Just this month, the state granted the world's first driver's license to a driverless car -- one of Google's Priuses.

The legalization of robot cars isn't taking place just in Nevada. The California State Senate approved a bill last week that would legalize self-driving cars in the state. The notoriously fractious body approved the measure unanimously. The bill will be heard next by the state Assembly.

Arizona, Hawaii and Oklahoma are also considering the legalization of self-driving cars.