By Matt Simon
Anyone who tells you the robot apocalypse is upon usâ€”that the machines will not stop stealing our jobs, that they are gearing up to chase us through the streets while doing backflips and fighting off stick-wielding humansâ€”has never tried to program a robot. Itâ€™s difficult to get a machine to do so much as move an arm, which requires the precise control and coordination of joint angles and torque.
The difficulty of programming robots is a problem that Facebook, of all companies, wants to fix. Today the social network continues its unlikely dive into robotics by open-sourcing a new robot framework, known as PyRobot, that could simplify the way researchers program their machines, and could even make it easier for non-robotics types to jump into the field. If programming robots has so far been something like wading through a command-line interface, PyRobot promises to be like gliding through the sleekness of macOS. At least, thatâ€™s the hope: Many others have tried and failed to do this kind of thing.
PyRobot isnâ€™t actually an operating system in and of itself, but a kind of layer above the catchily named Robot Operating System, or ROS, which is omnipresent in robotics research. Simply put, ROS is a platform that allows researchers to control every aspect of a robot, be it sensors or joints. It works across many different kinds of robots doing a wide variety of things. But researchers can still get bogged down in the granular details required to control a robot using ROS.
Matt Simon covers cannabis, robots, and climate science for WIRED.
With PyRobot, a roboticist can write simple code in Python to command a machine, which the platform then translates into the more complex instructions that ROS requires. That is, PyRobot is “abstracting” much of what ROS is doing to control the robot. â€œIf I’m a machine learning researcher, and I only care about going to this X,Y location, I really do not want to be bothered by all the low-level details of how actually the robot ends up getting there,â€� says Facebook AI researcher Abhinav Gupta. â€œThat’s what we want to abstract away, so that these researchers can focus just on their applications.â€�
A central challenge of doing research with robots is that they come with a lot of baggage youâ€™re not particularly interested in. Maybe youâ€™re exploring computer vision: how a robot recognizes a particular object. And maybe to get a better look at that object, the robot needs to manipulate it, which happens to be one of the biggest challenges in robotics at the moment. The goal of PyRobot is to simplify as much detail as possible. â€œThe idea is the whole pipeline of doing grasping is only a few lines of code,â€� says Gupta. â€œThat’s what makes it easier for a computer vision or machine learning researcher.â€�
Abstraction, though, comes with its downsides. â€œThe idea of abstraction is good, but in practice when the robot breaks you’re stuck trying to fix the abstraction,â€� says Stefanie Tellex, a roboticist at Brown. â€œSomething goes wrong, the sensors not working anymore or something, and you’ve got to unpack the problem and break down the abstraction.â€�
PyRobot used to make a LoCoBot position its arm
Beyond abstraction, PyRobot promises to play nice with a range of robots. Itâ€™s working with two so far: LoCoBot, a single-armed robot on a mobile base that Gupta helped develop at Carnegie Mellon, and Sawyer, a commercial robot thatâ€™s also a single arm, but is stationary and has seven degrees of freedom compared to LoCoBotâ€™s five. The two are fundamentally different beasts to program, but PyRobot can command both with the same code.
â€œBy having this common API that runs across different hardware, what will happen is your code can be downloaded by me for my robot framework,â€� says Gupta. Youâ€™d just have to tell the system youâ€™re working with a LoCoBot instead of a Sawyer, or vice versa. â€œThis is very critical, because there’s a lot of diversity in hardware in robotics currently.â€�
The real test will come when people start using PyRobot and see how well it manages to work across all that diverse hardware. â€œI’m a little bit concerned because right now they only have two robots here,â€� says roboticist Andrew Spielberg of MIT CSAIL. â€œAnd I don’t know how generalizable this abstraction is.” But the robotics world would benefit from some better programming tools, assuming the toolsâ€™ creators get the details right. Progress in robotics is slow in part because researchers canâ€™t always easily adopt the lessons (or code) of other roboticistsâ€”what works on your machine isnâ€™t easily portable to a different kind of robot.
That in turn hinders the rate at which robots gather valuable real-world experience. â€œThis common-sense knowledge is going to come via interacting with the physical world, and I think that’s where we need to scale up,â€� says Facebookâ€™s Gupta. PyRobot could provide a common framework to supercharge this learning by interaction. Indeed, this is what Facebook is tackling with its robotics program: Helping machines explore their world could improve not only the AI that runs them, but the AI that powers purely digital assistants.
LEARN MOREThe WIRED Guide to Robots
All well and good, but this isnâ€™t the first attempt at the Great Unification of Research Robots. â€œThe problem with it is that there’s been so many people who have tried to do this,â€� says Tellex. â€œSo many times in robotics. What happens is there’s a little community that uses it and then they go somewhere else.â€�
Another problem has to do with security. You canâ€™t talk about Facebook without talking about security, but security is also a major component of robotics. ROS comes with no built-in security features, and thatâ€™s by designâ€”its makers wanted to leave that to the researchers adopting the platform. Accordingly, last year Tellex was able hack into a research robot and command it from clear across the country. PyRobot doesnâ€™t add any security to ROS, but itâ€™s worth noting that the next version of ROS will come with robust security, its maker says.
â€œI think security in ROS-land is primarily an issue of awareness,â€� says Tellex. â€œPeople using the toolkits need to be aware of the security implications, and I don’t think ROS 2 is going to be some kind of silver bullet.â€� The longer-term issue is that as robots continue to move out of the lab and into the real world, theyâ€™re going to drag these security issues along with them. Just look at the unfolding crisis of the largely unsecured internet of things.
So can PyRobot become the great unifier of robotics? That remains to be seen, but robots will need something like it if they ever hope to chase us down the street.
More Great WIRED Stories