Chinese Internet search giant Baidu Inc. is joining the race to develop autonomous cars, and planning to field its first such vehicles in China within three years.

Wang Jing, a Baidu senior vice president, told The Wall Street Journal that the company is setting up a new business unit that will work on developing autonomous vehicles for use as public shuttles. Mr. Wang will head the new unit.

Technology heavyweights from Alphabet Inc. ’s Google to Samsung Electronics Co. and car makers from Toyota Motor Corp. to Tesla Motors Inc. are competing to develop components and technology for self-driving and Internet-connected cars. Many car makers already offer features that enable cars to take over critical functions and increase safety.

Baidu’s plan comes as Google is moving closer to commercializing its self-driving car technology. In September, Google hired an auto-industry veteran to run its project, which started in 2009, and it is now tackling more complicated maneuvers such as making right turns at stop lights.

Like Google, Baidu has big ambitions to use its mapping data and “deep-learning” technology—in which computers simulate the brain in learning from massive amounts of data—to expand its scope well beyond online search.

The company last year hired Stanford researcher Andrew Ng, who also helped set up Google’s artificial-intelligence effort, to head its research center in Sunnyvale, Calif. Mr. Ng is among the researchers involved in Baidu’s car project, Baidu says.

Mr. Wang said Baidu’s two prototype BMW 3 Series Gran Turismo autonomous cars are being road-tested on expressways in Beijing’s northern outskirts, including on the city’s Fifth Ring Road. Baidu is planning to expand its fleet, Mr. Wang said. He said Baidu is in discussions with Chinese and foreign auto makers, but declined to elaborate.

Baidu’s plan calls for its future vehicles to operate on fixed routes or within set urban areas. “We will cooperate with some governments to provide shared vehicles like a shuttle service; it could be a car or van, but for public use,” Mr. Wang said. Baidu doesn’t have a time frame or goal for making self-driving cars commercially available for private consumers.

In April, Boston Consulting Group cautioned that self-driving cars likely won’t hit the road until 2025, but autonomous vehicles could appear sooner in more controlled situations such as automated ride-sharing services in city centers.

Driverless buses have already been put into trial, or will soon be, in places such as the Swiss city of Sion and in Trikala in Greece. A Japanese prefecture just south of Tokyo will be experimenting with an unmanned taxi service beginning next year.

In China, bus maker Zhengzhou Yutong Bus Co. Ltd. in September said its prototype self-driving bus completed a 33 kilometer (20-mile) drive on an intercity road in central China and was able to change lanes, pass other vehicles and respond to traffic lights.

Baidu’s cars are equipped with a laser radar, or Lidar, and sensors and cameras with varying visibility ranges. Its software draws on Baidu’s highly detailed maps as well as its “deep-learning” technology.

Baidu said its car has been tested on highways hundreds of times, with several trips each day.

Still, Baidu is well behind Google, whose 50-plus self-driving cars have covered more than a million miles and are currently being tested on public roads in urban areas of California and in Austin, Texas.

Such settings are seen as more challenging than highways because they involve intersections and pedestrians.

Baidu’s next steps involve testing the prototype cars in new situations, such as narrow city streets or wide boulevards, and in rain or snow. Mr. Wang said that developing an autonomous car that can adapt to China’s often unpredictable driving conditions is a challenge.

“China’s traffic is more complicated,” Mr. Wang said. “The behavior of pedestrians, cyclists, are very different from [those] in the U.S.”

Another potential challenge for Baidu is that China has yet to enact laws to allow for autonomous vehicles. Still, Baidu believes such technology could make roads safer. The World Health Organization has estimated that 261,000 people died on China’s roads in 2013, compared with a bit more than 32,000 a year in the U.S.

A survey of car owners by consulting firm McKinsey & Co. this year found that 93% of Chinese respondents were interested in owning a car with autonomous functions, compared with 76% of Germans and 67% of Americans.

“There’s a great opportunity in China because the traffic is terrible in a lot of cities,” Mr. Wang said.

“So we have a chance to cooperate with local governments and the central government to improve this situation.”

Source: Wall Street Journal by Gillian Wong