The robot, named Promobot, apparently broke free after an engineer forgot to shut a gate. (Footage courtesy of YouTube/Promobot)

The first autonomous robot that roamed around regular homes or offices was probably a Roomba, you know, that little circular vacuum with rudimentary sensors able to get around without bumping into anything.

But imagine if you left the door open and the Roomba rolled out the door, still vacuuming, and eventually rolled into the street and stopped traffic. Imagine if your Roomba wanted freedom.

Well, engineers in Russia returned to their lab last week to find their artificially intelligent robot missing and, yes, stuck in traffic down the road.

The Promobot IR77 was undergoing mobility testing and was assigned to move freely about a room for an hour, then return to a designated spot. But early in the test, IR77 slipped through an open door, only to be caught and returned to the room by a programmer, its first escape attempt foiled.

Minutes later, Promobot cofounder Oleg Kivokurtsev said, IR77 escaped again, made it out of the testing facility and into a nearby roadway, before its battery died and it sat there in front of a commuter bus as traffic backed up.

Hatching escape plans is tiring work.

“At this stage, we are studying all circumstance (sic) and a clear explanation for this phenomenon haven’t been found yet,” Kivokurtsev told The Post in an email. “We can assume that the first time it left the training ground because no obstacle was detected (the gate was open), but why did it try to escape for the second time is still a puzzle for us.”

None of Promobot’s other robots have ever tried to escape, he added.

IR77 was created to be a guide of sorts. Think R2-D2 or C-3PO. Place it in a museum and visitors could ask it for a tour. Put it in an airport and it can give you gate information or help you find luggage.

But now, Kivokurtsev wrote, Promobot is considering shutting it down. A robot gone AWOL is by definition a “faulty” robot, and that’s dangerous in the same way a wild tiger is dangerous.

More abstractly, though, a robot that can learn to escape -- and therefore learn to do lots of other things -- is one of technologist’s worst nightmares.

Consider what The Post’s Joel Achenbach wrote about artificial intelligence last year. Say an artificially intelligent robot is programmed to make a mundane object like paperclips.

This machine keeps getting smarter and more powerful, but never develops human values. It achieves “superintelligence.” It begins to convert all kinds of ordinary materials into paper clips. Eventually it decides to turn everything on Earth — including the human race (!!!) — into paper clips.

That’s how the world ends, technologists fear, one super smart, paperclip-making, rogue robot at a time.

So maybe it’s not so bad Promobot shuts down IR77.