The "Star Wars" robots R2-D2 and BB-8 are the droids that NASA is looking for — "astromechs" that can help repair spaceships on the fly, a NASA robotics engineer says.

Future NASA robots might resemble humanoid droids such as C-3PO and K-2SO from the waist up, but have giant mechanical spidery legs from the waist down, the engineer added in a new piece for the journal Science Robotics.

For more than 20 years, NASA has sought to develop robot assistants for astronauts. So far, they have developed three droids. [R2-D2 Gets Real: 'Star Wars' Droids Already Exist]

First, NASA developed Robonaut, a humanoid upper body mounted on several different lower bodies, although it was never flown in orbit. Second, they developed the far more advanced Robonaut 2, which made its way to the International Space Station in 2011. Third, in 2013, NASA engineers built Valkyrie, a lighter, full-body humanoid, to explore the potential of bipedal walking on Mars and other planetary surfaces.

However, to explore the full range of possibilities that robots in space can offer, look no further than "Star Wars," where droids can serve as translators, pilot ships, fight wars, hack enemy computers, ferry secret documents across enemy lines, and even serve drinks.

"'Star Wars' is a common cultural touchstone — say something's just like R2-D2, and your eyes will light right up," said W. Kris Verdeyen, a robotics engineer at NASA's Johnson Space Center in Houston, who wrote about 'Star Wars' robots March 14 in Science Robotics. "Now 'Star Wars' is a fantasy movie — they take a lot of leeway with the physics, they're never without gravity — but as a tool to communicate to the public what the potential with robots is, it's wonderful," he told Space.com.

Of the most interest to NASA are "astromechs" such as R2-D2 and BB-8, which can keep a spaceship running even as it is being blown apart. "It'd be really nice to imagine a robot crawling on the outside of a space station to repair it," Verdeyen said.

Such droids could start off simple. "Even if the robot was really dumb, you could put it on the outside of the space station, and if there's a hole, it could just put its finger in it until the astronaut fixes it, to give you an idea of how we can get from no capability to 'Star Wars' capabilities," Verdeyen said.

In the movies, droids act just like robotic Swiss Army knives, nearly always equipped with the right tools for any situation. Although NASA would be hard-pressed to mimic this aspect of astromechs, Verdeyen does note that in tests, NASA's droids have used drills, surgical equipment and other tools.

"If we make a robot that looks and manipulate tools like a human, it can use tools that already exist for astronauts," Verdeyen said.

The ability to use human tools is just one reason why NASA droids are more likely to resemble humanoid droids than "Star Wars" astromechs. Another is that, well, rolling droids like R2-D2 and BB-8 are unlikely to fare well in real-life environments.

But the robots that NASA develops for missions to space may also not resemble humanoid droids such as C-3PO and K-2SO, either, Verdeyen added. "It doesn't make sense to have a bipedal walking robot for zero gee," he said. "If you look at the legs for Robonaut 2, they're big, spidery legs, made for climbing around in zero gee."

Although future NASA droids may not physically resemble "Star Wars" astromechs, when it comes to brains, NASA's robots would aim for their detailed spacecraft knowledge and real-time problem-solving ability. To reach that level, NASA is exploring what it calls "embedded intelligence," where robotic bodies are accompanied by an artificial intelligence and knowledge database similar to IBM's Watson.

"We're picturing something like Watson on a rack in a spacecraft local to whatever robot or astronaut would need to use it," Verdeyen said. This computer could then wirelessly control the robot or communicate with the astronaut, he said.

Verdeyen emphasized that NASA's droids are not coming a long time from now in a galaxy far, far away. "Everybody thinks robots like we see in the movies are far off, and they are, but they're less far off than they were five or 10 years ago," he said.

Follow Charles Q. Choi on Twitter @cqchoi. Follow us @Spacedotcom, Facebook and Google+. Original article on Space.com.