A new generation of robots is on the way—smarter, more mobile, more collaborative and more adaptable. They promise to bring major changes to the factory floor, as well as potentially to the global competitive landscape.

Robots deployed in manufacturing today tend to be large, dangerous to anyone who strays too close to their whirling arms, and limited to one task, like welding, painting or hoisting heavy parts.

The latest models entering factories and being developed in labs are a different breed. They can work alongside humans without endangering them and help assemble all sorts of objects, as large as aircraft engines and as small and delicate as smartphones. Soon, some should be easy enough to program and deploy that they no longer will need expert overseers.

That will change not only the way an increasing number of products are made. It could also mean an upheaval in the competition between companies and nations. As robots become less costly and more accessible, they should help smaller manufacturers go toe to toe with giants. By reducing labor costs, they also may allow the U.S. and other high-wage countries to get back into some of the processes that have been ceded to China, Mexico and other countries with vast armies of lower-paid workers.

Some of the latest robots are designed specifically for the tricky job of assembling consumer-electronics items, now mostly done by hand in Asia. At least one company promises its robots eventually will be sewing garments in the U.S., taking over one of the ultimate sweatshop tasks.