The software that drives Curiosity and controls its robotic arm is called the Robot Sequencing and Visualization Program (RSVP). RSVP consists of about 1 million lines of Java and C++ code. The main component used to plan, simulate and specify commands to dictate the rover’s actions each day is called HyperDrive. HyperDrive is a system for viewing images and terrain in 3D, which uses NVIDIA Quadro cards that support goggle stereo viewing.
Running RSVP on high-end Linux workstations and using NVIDIA 3D Vision glasses, rover drivers evaluate Curiosity’s surroundings each day and generate instructions for the next day’s activities. Command output is XML which gets compiled into binary code that’s sent to the rover for execution. On any given day, hundreds of commands are sent to Curiosity.
“The MSL command dictionary has thousands of commands that allow us to control all rover motion, manage power, communications with Earth, and tons of low level maintenance issues like data management on board,” said Cooper.
RSVP was completely developed in-house, by a small (8 people or so) team of developers who also drive the rover. “RSVP has a proud heritage,” Cooper said, and it grew out of the code written for the first Mars rover, Sojourner (of which Cooper was the first driver), called the Rover Control Workstation (RCW), which consisted of 80,000 lines of C++ code. Subsequently, the first version of RSVP was written for the Spirit and Opportunity rovers.
While Opportunity continues to be driven based on an earlier version of RSVP (the JPL team uses SVN to manage the code base), the basic architecture has remained the same for Curiosity, though it has been enhanced in a number of ways. For example, the HyperDrive component has been completely rewritten so it can support multiple missions. As Cooper puts it, “We separated the mission specific code (for Curiosity for example) from the code that would be applicable for any current or future mission. This will allow us to adapt it to future mission for much less work.”