(Reuters) - Carmakers have big plans for their next generation of factories: smarter designs, artificial intelligence and collaborative robots building a wide range of vehicles on the same line.

General Motors assembly workers connect a battery pack underneath a partially assembled 2018 Chevrolet Bolt EV vehicle on the assembly line at Orion Assembly in Lake Orion, Michigan, U.S., March 19, 2018. Photo taken March 19, 2018. REUTERS/Rebecca Cook

The plants will also feature a component they say is the secret ingredient to flexible manufacturing: humans.

SAIC-GM’s factory in Shanghai, which opened in 2016, is one of the world’s most advanced auto plants, assembling Buick minivans and Cadillac sedans and SUVs, including the CT-6 plug-in hybrid for U.S. consumers.

GM’s Shanghai plant is expected to eventually produce new electric vehicles, primarily for the Chinese market, executives have said.

The plant, which GM operates with Chinese partner SAIC Motor Corp Ltd, feels almost like a scene from a Star Wars film, with battalions of machines quietly working in self-directed harmony.

Collaborative robots, or “cobots,” painted matte green and unrestrained by the steel cages that surround their larger industrial cousins, are being programmed to work alongside humans on the line. One unusual operation advanced models now handle is installing gears in transmissions.

“They can actually feel; they can pick up a gear set (and) mesh the gear into a transmission,” Paul Buetow, GM’s China manufacturing chief, said on a recent tour of the plant. The robots reduce strain on humans and improve quality and consistency.

Globally, automakers are embracing Industry 4.0 — a term coined by German manufacturers for the digitalization and automation of assembly processes — and the consensus is that fewer people will be required in future factories. But humans will still be needed.

“This is not about cutting head count,” said an insider familiar with industry efforts to upgrade and streamline auto plants in the United States, China and Europe.

The focus instead is on improving flexibility and efficiency between machines and humans as automakers figure out how to build multiple models — powered by gas engines, electric motors, or both — in the same factory.

“It’s not just blood and sweat that goes into manufacturing on an assembly line,” said United Auto Workers president Dennis Williams. “It’s critical thinking that automation can’t replicate.”

DOING THE DIRTY WORK

A new generation of cobots is working alongside humans at General Motors Co plants from Shanghai to Orion Township, Michigan.

Slideshow ( 13 images )

The Orion plant, north of Detroit, is one of the industry’s most flexible. It builds three models on one line: The gas-engine Chevrolet Sonic, the battery-powered Chevrolet Bolt EV and the self-driving Cruise AV.

More than 800 robots work there, including a half-dozen cobots painted green to denote they can safely operate around humans.

The machines handle the “dirty, dull, difficult and dangerous” tasks while people do the work requiring dexterity and intelligence, says Marty Linn, GM’s principal engineer for robotics.

In one section of the plant, cobots glue protective pads onto headliners, a tough job for humans because the glue is heated to scalding temperatures before it is applied.

At another station, a cobot takes new spare tires off a conveyor belt and stacks them on a cart. This, GM’s Linn said, was a job workers universally hated because it was repetitive and back-breaking.

At the end of the line, cobots ensure headlamps are properly aligned. They will also be used to test sensors on automated vehicles, Linn said.

Markus Schaefer, head of production and supply chain at Daimler AG’s Mercedes-Benz Cars, said the German automaker is “paring back automation” in final assembly to boost flexibility.

“We need this because we are making a greater variety of derivatives and, as a premium automaker, we make highly individualized vehicles,” he said.

Schaefer said Mercedes will eventually have plants that can build vehicles with different powertrains and with both front- and rear-wheel drive.

The automaker is converting its showcase Sindelfingen plant to build the GLA, a compact front-wheel-drive utility vehicle, as well as its rear-wheel-drive S-Class luxury sedan.

SHAPING THE FUTURE

How collaborative robots and other digital tools are used will determine the size and layout of future factories - and how many humans work there.

Ford Motor Co executive Joe Hinrichs created a stir last October when detailing the automaker’s vision of a future factory for electric vehicles, which have fewer parts than those with combustion engines and thus would require far less floor space, fewer workers and lower investment.

But like other major global carmakers, Ford appears reluctant to invest in dedicated electric-vehicle plants until there is sufficient - and consistent - demand to justify the expense.

Ford has years of experience building different types of vehicles on one line, including versions of the Focus compact with gasoline engines and electric motors.

Ford has installed a few collaborative robots at its recently renovated Louisville, Kentucky, truck plant. The company is also using digital tools such as including augmented reality to map new assembly lines, and predictive analytics to schedule repairs and maintenance before machines break down.

The company has no immediate plans for a separate, highly automated plant for its next-generation electric vehicles, some of which are expected to share factory space with traditional combustion-engine models, according to sources familiar with Ford’s strategy.

An April report by Barclays’ global auto investment team predicted “robots won’t kill all automotive jobs,” at least not in the near term.

Auto companies are working on “perfecting the combination of human and robot,” according to the report, because “the human touch is still necessary.”

Even Tesla chief executive Elon Musk, who long praised robots’ virtues and promised to turn his California electric car factory into a highly automated “alien dreadnought,” has had something of an epiphany.

Bedeviled by technical glitches, Musk recently tweeted: “Excessive automation at Tesla was a mistake ... Humans are underrated.”