Those who fear the rise of the machines, look away now. In a laboratory in Singapore two robots have mastered a task that roundly defeats humans every weekend: they have successfully assembled an Ikea chair.

Engineers at Nanyang Technological University used a 3D camera and two industrial robot arms fitted with grippers and force sensors to take on the challenge of building an £18 “Stefan” chair from the furniture company.

Working together, the robots completed the job in 20 minutes and 19 seconds after having the parts placed in front of them. More than half of the time was spent planning moves, with the execution taking nine minutes in total. Typically, the job takes a person 10 to 15 minutes, an Ikea spokesperson said.

Lead researcher Quang-Cuong Pham said he wanted to test whether robotics equipment already on the market was capable of pulling off such a complicated job. It requires the machines to recognise the chair parts, work out how to pick them up and move them without causing damage, and then perform the moves flawlessly. “Our aim was to bring all these capabilities together and push them to the limit,” he said.

It took a few attempts to get it right. Early on, the robots dropped wooden pins, let go of parts too soon, and performed moves that did more to dismantle the chair than assemble it. Some moves required a part to be held by both robots at the same time, and since industrial robots are far stronger than Ikea furniture, a number of mistakes ended badly. “We bought four chair kits and broke a few of them,” said Pham.

The robots did not work out what to do from scratch. They were programmed to know what the parts of the chair looked like, how they should go together, and in what order. “What it works out on the fly is how to do it,” said Pham.

So far the robots can only assemble the chair frame, which is held together with wooden pins. To put each one in place, the robot finds roughly the right spot and then moves the pin around in a spiral until it locates the hole. The next step is to have the robots finish the job by bolting the various parts together. “That could take a few more months,” said Pham. “It’s not significantly more difficult.”

Reported in the journal Science Robotics, the work is a reminder that engineers are making progress in the field despite a recent flurry of videos that show robots falling over at every conceivable opportunity, being defeated by a door, or simply having a bad day at the office.

Pham believes the work paves the way for robots to move on from industrial assembly lines where they perform precise, repetitive movements, and tackle more complicated tasks, such as building computers and aircraft from stores of parts.

Edward Johns, a roboticist at Imperial College London, said: “We will soon see manufacturing robots moving beyond car assembly lines, but the key long-term challenge is generalisation to everyday environments, outside of factories and laboratories. In particular, fine-grained object manipulation, such as hammering a nail into a hole, is extremely challenging for robots to adapt to new environments, and yet these are the skills which really showcase human dexterity above all other animals”.

Plenty of challenges remain for robots, said Manuel Giuliani at the Bristol Robotics Laboratory at the University of the West of England. Machines struggle to recognise parts that are lying on top of each other; are bad at handling slippery objects; and have yet to master picking up soft items, such as fruit, without squishing them, he said.

In the meantime, Pham is keen to see if robots can learn to build the chair using only an image of the assembled product as a guide. Will the technology ever help humans who struggle with the task? “I don’t think it is in Ikea’s business model to have robots assemble their chairs,” he said. “In the next 10 to 20 years, people will still be sweating over flat-pack furniture.”