TNS
VOXPOP
What news from AWS re:Invent last week will have the most impact on you?
Amazon Q, an AI chatbot for explaining how AWS works.
0%
Super-fast S3 Express storage.
0%
New Graviton 4 processor instances.
0%
Emily Freeman leaving AWS.
0%
I don't use AWS, so none of this will affect me.
0%
Edge Computing / Linux

How the First Helicopter on Mars Uses Off-the-Shelf Hardware and Linux

This month, as humanity continues its explorations with the landing of the Perseverance rover on Mars, open source enthusiasts cheered that the Red Planet was also becoming the second planet where Linux is headed for world domination. The open source operating system is a critical part of a project to deliver what may become the first aircraft ever to fly from the surface Mars.
Feb 28th, 2021 6:00am by
Featued image for: How the First Helicopter on Mars Uses Off-the-Shelf Hardware and Linux

Nearly 50 spacecraft have been sent to Mars — each one more powerful than the last, Scientific American has reported. It’s been said that it’s the only planet we know of populated entirely by robots.

But this month, as humanity continues its explorations with the landing of the Perseverance rover, open source enthusiasts cheered that Mars was also becoming the second planet where Linux is headed for world domination. The open source operating system is a critical part of a project to deliver what may become the first aircraft ever to fly from the surface of Mars.

And it’s all an inspiring example of a massively complex project that carries with it some of humanity’s best technologies — and also its best hopes.

The Winds of Mars

The mission has already resulted in the first audio recording ever of sounds from Mars. “About 10 seconds into the 60-second recording, a Martian breeze is audible for a few seconds, as are mechanical sounds of the rover operating on the surface,” according to a NASA press release. And Thursday NASA shared live footage from the Perseverance rover’s special mast-mounted, zoom-equipped camera, Mastcam-Z, which can not only generate color pictures but also 3D and stereo images.

But the Perseverance rover also carries a special passenger — a little flying robot that NASA has named Ingenuity. Right now NASA describes it as “attached to the belly” of the Perseverance rover, where it will remain for the next month or two while the rover scouts for a suitable location to drop it off. “Its body is the size of a box of tissues,” explains IEEE Spectrum, weighing just 1.8 kilograms (less than four pounds). And while NASA estimates the cost of the Perseverance mission at $2.4 billion — just $80 million went to the Ingenuity helicopter (with another $5 million for operating it).

But NASA’s Jet Propulsion Laboratory proudly hails it as “the first aircraft humanity has sent to another planet.” And last Saturday the helicopter reported to the Mars orbiter that it had survived the landing and was operating as expected with partially-charged batteries, as was its base station on the Perseverance rover.

Perseverance will eventually become autonomous — sort of. Earth-to-Mars communication can take at least four minutes — or as long as 21 minutes, depending on how far apart the planets are at that particular point in their orbit. So when its big moment comes, Ingenuity will maintain its pre-programmed flight path by analyzing its own images of the terrain below as well as data from its own sensors (like how fast it’s traveling) — without any real-time input from earth. IEEE Spectrum spoke to Tim Canham, who leads the Mars Helicopter Operations team at NASA’s Jet Propulsion Laboratory, who explains that “A few dozen features are compared frame to frame to track relative position to figure out direction and speed, which is how the helicopter navigates.”

Although if a sensor goes bad, “the helicopter really has one response, which is to take the last propagated state and just try to land and then tell us what happened and wait for us to deal with it.”

NASA on YouTube - Mastcam-Z event on Thursday (edge of the crater delta) cropped pic

Though the gravity of Mars is about one-third the gravity on earth, the copter’s designers also had to make adjustments to handle the thin Martian atmosphere — just 1% the density of earth’s. A NASA blog post explains that even though the copter’s stiff blades are a full 4 feet wide (about 1.2 meters), “At 2,800 rotations per minute, it will spin about 10 times faster than an Earth helicopter.” NASA also points out that the helicopter “requires 360 watts of power for each second it hovers in the Martian atmosphere,” (equivalent to the power required by six light bulbs). But most of the energy from the helicopter’s solar array (located over its rotor blades) will be used just to keep it warm.

