The Ingenuity Mars Helicopter departed Earth for its 293 million mile trip to Mars aboard the Perseverance Rover last July. The launch was the first powered flight on another planet marking a major milestone for humanity. That’s something already known to most of us. What many of us do not quite know is that this engineering feat was done with Linux, open-source software, and a NASA-built program based on the Jet Propulsion Laboratory’s (JPL) open source framework. As many as 12,000 developers on GitHub contributed to Ingenuity’s software via open source.
Open Source Goes to Mars
NASA has been using open-source software in some of its R&D projects for about 10 to 15 years now and it keeps a very extensive catalogue of the open-source code it has used. But open-source tech in space exploration mission has been a rare thought. But space missions are now focused on the use of technologies that are less expensive and more accessible. And therefore open source software in space exploration projects are pretty much be in vogue.
Technology played a key role in the entire Mars mission. For example, the 4-lb helicopters were contractors from recognizable companies like AeroVironment, Lockheed Martin, and Qualcomm. And behind its expansive software were thousands of open source developers from GitHub, the team of developers contributed code, documentation, graphic design, and more to the open source software that made Ingenuity’s launch possible, said a GitHub Blog, celebrating the moment in open source history.
The Ingenuity helicopter runs an embedded Linux distribution on its navigation computer. Much of its software is written in C++ using JPL’s open source flight control framework F Prime (F´). Meanwhile, the Python ecosystem played a key role in everything from ground control to flight modeling to data processing.
“Many of the people who are getting a badge probably have no idea their software is being used to fly a helicopter on another planet,” says GitHub Senior Director of Developer Relations Martin Woodward. “We wanted to make sure everyone was recognized for their contributions to this incredible human achievement.”
The Power Of Open Source
JPL supplied GitHub with a list of every version of every open source project powering Ingenuity. Woodward says, “A single project might have 10 or fewer dependencies, but they spider out from there, with each dependency relying on something else. Before you know it, you have an incredibly large number of people who have contributed to a project.”
The same is true for practically all software systems shipping today, 99% of which relies on open source components. As Carol Willing, a core contributor to Python. “That’s one of the beauties of open source; someone else can take your good work and make it even more powerful and meaningful.”
“There’s definitely a collective pride on occasions like this,” Linux Foundation executive director Jim Zemlin says. “Linux started as a hobby operating system and now it’s the de facto platform for mobile computing, cloud computing, automobiles, and so much more. Now it’s an interplanetary operating system as well.”
It’s not just a great moment for Linux, but for open source in general. “It’s humbling to step back and think ‘Wow, this helped someone solve a real-world problem,” Willing says. “You might never know the impact your project has had, or what it’s enabled someone to do.”
Contributions to these projects came in the form of more than just code. Python core team member Mariatta Wijaya focuses mostly on community management, documentation, and building workflow tools that help the Python team automate various processes. Those are all essential responsibilities that make open source projects function and keep the code usable. “Just creating pull requests is not enough,” she says. “We still need to review code, document changes, and work with the community to decide what to build and how.”
Collaboration with Open Source
Though NASA is a US government organization, the effort behind Ingenuity is international in nature—people from well beyond JPL’s usual orbit contribute. For example, Andrew Nelson is a scientist working at the Australian Nuclear Science and Technology Organization. He’s also a maintainer of SciPy, a scientific computing package widely used within JPL, including on the Ingenuity mission. “It’s brilliant to know that what we spend our time doing ends up helping an awesome project like this,” Nelson says. “This is one of the reasons I became a scientist.”
This sort of transnational collaboration will be crucial to the future of many human endeavors. “It proves that working together is always better,” says Zemlin. “There’s simply too much software that needs to be written to deploy an aircraft on a distant planet, or to help to create a zero-carbon economy with smart grids and efficient energy. Any individual, any company, or any nation-state can’t write it all on their own.”
Open source provides a path for people with any background, anywhere in the world to put their skills to use on these important challenges. “The more we can do to be welcoming and to encourage a diverse set of contributors, the better,” Willing says. “We need many different viewpoints to solve the most complex problems out there.”
More Open Source in Space
There are many ways that open source contributors can get involved with space exploration projects.
“We’ve used and contributed to open source software at JPL for our projects and missions for many years,” says JPL principal data scientist and Chief Technology and Innovation officer Chris Mattmann. “That includes everything from operating systems to desktop productivity tools.”
But F´ marks the first time JPL has open sourced flight software. JPL in fact, developed the first version of F´ in 2013. The idea was to create a reusable software framework for a variety of spaceflight projects that could be adapted to practically any hardware, purpose, or destination.
“F´ marked a shift in how JPL worked,” explains Mars Helicopter Operations Lead at JPL Timothy Canham. Historically, JPL’s software had been difficult to repurpose. It often contained context-specific functionality embedded deep within its code. For example, the framework doesn’t assume that engineers will use a particular brand of onboard camera—or any camera at all. If you need to take photos, for example, you can add or remove specific components and functionality as needed. The same applies to any sensor or hardware instrument.
“Open source is a great way for governments and industries to route around the bureaucracy that would normally stop them from collaborating,” says open source expert Karl Fogel. “You don’t need months or years of negotiations and a memorandum of understanding.”
Open Source beyond Mars
Contributing to F´ is just one way to be part of spaceflight. There are countless opportunities to advance human progress using the technology. The code could explore alien landscapes, model climate change, or solve health crises, said the blog post.
Many also see open source as the safest, fastest, and most cost-effective way of advancing technology. Besides NASA, IBM, Amazon Web Services, Google’s Kubernetes and TensorFlow, and even Microsoft with its Azure functions are all-embracing open-source. But it will never be possible to use open-source software in all cases. Security concerns could be an issue, and might cause some parties to stick to proprietary tech entirely (although one plus to open-source platforms is that developers are often very public about finding flaws and proposing patches), says cyber security expert Eswara Rao.
Nonetheless, organizations are willing to take a chance and dig into this space for the sake of cost efficiency, greater innovation and autonomy. Blue Origin for example, recently announced a partnership with several NASA groups to “code robotic intelligence and autonomy” built from open-source frameworks. Smaller initiatives like the Libre Space Foundation based in Greece, which provides open-source hardware and software for small satellite activities, are bound to gain more attention as spaceflight continues to get cheaper.
In 2023, NASA will launch VIPER (Volatiles Investigating Polar Exploration Rover), which will trek across the surface of the moon and hunt for water ice that could one day be used to make rocket fuel. And more importantly, Elon Musk’s first robotic Starship, Heart of Gold, that will fly to Mars later this decade, will also be guided by Linux and open-source software.