The Beautiful Video Game That Drives NASA's Curiosity Mars Rover

By Brent Rose on at

So MSL Curiosity has landed. It survived the seven minutes of terror and safely touched down on the surface of Mars -- a miracle in its own right. Now that it's there, it needs a way to move around. Anyone who played Lunar Lander and Moon Patrol already knows how they're going to do this: video games.

Brian Cooper is the lead driver for MSL Curiosity, who also wrote the software to drive it. But that's not all—he wrote the control software for every rover that has ever been sent to Mars. Between Sojourner, Spirit, Opportunity, and now Curiosity, Cooper is also the only person who has driven every one of them. Driving, in this sense, doesn't just mean moving the rover from one place to another—the driver controls everything that moves. The arm; the drills, everything. But driving Curiosity isn't like driving any of the previous rovers. It's way, way better.

To start with, Curiosity has stereoscopic cameras all over it, which means it sees in 3D. That's not just so we can get a way trippier look at the red planet, it's so the rover can build three-dimensional maps of the area around it, populating it with surfaces and textures. This level of detail greatly enhances the rover's hazard-avoidance capabilities, taking the pressure off the human drivers to watch out of the problems that have come up in the past.

The previous rover, Opportunity, got stuck at one point in a sand dune called Purgatory. The problem was that because it wasn't visually checking to see if it was making progress, it didn't know it was stuck. The wheels turned the number of revolutions they were supposed to turn in order to get it to its target destination for the day, which was another 200 metres away. This caused it to dig itself deeper and deeper into a hole. It was very difficult for the engineers to get Opportunity back up on solid ground. A similar thing happened to Spirit, and when it eventually made its way out, it had incurred some significant damage. Curiosity, on the other hand, has the intelligence to know when it's encountered a problem like that, and it will stop before it's too late, then await a new set of commands.

The humans back at JPL also have a role in keeping the rover safe, of course. The 14 rover drivers (the official title is "rover planner") have to coordinate the day's activities in advance. Communication between earth and the Rover only occurs once or twice a day, and there is a significant delay from the time a command is sent to when the rover receives it—roughly 14 minutes).

"We can send low-level commands like 'spin a motor 100 revolutions,'" says Matt Heverly, another rover planner. "Or we can send high level commands like 'drive to that waypoint and keep yourself safe.'"

The window for communication is dependent on how Mars is oriented. For at least the first 90 days, the team will be working during the Martian days, known as "sols". Mars rotates just a little bit slower than Earth, so in order to clock in at the same time every Martian morning, the planners will have to get to work 40 minutes later each day. At the end of the Martian day, the rover sends in the most recent data and imagery, then it goes to sleep for the night. Meanwhile, the planners get busy figuring out the route for the next day.

Using the software Cooper and his team created, combined with the visual data Curiosity has collected, the planners can quickly run through a variety of possible routes to get the MSL to where the science team wants it to go. The real rover only travels at 0.1 miles per hour, but in simulation, using just a basic keyboard and mouse, the planners can drag it over obstacles to see how it would potentially perform, and can even put on a pair of 3D glasses to see the terrain with a sense of scale and distance. So they plan out what looks to be the best route; they send the commands, and then they rely on the rover's intelligence to improvise a way to get there.

On a planet with sudden sheer cliffs and potholes that can fit a mountain, sending the most basic directions requires critical planning and programming. Cooper seems confident. But, as he says, "You never know what you're going to find."

Huge thanks to Brian Cooper for his time time.

Video shot by Judd Frazier, edited by Michael Hession. Simulation footage by NASA JPL.

Special thanks to Mark Rober, Jessica Culler, Dan Goods, Val Bunnell, and everybody at NASA JPL and NASA Ames for making this happen. The list of thank yous would take up pages, but for giving us access, and for being so generous with their time, we are extremely grateful to everyone there.