Please create an account to participate in the Slashdot moderation system

 



Forgot your password?
typodupeerror
×
Mars NASA Software

Software Patch Fixes Mars Curiosity Rover's Auto-focus Glitch 53

An anonymous reader writes: Scientists from Los Alamos National Laboratory have successfully uploaded and applied a software patch to NASA's Curiosity Rover on Mars. The patch fixes a focusing problem that cropped up in November when the laser that helps to focus one of its cameras failed. "Without this laser rangefinder, the ChemCam instrument was somewhat blind," said Roger Wiens, ChemCam principal investigator at Los Alamos. "The main laser that creates flashes of plasma when it analyzes rocks and soils up to 25 feet [7.6 meters] from the rover was not affected, but the laser analyses only work when the telescope projecting the laser light to the target is in focus." Before the fix, scientists had to shoot images at nine different focus settings to distill a decent set of data. Now, they say the new software results in better images in a single shot than even before the laser broke down. The program that runs the instrument is only 40 kilobytes in size.
This discussion has been archived. No new comments can be posted.

Software Patch Fixes Mars Curiosity Rover's Auto-focus Glitch

Comments Filter:
  • by Anonymous Coward

    I worked at Los Alamos National Lab for a number of years. There are some very skilled people there who are very dedicated. America can do good science when it has the will. Which unfortunately isn't so often.

  • Source code? (Score:5, Interesting)

    by Anonymous Coward on Sunday May 24, 2015 @02:25AM (#49762237)

    Apollo space program is documented in great detail. Even the software running in the flight computers is nowdays available and you can run the whole thing in a virtualized guidance computer. http://www.ibiblio.org/apollo/

    Does anyone have any idea what's the case with probes and landers? I know they are mostly running VxWorks, but I'd love to take a peek on how some of the routines are actually implemented.

    • Re:Source code? (Score:4, Insightful)

      by jonwil ( 467024 ) on Sunday May 24, 2015 @03:27AM (#49762397)

      Me, I wish the code for the Space Shuttle was available. The shuttles are now decommissioned and sitting in museums and no country wanting to build any kind of shuttle or space plane is going to be replicating a 40 year old American design when there are far better ways to do it nowadays so there shouldn't be any risk to national security in releasing the code (not to mention that the code alone isn't enough to rebuild the computer system, let alone the whole shuttle).

      • by Anonymous Coward

        Conceivably some of the shuttle guidance systems and such could be useful for ballistic missile development? At least, it could be informational for developing such systems, if not directly usable.

      • by Anonymous Coward

        Regardless, the software in the rover that the article is talking about doesn't contain anything related to missile launching and is developed using public funding.
        The only reason to not make the rover software publicly available is that it could benefit other nations space programs. This in itself wouldn't harm the US space program, unless you consider dick-waving to be the most important thing in the world.
        Sharing software makes the world richer, not poorer. Considering that the software written on the ta

    • by Anonymous Coward

      Software for spacecraft is potentially export controlled either under ITAR or EAR, so just throwing it out on github or source-forge isn't likely. It's true that much of what's running on Curiosity probably is NOT subject to export control (or is "dual-use"), but it would be difficult and tedious (read - expensive) to separate out the pieces and get them reviewed for public release. Space missions are always budget constrained, so do you want to collect more science data or get software released?

      As it hap

    • by Anonymous Coward

      http://code.nasa.gov/#/

  • by Mal-2 ( 675116 ) on Sunday May 24, 2015 @02:26AM (#49762241) Homepage Journal

    This fix still requires much of the resources of the previous method, essentially bracketing the shot and picking the best one. This means it will still take just as long to obtain each image, but apparently that wasn't a huge problem. What this saves is something precious though: bandwidth. Now the rover is picking the best shot, instead of sending a bunch of blind guesses and making us sort it out. I suspect that if the bandwidth wasn't precious, they wouldn't have bothered improving on the existing workaround, so it must have been worth all the trouble.

    • by itzly ( 3699663 )

      This means it will still take just as long to obtain each image

      Not having to send the images to earth saves a lot of time.

    • Re: (Score:2, Interesting)

      by Anonymous Coward

      Technically you don't even need a range finder.

      It's possible to do autofocus through-the-lens with phase detection [wikipedia.org] or contrast detection [wikipedia.org]:

      Contrast detection places different constraints on lens design when compared with phase detection. While phase detection requires the lens to move its focus point quickly and directly to a new position, contrast detection autofocus instead employs lenses which can quickly sweep through the focal range, stopping precisely at the point where maximum contrast is detected. This means that lenses designed for phase detection often perform poorly on camera bodies which use contrast detection.

      From a link in TFA [lanl.gov]:

      They figured out that if they discarded a lot of the old code on board their distant subject, they could make room for software that could command the instrument to take the nine images on its own and analyze them on-board to find the best focus.

      I guess they didn't have room on the device to code up a binary search of the contrast method before acquiring a single image?

      • Well you'd still have to take images to tell the current state of the contrast, after all the camera can only "see" through the lenses when taking a picture. Also a binary search is likely suboptimal for such things, an interpolation search is likely to be far more efficient since you presumably have enough information after the first few images to make a good guess as to where in the spanned range the "sweet spot" will be.

        • by Arkh89 ( 2870391 )

          You could also not have to do it at all and use an EDOF system (such as shown in this demo [youtube.com]). Its just not a software solution and has to be constructed from the beginning with the lens and the camera (you voluntary insert aberrations that will make the system blurry "the same way" in some larger range, but this blur is easily invertible by a simple image Wiener deconvolution).

    • by citizenr ( 871508 ) on Sunday May 24, 2015 @08:33AM (#49763167) Homepage

      so it sounds like a simple FFT to pick one with biggest high frequency coefficients. You can do it yourself smapping pictures at different focus and simply comparing file sizes: better focus = finer detail = more high frequency content = more information to store. Think JPG Quantization table and quality setting.

  • by NotInHere ( 3654617 ) on Sunday May 24, 2015 @02:42AM (#49762293)

    thats four times LiteOS! Get some Huawei developers work on this, and they'll reduce this patch to 64 bytes.

  • We need these guys to work on Firefox. Chromium too! Hell, just turn them loose on Windows!

    • 40k is a lot of code, when it's not been written in layers of glop-gloop abstraction.

      • by v1 ( 525388 )

        was just gonna say that... 40kb is quite a lot of assembly, or even C as long as it's not using bloated libraries.

        Does anyone here happen to know if they code the rovers in assembly? or code the patches in assembly?

        • by itzly ( 3699663 )

          Nobody in their right mind is going to write rover code in assembly. Too much work, and too much chance of a silly mistakes fucking things up, while the actual code saving is not much. It's much easier and cheaper to add some extra memory instead.

          • by Anonymous Coward

            Nobody in their right mind is going to write rover code in assembly. Too much work, and too much chance of a silly mistakes fucking things up, while the actual code saving is not much. It's much easier and cheaper to add some extra memory instead.

            This guy obviously hasn't had to pay for radhard SEU immune SRAM.

  • Not a fix... (Score:5, Informative)

    by Alwin Henseler ( 640539 ) on Sunday May 24, 2015 @03:08AM (#49762341)

    ..but an improved workaround.

    If I read the article(s) correctly, problem was caused by failure of a small 2nd laser used for range finding. It seems that failure wasn't solved. Permanently out of action? Who knows.

    Workaround was to take several shots at different focus settings, and have home base sort out the data. Improved workaround is to take several shots at different focus settings, have software on-site figure out which are the best, and only send that data back home.

  • To the editors (Score:5, Interesting)

    by Crashmarik ( 635988 ) on Sunday May 24, 2015 @03:43AM (#49762425)

    If you are going to have a story like this it would be good form to remember the H, aka HOW from who,what,when,where, why and HOW of a journalism article. At some point in the past this was a site oriented to the technical community, most of whom are very interested in the how. You might even think that for the most part the when, why, where and who are all at the who cares level. (Mars being an exception)

    • by umghhh ( 965931 )
      I do not know this so I am guessing but it may be that the number of people that are so limited (deep Asperger and any such)) as to not care about anything other than 'how' is limited which means that as the /. crowd grew, they became increasingly outnumbered. You may be displeased by this of course but if you are old enough you will understand that this is unavoidable. I dislike all the information foam around subjects too. I still learned how to cope. Filter the necessary stuff yourself it is not that dif
    • by Anonymous Coward
      The summaries are generally written by the submitters. The Slashdot "editors" mostly just select articles and post them to the front page, rarely fixing even the most obvious of spelling errors.
  • "Now, they say the new software results in better images in a single shot than even before the laser broke down."

    So it was a good Oportunity to pay some technical debt.

Think of it! With VLSI we can pack 100 ENIACs in 1 sq. cm.!

Working...