The NASA website adds that “If Ingenuity survives its first bone-chilling Martian nights — where temperatures dip as low as minus 130 degrees Fahrenheit (minus 90 degrees Celsius) — the team will proceed with the first flight of an aircraft on another world.”

Linux Onboard

But what may be even more interesting for computer geeks: Perseverance relies on Linux.

“There isn’t a previous use of Linux that I’m aware of, definitely on the previous rovers,” Canham told PC Magazine. Even the Perseverance rover is using Wind River’s proprietary VxWorks operating system, which was also used for some past rovers, the magazine reports — but Canham tells them they’d needed Linux to use with the Snapdragon 801 board. “It’s definitely a win for Linux.”

It’s also using F´ (pronounced “F Prime”), a JPL-produced “component-driven framework that enables rapid development and deployment of spaceflight.” F Prime is available through a GitHub repository listing its components, which include “An architecture that decomposes flight software into discrete components with well-defined interfaces” and “a C++ framework that provides core capabilities such as message queues and threads” (though there’s also several Python dependencies).

Canham tells IEEE Spectrum that “It’s kind of an open-source victory because we’re flying an open-source operating system and an open-source flight software framework — and flying commercial parts that you can buy off the shelf if you wanted to do this yourself someday.”

High Risk, High Reward

NASA considers the mission “a high-risk, high-reward technology demonstration,” according to an impressive animation it created:

Mostly the agency just wants to answer some basic questions: like can it take off in the Martian atmosphere — and can it successfully land. If it remains operable, they’ll try “up to four more flights,” according to NASA — each one flying a little bit further than the last. NASA is estimating flights “up to 90 seconds, to distances of almost 980 feet (300 meters) at a time and about 10 to 15 feet from the ground.”

But the first flights in the 30-day window could be only the beginning, Canham hints to IEEE Spectrum. “Depending on how quickly the first three go, we may have a week or so to try some more exotic things.”

Yet another NASA fact sheet points out it’s also demonstrating the practicality of miniaturized flying technology — shrunken-down onboard computers and electronics that lighten the load. “Since Ingenuity is classified as a technology demo, JPL is willing to accept more risk,” Canham explained to IEEE Spectrum. “So we essentially went out and used a lot of off-the-shelf consumer hardware.” So while the crucial avionics components are radiation-resistant, it’s using an ordinary cellphone-grade inertial measurement unit, and its processor board is just Qualcomm’s cellphone processor Snapdragon 801, Canham added.

“But ironically, because it’s relatively modern technology, it’s vastly more powerful than the processors that are flying on the rover… because we need it, Canham said. “Our guidance loops are running at 500 Hz in order to maintain control in the atmosphere that we’re flying in. And on top of that, we’re capturing images and analyzing features and tracking them from frame to frame at 30 Hz.”

It’s using a laser altimeter they bought online from the open-source hardware site SparkFun Electronics, Canham tells the site. And “The camera is as good as your cell phone camera,” explains one NASA webpage. Equipped with a 13-megapixel camera, “engineers will attempt to take plenty of good pictures.”

NASA points out that Perseverance also carried a special placard with 10,932,295 names, “stenciled by electron beam onto three fingernail-sized silicon chips.”

But maybe the spirit of the mission was best captured by a special message NASA encoded in the colors of the parachute that slowed the landing craft’s descent to the surface of Mars. The orange sections of the parachute represented ones in binary code, while the yellow sections represented zeroes. (So the letter “A” becomes yellow-yellow-yellow-yellow-yellow-yellow-orange.)

What was the message? The colors in the parachute’s outer ring encoded the GPS coordinates for NASA’s Jet Propulsion Lab in Pasadena, California. But the inner ring had encoded a phrase from a Theodore Roosevelt speech in 1889 which has since become the official motto of JPL.

“Dare mighty things.”


WebReduce

Group Created with Sketch.
THE NEW STACK UPDATE A newsletter digest of the week’s most important stories & analyses.