News for hackers. Stuff that matters.
Re:Mars Helicopter Lands Safely After Serious In-Flight Anomaly by londons_explore on Friday May 28, 2021 @03:22AM (#27312609)
It looks like the real issue is "we wrote all the camera code ourself rather than using battle tested libraries".

The android camera API for example will tag every frame with the timestamps and exposure settings it was captured with. Unit and integration tests can simulate dropped frames and verify the algorithm still runs as it should.

I would guess they tried to go for direct camera hardware access and ended up writing their own logic to schedule frames, and it contained a bug.

Re:Mars Helicopter Lands Safely After Serious In-Flight Anomaly by sgt on Friday May 28, 2021 @03:31AM (#27312664)
Yeah let's just find a battle tested library for camera code on Mars. And I'm sure you expect that to be available on npm as well.
Re:Mars Helicopter Lands Safely After Serious In-Flight Anomaly by 0xfaded on Friday May 28, 2021 @03:50AM (#27312768)
Id be happy to find one on earth. Go look at some driver code, it's not uncommon for timestamps to increment by a precomputed expected frame duration.
Re:Mars Helicopter Lands Safely After Serious In-Flight Anomaly by Clewza313 on Friday May 28, 2021 @03:30AM (#27312653)
And where, pray tell, would you find battle tested libraries for flying a drone on Mars?

I'm also reasonably certain that the drone isn't running Android, and that not doing so is the correct design choice.

Re:Mars Helicopter Lands Safely After Serious In-Flight Anomaly by perryizgr8 on Friday May 28, 2021 @04:31AM (#27313020)
According to Wikipedia: The helicopter uses a Qualcomm Snapdragon 801 processor with a Linux operating system.

Considering Qualcomm never releases their kernel sources, I am really worried that NASA might have been forced to use a modified Android system.

Re:Mars Helicopter Lands Safely After Serious In-Flight Anomaly by ludocode on Friday May 28, 2021 @05:41AM (#27313380)
I mean they weren't "forced" to use anything. They chose the chip. If they had different requirements they could have chosen a different chip.

Most likely they just used the specific kernel version with closed binary blobs from Qualcomm for a typical embedded Linux, not the full Android system.

Re:Mars Helicopter Lands Safely After Serious In-Flight Anomaly by rurounijones on Friday May 28, 2021 @03:36AM (#27312700)
To be Devil's advocate. OP was talking about a VGA camera API only and what an example of a battle-tested camera library already does.

I don't think anyone is seriously suggesting the thing should run android.

But if you are writing something yourself then looking at what existing libraries already (and more importantly their test suites!) do is a good idea.

Maybe they did and maybe they didn't in this case, hard to know with the data available.

Re:Mars Helicopter Lands Safely After Serious In-Flight Anomaly by serf on Friday May 28, 2021 @04:27AM (#27313000)
>And where, pray tell, would you find battle tested libraries for flying a drone on Mars?

this isn't magic. Image processing isn't a wholly unknown field when under the influence of Martian gravity.

It's a staggering achievement, and a testament to humankind's ability to wrangle technology, but -- to be frank here -- visual odometry is technology from 1960s era spy planes, not beyond-human voodoo.

Sometimes errors are stupid ones, even if the stupidity is causing problems a zillion miles away on distant unknown frontiers being first-explored by human kind.

tl;dr : This visual odometry problem isn't a space problem, it's a computer science problem -- one that has been encountered by numerous people even here on earth.

The repercussions of such a simple non-space-problem might very well turn into space problems when the craft crashes, however -- and that's a damn shame given that this particular set of problems has been encountered-and-fixed by numerous earthlings over and over again.

super tl;dr : as an only half-informed-participant in this discussion I bet this problem is NIH-syndrome-related, a problem NASA has encountered a lot in the past, a problem that's entirely managerial and very hard to eradicate.

Re:Mars Helicopter Lands Safely After Serious In-Flight Anomaly by numpad0 on Friday May 28, 2021 @06:45AM (#27313813)
Re:tl;dr: Snapdragon camera peripheral is probably not super often used on Earth to fly a drone
Re:Mars Helicopter Lands Safely After Serious In-Flight Anomaly by fjdncncndb on Friday May 28, 2021 @03:37AM (#27312705)
I would imagine you could reuse code from a flying drone on Earth.
Re:Mars Helicopter Lands Safely After Serious In-Flight Anomaly by ghhhhhk8899jj on Friday May 28, 2021 @04:54AM (#27313137)
There's no reason to assume that code would contain fewer bugs.
Re:Mars Helicopter Lands Safely After Serious In-Flight Anomaly by gscott on Friday May 28, 2021 @04:17AM (#27312947)
Next time they need to send up gps sats to orbit Mars...
Re:Mars Helicopter Lands Safely After Serious In-Flight Anomaly by serf on Friday May 28, 2021 @04:28AM (#27313012)
visual odometry is a fairly common feature for earth-creations (even toy drones) operating in GPS-denied environments.

We have plenty of faux-mars environments to practice these techniques on. NASA even has their own.

many of the toy indoor-use drones use such techniques for attitude/altitude-hold features when under a roof.

Re:Mars Helicopter Lands Safely After Serious In-Flight Anomaly by mjfisher on Friday May 28, 2021 @03:32AM (#27312669)
Silly spacecraft engineers. If only they had the foresight to run "npm install -g ingenuity-camera-api"
Re:Mars Helicopter Lands Safely After Serious In-Flight Anomaly by JosephRedfern on Friday May 28, 2021 @03:36AM (#27312701)
It does sound like something you’d expect unit and integration tests to catch, but I am not sure that necessitates the use of off the shelf libraries?

In the context of a space helicopter, I’d guess that deep understanding and ownership of each software component is super important when you’re likely to have to support a debug it from millions of miles away. At this scale, and in this context, doesn’t “rolling your own” critical components, in some cases, make sense?

Re:Mars Helicopter Lands Safely After Serious In-Flight Anomaly by pragma93 on Friday May 28, 2021 @04:40AM (#27313064)
I can't say for the camera code, but it looks like a lot of the project is reliant on open source software:

- https://github.com/nasa/fprime

- https://github.com/readme/nasa-ingenuity-helicopter

Re:Mars Helicopter Lands Safely After Serious In-Flight Anomaly by Tarq0n on Friday May 28, 2021 @04:04AM (#27312859)
Scientific cameras are all like that. You get a half-baked SDK if you're lucky, then you have to implement and integrate everything yourself.