Image source: BMW.

Recently, BMW (OTC:BAMXF) mentioned that it would introduce an autonomous car by 2021, called the iNext. The automaker hasn't released much detail about the vehicle, but it will most likely resemble the similar-sounding Vision Next 100 concept vehicle, which the company showed off back in March. 

At BMW's annual shareholder meeting this month, the company's CEO, Harald Krueger, said, "Our goal is already clearly defined -- to be number one in autonomous driving."

But BMW will find plenty of driverless-car competition among its fellow luxury automakers, most specifically from Mercedes-Benz parent company Daimler (OTC:DMLR.Y) (OTC:DDAI.F)

Daimler is currently a leader in driverless technology among automakers, and it's likely Krueger's mention of autonomous tech is an effort to reassure investors the German automaker isn't falling behind one of its biggest rivals.

But which carmaker is leading in driverless tech? Let's have a look:

BMW's autonomous angle
The company has been working on driverless car technology since 2011, but some of its most recent tests have involved working closely with China-based tech giant Baidu on a joint driverless venture. The two companies teamed up to equip a BMW 3 with Baidu's AutoBrain autonomous car technology and performed real-world driving tests over 18.6 miles of Beijing roads. 

Aside from its work with Baidu, the company has been making internal changes to focus more on autonomous driving, such as increasing research and development on artificial intelligence. In an interview with Reuters back in March, BMW admitted that it had some catching up to do with its machine learning and artificial intelligence systems.

BMW's goal of a fully autonomous car by 2021 might be a bit premature, though, even by the company's own standards. The company's head of marketing and sales, Ian Robertson, said earlier this year that while driverless technology may be ready in 10 years, other factors may push its adoption to 15 years from now. 

BMW has a lot of incentive to accelerate its driverless programs, however. The company is fighting Mercedes for the top luxury automaker spot, and driverless technology could be the crown jewel for the luxury automakers.

Mercedes' driverless dream
Mercedes began its autonomous car testing back in 2012 and has quickly emerged a leader in the space. 

The 2017 Mercedes-Benz E-Class has an optional semi-autonomous Drive Pilot system which detects speed limit signs and automatically adjusts vehicle speed, and also uses radar and cameras to allow drivers to change lanes by simply pushing up or down on the turn signal (similar to Tesla's Autopilot features). 

Mercedes was also the first automaker to receive a license for fully autonomous testing in Nevada, and is investing heavily in predictive artificial intelligence for driverless systems. 

Not to be outdone by BMW's concepts, Mercedes-Benz has already shown off its F 015 concept that allows any passenger to take control of the autonomous car, and sports four seats that can all face toward each other, like a miniature living room on wheels. 

Other companies appear to be taking notice of Mercedes' driverless capabilities as well. Uber recently ordered 100,000 vehicles from the automaker for its autonomous ambitions -- after considering using Tesla's vehicles. The order won't be filled until 2020, when the driverless technology is more complete, but the move shows that other companies are looking to Mercedes for the future of autonomous driving. 

No contest for now
Mercedes has a clear lead in the space right now, but I wouldn't count BMW out just yet. Nearly every major automaker has already started diving into driverless technology, and BMW won't be left behind. 

The one thing investors need to remember is that no one really knows how long the transition from traditional cars to driverless ones will take. Government regulations could slow adoption rates and hold back the technology, and drivers could be much more hesitant to buy a driverless car then automakers expect. 

For that reason, investing in these automakers (or any others) based on their driverless prospects probably isn't the best idea right now. Sure, autonomous cars will become a major part of their business in the future, but the latest estimates from IHS Automotive show that just 10% of global light-vehicle sales will be driverless cars in 2035.

Mercedes may be ahead of the curve for now, but there's plenty of time for BMW and others to catch up around the bend. 

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.